lmm1w1b: Compute power for a One Factor Within Subjects and One Factor...

View source: R/lmm1w1b.R

lmm1w1bR Documentation

Compute power for a One Factor Within Subjects and One Factor Between LMM with up to two by four levels (within). Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Description

Compute power for a One Factor Within Subjects and One Factor Between LMM with up to two by four levels (within). Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

lmm1w1b(
  m1.1,
  m2.1,
  m3.1 = NA,
  m4.1 = NA,
  m1.2,
  m2.2,
  m3.2 = NA,
  m4.2 = NA,
  s1.1 = NA,
  s2.1 = NA,
  s3.1 = NA,
  s4.1 = NA,
  s1.2 = NA,
  s2.2 = NA,
  s3.2 = NA,
  s4.2 = NA,
  r1.2_1 = NULL,
  r1.3_1 = NULL,
  r1.4_1 = NULL,
  r2.3_1 = NULL,
  r2.4_1 = NULL,
  r3.4_1 = NULL,
  r1.2_2 = NULL,
  r1.3_2 = NULL,
  r1.4_2 = NULL,
  r2.3_2 = NULL,
  r2.4_2 = NULL,
  r3.4_2 = NULL,
  r = NULL,
  s = NULL,
  n,
  alpha = 0.05
)

Arguments

m1.1

Mean of first level Within Factor, 1st level Between Factor

m2.1

Mean of second level Within Factor, 1st level Between Factor

m3.1

Mean of third level Within Factor, 1st level Between Factor

m4.1

Mean of fourth level Within Factor, 1st level Between Factor

m1.2

Mean of first level Within Factor, 2nd level Between Factor

m2.2

Mean of second level Within Factor, 2nd level Between Factor

m3.2

Mean of third level Within Factor, 2nd level Between Factor

m4.2

Mean of fourth level Within Factor, 2nd level Between Factor

s1.1

Standard deviation of first level Within Factor, 1st level Between Factor

s2.1

Standard deviation of second level Within Factor, 1st level Between Factor

s3.1

Standard deviation of third level Within Factor, 1st level Between Factor

s4.1

Standard deviation of forth level Within Factor, 1st level Between Factor

s1.2

Standard deviation of first level Within Factor, 2nd level Between Factor

s2.2

Standard deviation of second level Within Factor, 2nd level Between Factor

s3.2

Standard deviation of third level Within Factor, 2nd level Between Factor

s4.2

Standard deviation of forth level Within Factor, 2nd level Between Factor

r1.2_1

correlation Within Factor Level 1 and Within Factor, Level 2, 1st level Between

r1.3_1

correlation Within Factor Level 1 and Within Factor, Level 3, 1st level Between

r1.4_1

correlation Within Factor Level 1 and Within Factor, Level 4, 1st level Between

r2.3_1

correlation Within Factor Level 1 and Within Factor, Level 3, 1st level Between

r2.4_1

correlation Within Factor Level 1 and Within Factor, Level 4, 1st level Between

r3.4_1

correlation Within Factor Level 1 and Within Factor, Level 4, 1st level Between

r1.2_2

correlation Within Factor Level 1 and Within Factor, Level 2, 2nd level Between

r1.3_2

correlation Within Factor Level 1 and Within Factor, Level 3, 2nd level Between

r1.4_2

correlation Within Factor Level 1 and Within Factor, Level 4, 2nd level Between

r2.3_2

correlation Within Factor Level 1 and Within Factor, Level 3, 2nd level Between

r2.4_2

correlation Within Factor Level 1 and Within Factor, Level 4, 2nd level Between

r3.4_2

correlation Within Factor Level 1 and Within Factor, Level 4, 2nd level Between

r

sets same correlations between DVs on all factor levels (seriously, just use this)

s

sets same standard deviation for factor levels (see comment above)

n

n for each between group level

alpha

Type I error (default is .05)

Value

Power for the One Factor Within Subjects and One Factor Between LMM

Examples

lmm1w1b(m1.1 = -.25, m2.1=0, m3.1=0.10, m4.1=.15,
m1.2=-.25,m2.2=-.25,m3.2=-.25, m4.2=-.25,
s1.1 = .4, s2.1=.5, s3.1=0.6, s4.1=.7,
s1.2=.4,s2.2=.5,s3.2=.6, s4.2=.7,n = 50,
r1.2_1=.5,r1.3_1=.3,r1.4_1=.15,r2.3_1=.5,r2.4_1=.3,r3.4_1=.5,
r1.2_2=.5,r1.3_2=.3,r1.4_2=.15, r2.3_2=.5,r2.4_2=.3,r3.4_2=.5)
lmm1w1b(m1.1 = -.25, m2.1=0, m3.1=0.10, m4.1=.15,
m1.2=-.25,m2.2=-.25,m3.2=-.25, m4.2=-.25, s=.4, r = .5, n=100)

pwr2ppl documentation built on Sept. 6, 2022, 5:06 p.m.