choose_quantile | R Documentation |
This function makes the quantile test for each patient with different values of quantile and factor. for each set of parameters, it computes FDR, TPR and FPR.
choose_quantile(
controls,
simulation,
factor_values = c(1, 1.2, 1.4, 1.6, 1.8, 2),
quantile_values = c(0.005, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1,
0.2)
)
controls |
A matrix with genes expressions in controls for all the patients. |
simulation |
The list of initial data $initial_data and modified data in $simulated_data |
factor_values |
A vector with different values of factor. The down-regulated limit will be quantmin/factor, and the up-regulated limit quantmax*factor. |
quantile_values |
A vector with different values to test for the quantile. |
This function returns a matrix with 5 columns : the value of the factor test, the value of the quantile tested, the FDR, the TPR and the FPR of the test.
# First, load and define the data, make the simulation
controls = penda::penda_data_ctrl[1:10, 1:10]
simu_data = penda::penda_data_ctrl[1:10,11:16]
simulation = penda::simplified_simulation(simu_data, proportion = 0.3, threshold = 60)
# Second, choose the vectors of quantiles and factors to test
quantile_values = c(0, 0.02, 0.04, 0.06, 0.08, 0.1, 0.15, 0.2, 0.25, 0.30, 0.35, 0.4, 0.45)
factor_values = c(1, 1.2, 1.4, 1.6, 1.8, 2)
# Third, make the test on simulation for different quantiles
which_quantile = penda::choose_quantile(controls,
simulation,
factor_values,
quantile_values)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.