XYZpowerSim: Run a power analysis of slope differences.

Description Usage Arguments Details Value Examples

View source: R/XYZpowerSim.R

Description

Creates a simulated data set based upon the supplied arguments.

Usage

1
XYZpowerSim(R = 1000, clusters = NA, obs =  NA, sigLevel = .05 ...)

Arguments

R

Integer. Number of replications within each cell of simulation.

clusters

A vector of integers. Number of clusters to be crossed with obs e.g., c(5,10,15).

obs

A vector of integers. Number of observations for each level of to be crossed with clusters e.g., c(5,10,15).

sigLevel

Numeric. $alpha$ value for determine significant p-values in each simulation.

...

Arguments passed to simMixedXYZ.

Details

By specifying effect sizes (db0, ..., db7) of betas as seen in Dawson and Richter (2006), number of clusters, and number of observations within cluster, this function creates a data set with the appropriate relationships. Variables X, Y, and Z are each drawn from N~(0,1).

Value

A data frame of simulated parameters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(mixedPowerSim)
nCluster <- c(5, 10, 15)
nObs <- c(5, 10, 15)
reliability <- .8
db0 <- .1
SDb0 <- 1
SDresid <- 5
XYZpowerSim(R = 3, clusters = nCluster, obs =  nObs, sigLevel = .05, type = "slopeDifference",
b0 = db0, a_Dif = 0, b_Dif = 0,c_Dif = 0,
d_Dif = 0, e_Dif = 0, f_Dif = 0,
SDb0 = SDb0, SDresid = SDresid, XWithin = TRUE, ZWithin = FALSE, WWithin = TRUE, reliability = reliability)

RobertGM111/mixedPowerSim documentation built on Jan. 19, 2021, 12:34 a.m.