simulate_scenarios: Simulate multiple scenarios

Description Usage Arguments Value Notes See Also Examples

View source: R/Functions.R

Description

Simulates scenarios with varying effect sizes or sample sizes; can accomodate differing numbers of samples per treatment and control groups

Usage

1
2
3
simulate_scenarios(list_effect_sizes = NULL, list_treatment_groups = NULL,
  list_control_groups = NULL, means = NULL, cor_matrix = NULL,
  num_reps = 1000, method = NULL, p_adjust = NULL)

Arguments

list_effect_sizes

A list of effect_size objects.

list_treatment_groups

A list of sample sizes for the group exhibiting effects.

list_control_groups

A list of sample sizes for the group that does not exhibit effects.

means

A vector which contains the mean for each individual feature.

cor_matrix

A matrix which specifies the correlation structure amongst all features.

num_reps

A number that describes how many replications of each scenario there will be.

method

choose between "ofaat", "mv_glm", "lasso"

p_adjust

Used for the internal implementation of p.adjust; takes the same arguments

Value

A dataframe which summarizes the results of each scenario that has been run

Notes

List arguments must be passed as lists, even if only 1 item in the list. If differing lists are not passed for list_treatment_groups and list_control_groups arguments then default equal treatment/control group sizes assigned. However, at least one size list must be passed. Method must be specified.

See Also

analyze for details on method parameter

p.adjust for p value adjustments

Examples

1
2
3
4
e <- effect_size(c(0.7, 0.2, 0.4))
list_e <- c(e)
group_sizes <- c(20,40,60,80,100)
simulate_scenarios(list_e, group_sizes, method="ofaat")

emartchenko/mvsimstudy documentation built on April 20, 2018, 2:38 a.m.