ICTsimSetup: ICTsimSetup - function to automate setting up 'designs' to be...

View source: R/ICTpowerSim.R

ICTsimSetupR Documentation

ICTsimSetup - function to automate setting up designs to be passed to ICTpowerSim, including splitting up the designs over sevar folders so the simulation can be run in chunks or on multiple computers.

Description

ICTsimSetup - function to automate setting up designs to be passed to ICTpowerSim, including splitting up the designs over sevar folders so the simulation can be run in chunks or on multiple computers.

Usage

ICTsimSetup(
  seed,
  nL,
  phasesL,
  propErrVarL,
  randFxMeanL,
  randFxCorMatL,
  randFxVarL,
  B = 1000,
  nFolders = NULL,
  ICTpowerSimOptions = ""
)

Arguments

seed

Numeric. A random seed for this simulation.

nL

Numeric list. A list of sample sizes. See n in polyICT.

phasesL

A list of phases. See n in polyICT.

propErrVarL

Numeric List. See n in polyICT.

randFxMeanL

A list of effect sizes. See n in polyICT.

@param randFxCorMatL A list of numeric correlation matrices. See n in polyICT.

randFxVarL

A list of numeric vectors. See n in polyICT.

nFolders

Numeric. The number of folders to divide the simulation into. The default is NULL, in which case the user is prompted for input at the console after the total number of conditions is computed. To prevent folders that are too large, it is reccomended that nFolders not exceed 100, especially on Windows systems.

ICTpowerSimOptions

Character. Other options to be passed to the function ICTpowerSim. For example,

muFUN

Author(s)

Stephen Tueller stueller@rti.org

Examples

## Not run: 
seed <- 1234
nL <- list(10, 20)
phasesL <- list( makePhase(c(10,10), c(0,1)), makePhase(c(5,15), c(0,1)) )
propErrVarL <- list(.5, .75)
randFxMeanL <- list( list(randFx=list(intercept=0, slope=.25),
                      fixdFx=list(phase=.5, phaseTime=.25)),
                      list(randFx=list(intercept=0, slope=.5),
                      fixdFx=list(phase=.5, phaseTime=.25)))
randFxCorMatL <- list(matrix(c(1,.2,.2,1), 2, 2), matrix(c(1,.6,.6,1), 2, 2))
randFxVarL <- list(c(1, .1), c(1, .2))
B <- 3
nFolders <- 4
ICTpowerSimOptions <-"cores = 4"
ICTsimSetup(seed    ,
  nL                ,
  phasesL           ,
  propErrVarL       ,
  randFxMeanL      ,
  randFxCorMatL           ,
  randFxVarL        ,
  B                 ,
  nFolders          ,
  ICTpowerSimOptions)

## End(Not run)

ICTatRTI/PersonAlyticsPower documentation built on Dec. 13, 2024, 11:08 p.m.