mps.simple: Simple Simulation Modules (ssm) for Illustrating Modular...

Description Usage Arguments Details Value Author(s) Examples

Description

Some Simple Simulation Modules, which are functions that can be used as-is, or used as templates for more complicated functions, to use in Modular Power Simulations.

Usage

1
2
3
4
5
6
7
8
9

Arguments

x

The return value of another function

y

The return value of another function

Details

The idea of Modular Power Simulations is to provide a generic driver function (mps.driver documented elsewhere), to which functions such as those documented here are passed, to specify the simulation model and test statistic(s) to be evaluated. The driver function handles rote looping over design points, and summarising of replicate simulation test statistics to calculate power at different alpha levels and test sidednesses. As described in the documentation for mps.driver, a modular framework is intended to facilitate code re-use, because individual modules can be re-used or modified for different applications.

The calling environment must resolve sampleSize, alleleFrequency, effectSize and dominanceCoeff, etc.

Value

Various return values.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

Examples

1
2
3
4
5
6
7
design <- expand.grid(sampleSize = c(1000, 2000),
                      alleleFrequency = c(0.1, 0.3, 0.5),
                      effectSize = c(0.1, 0.2),
                      dominanceCoeff = 0)
mps.driver(design, ssm.null, ssm.QT, list(lm = ssm.LM),
           nrep = 100)
# run with larger nrep for better results

tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.