createParamMx: Create Population Parameter Matrix for One-Factor Design

Description Usage Arguments Details Value See Also Examples

Description

Create a matrix of population parameters for Monte Carlo simulation with one-factor design.

Usage

1
2
createParamMx(nexp = 1e+05, simparam.env = getParamRanges(),
  firstseed = 666, h0 = TRUE, outfile = NULL)

Arguments

nexp

Number of experiments to run (default 100000).

simparam.env

An environment object containing the parameter ranges; see getParamRanges (default) for the appropriate format.

firstseed

First seed to start off generation of the matrix. Included for replicability of results. A parameter matrix of a given size with a given seed will always be identical.

h0

Status of the null hypothesis: TRUE or FALSE.

outfile

Name of a file where the matrix will be stored; if NULL (default), no data will be stored.

Details

Each row of the matrix returned from this function represents the population parameters for a given experiment. As of version 1.6 of simgen, This function has been superceded by genParamRanges and randParams, but is preserved for backwards compatibility.

Value

A matrix, with the following columns:

int

(grand mean) intercept

eff

treatment effect

err

error variance

miss

proportion of response values missing

t00

by-subject intercept variance

t11

by-subject slope variance

rsub

by-subject intercept/slope correlation

w00

by-item intercept variance

w11

by-item slope variance

ritm

by-item intercept/slope correlation

seed

random number seed for creating the dataframe (see

mkDf)

See Also

getParamRanges, mkDf

Examples

1
2
3
4
5
6
7
8
# using defaults
createParamMx(10)

# now let's change one of the ranges
p.env <- getParamRanges()
get("t11.range", env=p.env)
assign("t11.range", c(5,10), env=p.env)
createParamMx(10, simparam.env=p.env)

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