In [10]:
! pip install .
In [14]:
import fastfsr
In [11]:
%matplotlib inline
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
In [12]:
pv_orig = np.array([0,.0001,.0116,.0053,.0025,.0433,.0527,.1056,.0826,.0536,.2350])
m = 19
gam0 = 0.05
digits = 4
In [18]:
fsr = fastfsr.fsr_fast_pv(pv_orig, m, plot = True, printout = True)
The table contains a column of `Mono $\tilde{p}$', which represents the monotonized p-values. When the true p-to-enter is not monotonically increasing, we monotonize the original sequence by carrying the largest p forward. Under this situation, at least two of the monotonized p-values must be equal, and there will be a gap in the model size.
For example in step 3, the true p-to-enter is 0.0053, which is smaller than the p-to-enter in the step 3. Hence we carry the p-to-enter from step 2 in step 3 and the same case also happens in step 4. Therefore the model size jumps to 5 after step 2 and it is impossible to have model of size 3 or 4.
The graph illustrates the relationship between $\hat{\gamma_F}$ and $\hat{\alpha_F}$. It illustrates: $\gamma_0 = 0.05$ chooses $\hat{\alpha_F} = 0.002$, which gives a model size of 5.
In [ ]: