analyze: Analyze

Description Usage Arguments Details Value Examples

Description

Analyzes the dataset generated by generate_data according to specified method.

Usage

1
analyze(data_to_analyze, method = NULL, p_adjust = NULL)

Arguments

data_to_analyze

A data frame with a user-specified number of features to analyze repeated reps number of times. The output from the generate_data function.

method

A user-specified method of analysis. Choose one of "ofaat", "mv_glm", or "lasso". Currently can accommodate one feature at a time hypothesis testing (use "ofaat" argument), fitting all features to a general linear model (use "mv_glm" argument), or a lasso method implemented with glmnet functions (use "lasso" argument). Default: NULL

p_adjust

The method by which p value adjustment will take place. See ?p.adjust for list of possible arguments. Default: NULL

Details

Must set global_alpha with set.alpha(alpha_value) where alpha_value is the desired cut-off for significance testing before this function will run to completion.

Note that different analysis methods are appropriate for different dataset shapes. Each analysis method has a slightly different return dataframe. This method is designed to be used inside the simulation.

Value

Dataframe of analyzed results. The structure of the datafrane varies depending on the argument passed to "method".

Examples

1
2
3
4
5
6
 set.alpha(0.05)
 example <- generate_data(50, 50, c(1,2,3), c(0.3, 0, 0.7))
 analyzed1 <- analyze(example, method="ofaat", p_adjust="bonferroni")
 analyzed2 <- analyze(example, method="mv_glm")
 analyzed3 <- analyze(example, method="lasso")
 

emartchenko/mvsimstudy documentation built on May 24, 2019, 5:04 a.m.