reassembleStepwiseFile: Parse and assemble data in a stepwise file into an array.

Description Usage Arguments Value See Also Examples

Description

Convert file containing values from stepwise lmer models to a three-dimensional array in the workspace (one-factor design only).

Usage

1

Arguments

fname

Name of the file containing output from mcRun calling either fitstepwise or fitstepwise.bestpath.

Value

Returns either a three dimension array (if file is the result of fitstepwise.bestpath) or a list of two three dimensional arrays if fitstepwise was used, one for forward and one for backward selection. Each array has the following dimensions:

run

the Monte Carlo run

crit

the alpha level for selection

params

the resulting values from individual calls to

fitstepwise or fitstepwise.bestpath

See Also

fitstepwise, fitstepwise.bestpath.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
nmc <- 10 # number of monte carlo simulations
# create the parameter matrix
pmx <- cbind(randParams(genParamRanges(), nmc, 1001), seed=mkSeeds(nmc, 1001))

# mf contains model formulae for the various models to fit
mf <- list(max=Resp ~ Cond + (1 + Cond | SubjID) + (1 + Cond | ItemID),
            mid.srs=Resp ~ Cond + (1 + Cond | SubjID) + (1 | ItemID),
            min=Resp ~ Cond + (1 | SubjID) + (1 | ItemID))

mcRun("fitstepwise", mcr.outfile="test.txt",
      mcr.fnArgs=list(wsbi=FALSE, mf=mf),
      mcr.datFn="mkDf", mcr.datArgs=list(wsbi=FALSE),
      mcr.varying=pmx)

ff <- reassembleStepwiseFile("test.txt")
ff$forward[,2,]  # alpha-level=.05

dalejbarr/simgen documentation built on May 14, 2019, 3:32 p.m.