Package 'pwr2ppl'

Title: Power Analyses for Common Designs (Power to the People)
Description: Statistical power analysis for designs including t-tests, correlations, multiple regression, ANOVA, mediation, and logistic regression. Functions accompany Aberson (2019) <doi:10.4324/9781315171500>.
Authors: Chris Aberson
Maintainer: Chris Aberson <[email protected]>
License: GPL (>= 2)
Version: 0.5.0
Built: 2024-11-05 04:12:56 UTC
Source: https://github.com/chrisaberson/pwr2ppl

Help Index


Compute Power for One or Two Factor ANCOVA with a single covariate Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user Factor A can have up to four levels, Factor B, if used, can only be two

Description

Compute Power for One or Two Factor ANCOVA with a single covariate Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user Factor A can have up to four levels, Factor B, if used, can only be two

Usage

anc(
  m1.1,
  m2.1,
  m1.2,
  m2.2,
  m3.1 = NULL,
  m3.2 = NULL,
  m4.1 = NULL,
  m4.2 = NULL,
  s1.1 = NULL,
  s2.1 = NULL,
  s1.2 = NULL,
  s2.2 = NULL,
  s3.1 = NULL,
  s3.2 = NULL,
  s4.1 = NULL,
  s4.2 = NULL,
  r,
  s = NULL,
  alpha = 0.05,
  factors,
  levelsA = NULL,
  n
)

Arguments

m1.1

Cell mean for First level of Factor A, First level of Factor B

m2.1

Cell mean for Second level of Factor A, First level of Factor B

m1.2

Cell mean for First level of Factor A, Second level of Factor B

m2.2

Cell mean for Second level of Factor A, Second level of Factor B

m3.1

Cell mean for Third level of Factor A, First level of Factor B

m3.2

Cell mean for Third level of Factor A, Second level of Factor B

m4.1

Cell mean for Fourth level of Factor A, First level of Factor B

m4.2

Cell mean for Fourth level of Factor A, Second level of Factor B

s1.1

Cell standard deviation for First level of Factor A, First level of Factor B

s2.1

Cell standard deviation for Second level of Factor A, First level of Factor B

s1.2

Cell standard deviation for First level of Factor A, Second level of Factor B

s2.2

Cell standard deviation for Second level of Factor A, Second level of Factor B

s3.1

Cell standard deviation for Third level of Factor A, First level of Factor B

s3.2

Cell standard deviation for Third level of Factor A, Second level of Factor B

s4.1

Cell standard deviation for Fourth level of Factor A, First level of Factor B

s4.2

Cell standard deviation for Fourth level of Factor A, Second level of Factor B

r

Correlation between covariate and dependent variable.

s

Overall standard deviation. Sets all cell sds equal

alpha

Type I error (default is .05)

factors

Number of factors (1 or 2)

levelsA

levels for factor A (up to four)

n

Sample Size per cell

Value

Power for One or Two Factor ANCOVA with a single covariate

Examples

anc(m1.1=.85,m2.1=2.5, s1.1 = 1.7, s2.1=1,
m1.2=0.85, m2.2= 2.5, s1.2 = 1.7, s2.2=1,
m3.1=0.0,m3.2=2.5, s3.1 = 1.7, s3.2=1,
m4.1=0.6, m4.2 = 2.5, s4.1 = 1.7, s4.2=1, r= 0.4,
n=251, factors =2,levelsA = 4)

Compute power for a One Factor ANOVA with three levels. 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 ANOVA with three levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

anova1f_3(
  m1 = NULL,
  m2 = NULL,
  m3 = NULL,
  s1 = NULL,
  s2 = NULL,
  s3 = NULL,
  n1 = NULL,
  n2 = NULL,
  n3 = NULL,
  alpha = 0.05
)

Arguments

m1

Mean of first group

m2

Mean of second group

m3

Mean of third group

s1

Standard deviation of first group

s2

Standard deviation of second group

s3

Standard deviation of third group

n1

Sample size for first group

n2

Sample size for second group

n3

Sample size for third group

alpha

Type I error (default is .05)

Value

Power for the One Factor ANOVA

Examples

anova1f_3(m1=80, m2=82, m3=82, s1=10, s2=10, s3=10, n1=60, n2=60, n3=60)

Compute power for a One Factor ANOVA with three levels and contrasts. 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 ANOVA with three levels and contrasts. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

anova1f_3c(
  m1 = NULL,
  m2 = NULL,
  m3 = NULL,
  s1 = NULL,
  s2 = NULL,
  s3 = NULL,
  n1 = NULL,
  n2 = NULL,
  n3 = NULL,
  alpha = 0.05,
  c1 = 0,
  c2 = 0,
  c3 = 0
)

Arguments

m1

Mean of first group

m2

Mean of second group

m3

Mean of third group

s1

Standard deviation of first group

s2

Standard deviation of second group

s3

Standard deviation of third group

n1

Sample size for first group

n2

Sample size for second group

n3

Sample size for third group

alpha

Type I error (default is .05)

c1

Weight for Contrast 1 (default is 0)

c2

Weight for Contrast 2 (default is 0)

c3

Weight for Contrast 3 (default is 0)

Value

Power for the One Factor ANOVA

Examples

anova1f_3c(m1=80, m2=82, m3=82, s1=10, s2=10, s3=10,
n1=60, n2=60, n3=60, c1=2, c2=-1, c3=-1, alpha=.05)

Compute power for a One Factor Between Subjects ANOVA with four levels Takes means, sds, and sample sizes for each group

Description

Compute power for a One Factor Between Subjects ANOVA with four levels Takes means, sds, and sample sizes for each group

Usage

anova1f_4(
  m1 = NULL,
  m2 = NULL,
  m3 = NULL,
  m4 = NULL,
  s1 = NULL,
  s2 = NULL,
  s3 = NULL,
  s4 = NULL,
  n1 = NULL,
  n2 = NULL,
  n3 = NULL,
  n4 = NULL,
  alpha = 0.05
)

Arguments

m1

Mean of first group

m2

Mean of second group

m3

Mean of third group

m4

Mean of fourth group

s1

Standard deviation of first group

s2

Standard deviation of second group

s3

Standard deviation of third group

s4

Standard deviation of forth group

n1

Sample size for first group

n2

Sample size for second group

n3

Sample size for third group

n4

Sample size for fourth group

alpha

Type I error (default is .05)

Value

Power for the One Factor Between Subjects ANOVA

Examples

anova1f_4(m1=80, m2=82, m3=82, m4=86, s1=10, s2=10, s3=10,
s4=10, n1=60, n2=60, n3=60, n4=60)

Compute power for a One Factor ANOVA with four levels. 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 ANOVA with four levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

anova1f_4c(
  m1 = NULL,
  m2 = NULL,
  m3 = NULL,
  m4 = NULL,
  s1 = NULL,
  s2 = NULL,
  s3 = NULL,
  s4 = NULL,
  n1 = NULL,
  n2 = NULL,
  n3 = NULL,
  n4 = NULL,
  alpha = 0.05,
  c1 = 0,
  c2 = 0,
  c3 = 0,
  c4 = 0
)

Arguments

m1

Mean of first group

m2

Mean of second group

m3

Mean of third group

m4

Mean of fourth group

s1

Standard deviation of first group

s2

Standard deviation of second group

s3

Standard deviation of third group

s4

Standard deviation of forth group

n1

Sample size for first group

n2

Sample size for second group

n3

Sample size for third group

n4

Sample size for fourth group

alpha

Type I error (default is .05)

c1

Weight for Contrast 1 (default is 0)

c2

Weight for Contrast 2 (default is 0)

c3

Weight for Contrast 3 (default is 0)

c4

Weight for Contrast 4 (default is 0)

Examples

anova1f_4c(m1=80, m2=82, m3=82, m4=86, s1=10, s2=10,
s3=10, s4=10, n1=60, n2=60, n3=60, n4=60,
c1=1, c2=1, c3=-1, c4=-1, alpha=.05)
anova1f_4c(m1=80, m2=82, m3=82, m4=86, s1=10, s2=10,
s3=10, s4=10, n1=60, n2=60, n3=60, n4=60,
c1=1, c2=-1, c3=-0, c4=0, alpha=.05)
anova1f_4c(m1=80, m2=82, m3=82, m4=86, s1=10, s2=10,
s3=10, s4=10, n1=60, n2=60, n3=60, n4=60,
c1=0, c2=0, c3=1, c4=-1, alpha=.05)
#'@return Power for the One Factor ANOVA

Compute power for a Two by Two Between Subjects ANOVA. 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 Two by Two Between Subjects ANOVA. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

anova2x2(
  m1.1 = NULL,
  m1.2 = NULL,
  m2.1 = NULL,
  m2.2 = NULL,
  s1.1 = NULL,
  s1.2 = NULL,
  s2.1 = NULL,
  s2.2 = NULL,
  n1.1 = NULL,
  n1.2 = NULL,
  n2.1 = NULL,
  n2.2 = NULL,
  alpha = 0.05,
  all = "OFF"
)

Arguments

m1.1

Cell mean for First level of Factor A, First level of Factor B

m1.2

Cell mean for First level of Factor A, Second level of Factor B

m2.1

Cell mean for Second level of Factor A, First level of Factor B

m2.2

Cell mean for Second level of Factor A, Second level of Factor B

s1.1

Cell standard deviation for First level of Factor A, First level of Factor B

s1.2

Cell standard deviation for First level of Factor A, Second level of Factor B

s2.1

Cell standard deviation for Second level of Factor A, First level of Factor B

s2.2

Cell standard deviation for Second level of Factor A, Second level of Factor B

n1.1

Cell sample size for First level of Factor A, First level of Factor B

n1.2

Cell sample size for First level of Factor A, Second level of Factor B

n2.1

Cell sample size for Second level of Factor A, First level of Factor B

n2.2

Cell sample size for Second level of Factor A, Second level of Factor B

alpha

Type I error (default is .05)

all

Power(ALL) - Power for detecting all predictors in the model at once (default is "OFF")

Value

Power for the Two Factor ANOVA

Examples

anova2x2(m1.1=0.85, m1.2=0.85, m2.1=0.00, m2.2=0.60,
s1.1=1.7, s1.2=1.7, s2.1=1.7, s2.2=1.7,
n1.1=100, n1.2=100, n2.1=100, n2.2=100, alpha=.05)
anova2x2(m1.1=0.85, m1.2=0.85, m2.1=0.00, m2.2=0.60,
s1.1=1.7, s1.2=1.7, s2.1=1.7, s2.2=1.7,
n1.1=100, n1.2=100, n2.1=100, n2.2=100,
alpha=.05, all="ON")

Compute power for Simple Effects in a Two by Two Between Subjects ANOVA with two levels for each factor. 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 Simple Effects in a Two by Two Between Subjects ANOVA with two levels for each factor. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

anova2x2_se(
  m1.1 = NULL,
  m1.2 = NULL,
  m2.1 = NULL,
  m2.2 = NULL,
  s1.1 = NULL,
  s1.2 = NULL,
  s2.1 = NULL,
  s2.2 = NULL,
  n1.1 = NULL,
  n1.2 = NULL,
  n2.1 = NULL,
  n2.2 = NULL,
  alpha = 0.05
)

Arguments

m1.1

Cell mean for First level of Factor A, First level of Factor B

m1.2

Cell mean for First level of Factor A, Second level of Factor B

m2.1

Cell mean for Second level of Factor A, First level of Factor B

m2.2

Cell mean for Second level of Factor A, Second level of Factor B

s1.1

Cell standard deviation for First level of Factor A, First level of Factor B

s1.2

Cell standard deviation for First level of Factor A, Second level of Factor B

s2.1

Cell standard deviation for Second level of Factor A, First level of Factor B

s2.2

Cell standard deviation for Second level of Factor A, Second level of Factor B

n1.1

Cell sample size for First level of Factor A, First level of Factor B

n1.2

Cell sample size for First level of Factor A, Second level of Factor B

n2.1

Cell sample size for Second level of Factor A, First level of Factor B

n2.2

Cell sample size for Second level of Factor A, Second level of Factor B

alpha

Type I error (default is .05) examples anova2x2_se(m1.1=0.85, m1.2=0.85, m2.1=0.00, m2.2=0.60, s1.1=1.7, s1.2=1.7, s2.1=1.7, s2.2=1.7, n1.1=250, n1.2=250, n2.1=250, n2.2=250, alpha=.05)

Value

Power for Simple Effects Tests in a Two By Two ANOVA


Compute power for Multiple Regression with Violated assumptions (Beta)

Description

Compute power for Multiple Regression with Violated assumptions (Beta)

Usage

Assumptions(
  ry1 = NULL,
  ry2 = NULL,
  ry3 = NULL,
  ry4 = NULL,
  ry5 = NULL,
  r12 = NULL,
  r13 = NULL,
  r14 = NULL,
  r15 = NULL,
  r23 = NULL,
  r24 = NULL,
  r25 = NULL,
  r34 = NULL,
  r35 = NULL,
  r45 = NULL,
  sy = NULL,
  s1 = NULL,
  s2 = NULL,
  s3 = NULL,
  s4 = NULL,
  s5 = NULL,
  ky = NULL,
  k1 = NULL,
  k2 = NULL,
  k3 = NULL,
  k4 = NULL,
  k5 = NULL,
  n = NULL,
  alpha = 0.05,
  test = NULL,
  nruns = 500
)

Arguments

ry1

Correlation between DV (y) and first predictor (1)

ry2

Correlation between DV (y) and second predictor (2)

ry3

Correlation between DV (y) and third predictor (3)

ry4

Correlation between DV (y) and fourth predictor (4)

ry5

Correlation between DV (y) and fifth predictor (5)

r12

Correlation between first (1) and second predictor (2)

r13

Correlation between first (1) and third predictor (3)

r14

Correlation between first (1) and fourth predictor (4)

r15

Correlation between first (1) and fifth predictor (5)

r23

Correlation between second (2) and third predictor (3)

r24

Correlation between second (2) and fourth predictor (4)

r25

Correlation between second (2) and fifth predictor (5)

r34

Correlation between third (3) and fourth predictor (4)

r35

Correlation between third (3) and fifth predictor (5)

r45

Correlation between fourth (4) and fifth predictor (5)

sy

Skew of outcome variable

s1

Skew of first predictor

s2

Skew of second predictor

s3

Skew of third predictor

s4

Skew of fourth predictor

s5

Skew of fifth predictor

ky

Kurtosis of outcome variable

k1

Kurtosis of first predictor

k2

Kurtosis of second predictor

k3

Kurtosis of third predictor

k4

Kurtosis of fourth predictor

k5

Kurtosis of fifth predictor

n

Sample size

alpha

Type I error (default is .05)

test

type of test (none, sqrt, log, inv, robust, boot, quantile, hc0, hc1, hc2, hc3)

nruns

number of runs, default is 500

Value

Power for Resampled Multiple Regression with Non Normal Variables

Examples

Assumptions(ry1=.0,ry2=.3,r12=.3,sy=1,s1=2,s2=2,ky=1,k1=1,k2=1,n=100,nruns=20,test="sqrt")

Compute power for Multiple Regression with Violated assumptions using Resamples

Description

Compute power for Multiple Regression with Violated assumptions using Resamples

Usage

Assumptions_resample(
  ry1 = NULL,
  ry2 = NULL,
  ry3 = NULL,
  ry4 = NULL,
  ry5 = NULL,
  r12 = NULL,
  r13 = NULL,
  r14 = NULL,
  r15 = NULL,
  r23 = NULL,
  r24 = NULL,
  r25 = NULL,
  r34 = NULL,
  r35 = NULL,
  r45 = NULL,
  sy = NULL,
  s1 = NULL,
  s2 = NULL,
  s3 = NULL,
  s4 = NULL,
  s5 = NULL,
  ky = NULL,
  k1 = NULL,
  k2 = NULL,
  k3 = NULL,
  k4 = NULL,
  k5 = NULL,
  n = NULL,
  alpha = 0.05,
  test = "boot",
  reps = 200,
  boots = 500
)

Arguments

ry1

Correlation between DV (y) and first predictor (1)

ry2

Correlation between DV (y) and second predictor (2)

ry3

Correlation between DV (y) and third predictor (3)

ry4

Correlation between DV (y) and fourth predictor (4)

ry5

Correlation between DV (y) and fifth predictor (5)

r12

Correlation between first (1) and second predictor (2)

r13

Correlation between first (1) and third predictor (3)

r14

Correlation between first (1) and fourth predictor (4)

r15

Correlation between first (1) and fifth predictor (5)

r23

Correlation between second (2) and third predictor (3)

r24

Correlation between second (2) and fourth predictor (4)

r25

Correlation between second (2) and fifth predictor (5)

r34

Correlation between third (3) and fourth predictor (4)

r35

Correlation between third (3) and fifth predictor (5)

r45

Correlation between fourth (4) and fifth predictor (5)

sy

Skew of outcome variable

s1

Skew of first predictor

s2

Skew of second predictor

s3

Skew of third predictor

s4

Skew of fourth predictor

s5

Skew of fifth predictor

ky

Kurtosis of outcome variable

k1

Kurtosis of first predictor

k2

Kurtosis of second predictor

k3

Kurtosis of third predictor

k4

Kurtosis of fourth predictor

k5

Kurtosis of fifth predictor

n

Sample size

alpha

Type I error (default is .05)

test

type of test ("boot","jack","perm")

reps

number of replications, default is 200 - use larger for final analyses

boots

number of bootstrap samples. Default is 500. Use larger for final.

Value

Power for Multiple Regression with Non Normal Variables via resample

Examples

Assumptions_resample(ry1=.0,ry2=.3,r12=.3,sy=1,s1=2,s2=2,ky=1,k1=1,k2=1,n=100)

Compute power for an Chi Square 2x2 Takes proportions for each group. Alpha is .05 by default, alternative values may be entered by user

Description

Compute power for an Chi Square 2x2 Takes proportions for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

Chi2x2(r1c1, r1c2, r2c1, r2c2, n, alpha = 0.05)

Arguments

r1c1

Proportion of overall scores in Row 1, Column 1

r1c2

Proportion of overall scores in Row 1, Column 2

r2c1

Proportion of overall scores in Row 2, Column 1

r2c2

Proportion of overall scores in Row 2, Column 2

n

Total sample size

alpha

Type I error (default is .05)

Value

Power for 2x2 Chi Square

Examples

Chi2x2(r1c1=.28,r1c2=.22,r2c1=.38,r2c2=.12,n=100)

Compute power for an Chi Square 2x3 Takes proportions for each group. Alpha is .05 by default, alternative values may be entered by user

Description

Compute power for an Chi Square 2x3 Takes proportions for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

Chi2X3(r1c1, r1c2, r1c3, r2c1, r2c2, r2c3, n, alpha = 0.05)

Arguments

r1c1

Proportion of overall scores in Row 1, Column 1

r1c2

Proportion of overall scores in Row 1, Column 2

r1c3

Proportion of overall scores in Row 1, Column 3

r2c1

Proportion of overall scores in Row 2, Column 1

r2c2

Proportion of overall scores in Row 2, Column 2

r2c3

Proportion of overall scores in Row 2, Column 3

n

Total sample size

alpha

Type I error (default is .05)

Value

Power for 2x3 Chi Square

Examples

Chi2X3(r1c1=.25,r1c2=.25,r1c3=.10, r2c1=.10,r2c2=.25,r2c3=.05,n=200)

Compute power for Chi Square Based on Effect Size Takes phi, degrees of freedom, and a range of sample sizes. Alpha is .05 by default, alternative values may be entered by user

Description

Compute power for Chi Square Based on Effect Size Takes phi, degrees of freedom, and a range of sample sizes. Alpha is .05 by default, alternative values may be entered by user

Usage

ChiES(phi, df, nlow, nhigh, by = 1, alpha = 0.05)

Arguments

phi

phi coefficient (effect size for 2x2)

df

degrees of freedom

nlow

starting sample size

nhigh

ending sample size

by

Incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14)

alpha

Type I error (default is .05)

Value

Power for Chi Square Based on Effect Size

Examples

ChiES(phi=.3,df=1,nlow=10,nhigh=200,by=10, alpha = .01)

Compute power for an Chi Square Goodness of Fit Takes proportions for up to six group. Alpha is .05 by default, alternative values may be entered by user

Description

Compute power for an Chi Square Goodness of Fit Takes proportions for up to six group. Alpha is .05 by default, alternative values may be entered by user

Usage

ChiGOF(
  groups,
  po1,
  po2,
  po3 = NULL,
  po4 = NULL,
  po5 = NULL,
  po6 = NULL,
  n,
  alpha = 0.05
)

Arguments

groups

Number of groups

po1

Proportion observed Group 1

po2

Proportion observed Group 2

po3

Proportion observed Group 3

po4

Proportion observed Group 4

po5

Proportion observed Group 5

po6

Proportion observed Group 6

n

Total sample size

alpha

Type I error (default is .05)

Value

Power for Chi Square Goodness of Fit

Examples

ChiGOF(po1=.25, po2=.20, po3=.20, po4=.35, groups=4,n=100)

Compute power for Pearson's Correlation Takes correlation and range of values

Description

Compute power for Pearson's Correlation Takes correlation and range of values

Usage

corr(r, nlow, nhigh, alpha = 0.05, tails = 2, by = 1)

Arguments

r

Correlation

nlow

Starting sample size

nhigh

Ending sample size

alpha

Type I error (default is .05)

tails

one or two-tailed tests (default is 2)

by

Incremental increase in sample size from low to high

Value

Power for Pearson's Correlation

Examples

corr(r=.30, nlow=60, nhigh=100,by=2)

Compute Precision Analyses for Standardized Mean Differences

Description

Compute Precision Analyses for Standardized Mean Differences

Usage

d_prec(d, nlow, nhigh, propn1 = 0.5, ci = 0.95, tails = 2, by = 1)

Arguments

d

Standardized means difference between groups

nlow

starting total sample size

nhigh

ending total sample size

propn1

Proportion in First Group

ci

Type of Confidence Interval (e.g., .95)

tails

number of tails for test (default is 2)

by

Incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14)

Value

Precision Analyses for Standardized Mean Differences

Examples

d_prec(d=.4,nlow=100, nhigh=2000, propn1=.5, ci=.95, by=100)

Power for Comparing Dependent Coefficients in Multiple Regression with Two or Three Predictors Requires correlations between all variables as sample size. Means, sds, and alpha are option. Also computes Power(All)

Description

Power for Comparing Dependent Coefficients in Multiple Regression with Two or Three Predictors Requires correlations between all variables as sample size. Means, sds, and alpha are option. Also computes Power(All)

Usage

depb(ry1, ry2, ry3 = NULL, r12, r13 = NULL, r23 = NULL, n = NULL, alpha = 0.05)

Arguments

ry1

Correlation between DV (y) and first predictor (1)

ry2

Correlation between DV (y) and second predictor (2)

ry3

Correlation between DV (y) and third predictor (3)

r12

Correlation between first (1) and second predictor (2)

r13

Correlation between first (1) and third predictor (3)

r23

Correlation between second (2) and third predictor (3)

n

Total Sample size

alpha

Type I error (default is .05)

Value

Power for Comparing Dependent Coefficients in Multiple Regression with Two or Three Predictors

Examples

depb(ry1=.40, ry2=.40, ry3=-.40, r12=-.15, r13=-.60, r23=.25,n=110, alpha=.05)

Compute Power for Comparing Two Dependent Correlations, No Variables in Common Takes correlations and range of values. First variable in each pair is termed predictor, second is DV

Description

Compute Power for Comparing Two Dependent Correlations, No Variables in Common Takes correlations and range of values. First variable in each pair is termed predictor, second is DV

Usage

depcorr0(
  r12,
  rxy,
  r1x,
  r1y,
  r2x,
  r2y,
  nlow,
  nhigh,
  alpha = 0.05,
  tails = 2,
  by = 1
)

Arguments

r12

Correlation between the predictor and DV (first set of measures)

rxy

Correlation between the predictor and DV (second set of measures)

r1x

Correlation between the predictor (first measure) and the predictor variable (first measure)

r1y

Correlation between the predictor (first measure) and the dependent variable (second measure)

r2x

Correlation between the DV (first measure) and the predictor variable (first measure)

r2y

Correlation between the DV (first measure) and the dependent variable (second measure)

nlow

Starting sample size

nhigh

Ending sample size

alpha

Type I error (default is .05)

tails

one or two-tailed tests (default is 2)

by

Incremental increase in sample size from low to high

Value

Power for Comparing Two Dependent Correlations, No Variables in Common

Examples

depcorr0(r12=.4,rxy=.7,r1x=.3,r1y=.1,r2x=.45,r2y=.35,nlow=20,nhigh=200,by=10, tails=2)

Compute Power for Comparing Two Dependent Correlations, One Variable in Common Takes correlations and range of values

Description

Compute Power for Comparing Two Dependent Correlations, One Variable in Common Takes correlations and range of values

Usage

depcorr1(r1y, r2y, r12, nlow, nhigh, alpha = 0.05, tails = 2, by = 1)

Arguments

r1y

Correlation between the first predictor and the dependent variable

r2y

Correlation between the second predictor and the dependent variable

r12

Correlation between the first predictor and the second predictor

nlow

Starting sample size

nhigh

Ending sample size

alpha

Type I error (default is .05)

tails

one or two-tailed tests (default is 2)

by

Incremental increase in sample size from low to high

Value

Power for Comparing Dependent Correlations, One Variable in Common

Examples

depcorr1(r1y=.3,r2y=.04,r12 = .2, nlow=100,nhigh=300,by=10, tails=2)

Power for Comparing Independent Coefficients in Multiple Regression with Two or Three Predictors Requires correlations between all variables as sample size. Means, sds, and alpha are option. Also computes Power(All)

Description

Power for Comparing Independent Coefficients in Multiple Regression with Two or Three Predictors Requires correlations between all variables as sample size. Means, sds, and alpha are option. Also computes Power(All)

Usage

indb(
  ry1_1,
  ry2_1,
  ry3_1 = NULL,
  r12_1,
  r13_1 = NULL,
  r23_1 = NULL,
  n1,
  ry1_2,
  ry2_2,
  ry3_2 = NULL,
  r12_2,
  r13_2 = NULL,
  r23_2 = NULL,
  n2,
  alpha = 0.05
)

Arguments

ry1_1

Correlation between DV (y) and first predictor (1), first test

ry2_1

Correlation between DV (y) and second predictor (2), first test

ry3_1

Correlation between DV (y) and third predictor (3), first test

r12_1

Correlation between first (1) and second predictor (2), first test

r13_1

Correlation between first (1) and third predictor (3), first test

r23_1

Correlation between second (2) and third predictor (3), first test

n1

Sample size first test

ry1_2

Correlation between DV (y) and first predictor (1), second test

ry2_2

Correlation between DV (y) and second predictor (2), second test

ry3_2

Correlation between DV (y) and third predictor (3), second test

r12_2

Correlation between first (1) and second predictor (2), second test

r13_2

Correlation between first (1) and third predictor (3), second test

r23_2

Correlation between second (2) and third predictor (3), second test

n2

Sample size second test

alpha

Type I error (default is .05)

Value

Power for Comparing Independent Coefficients in Multiple Regression

Examples

indb(ry1_1=.40, ry2_1=.40, ry3_1 =-.40, r12_1=-.15,r13_1=-.60, r23_1=.25,
ry1_2=.40, ry2_2=.10, ry3_2 =-.40, r12_2=-.15,r13_2=-.60, r23_2=.25,
n1=50,n2=50, alpha=.05)

Compute Power for Comparing Two Independent Correlations Takes correlations and range of values

Description

Compute Power for Comparing Two Independent Correlations Takes correlations and range of values

Usage

indcorr(r1, r2, nlow, nhigh, propn1 = 0.5, alpha = 0.05, tails = 2, by = 1)

Arguments

r1

Correlation for Group 1

r2

Correlation for Group 2

nlow

Starting sample size

nhigh

Ending sample size

propn1

Proportion of sample in first group (default is .50 for equally size groups)

alpha

Type I error (default is .05)

tails

one or two-tailed tests (default is 2)

by

Incremental increase in sample size from low to high

Value

Power for Comparing Two Independent Correlations

Examples

indcorr(r1=.3,r2=.1,nlow=200,nhigh=800,by=50, tails=1)

Power for Comparing Independent R2 in Multiple Regression with Two or Three Predictors Requires correlations between all variables as sample size. Means, sds, and alpha are option. Also computes Power(All)

Description

Power for Comparing Independent R2 in Multiple Regression with Two or Three Predictors Requires correlations between all variables as sample size. Means, sds, and alpha are option. Also computes Power(All)

Usage

indR2(
  ry1_1,
  ry2_1,
  ry3_1 = NULL,
  r12_1,
  r13_1 = NULL,
  r23_1 = NULL,
  n1,
  ry1_2,
  ry2_2,
  ry3_2 = NULL,
  r12_2,
  r13_2 = NULL,
  r23_2 = NULL,
  n2,
  alpha = 0.05,
  tails = 2
)

Arguments

ry1_1

Correlation between DV (y) and first predictor (1), first test

ry2_1

Correlation between DV (y) and second predictor (2), first test

ry3_1

Correlation between DV (y) and third predictor (3), first test

r12_1

Correlation between first (1) and second predictor (2), first test

r13_1

Correlation between first (1) and third predictor (3), first test

r23_1

Correlation between second (2) and third predictor (3), first test

n1

Sample size first test

ry1_2

Correlation between DV (y) and first predictor (1), second test

ry2_2

Correlation between DV (y) and second predictor (2), second test

ry3_2

Correlation between DV (y) and third predictor (3), second test

r12_2

Correlation between first (1) and second predictor (2), second test

r13_2

Correlation between first (1) and third predictor (3), second test

r23_2

Correlation between second (2) and third predictor (3), second test

n2

Sample size second test

alpha

Type I error (default is .05)

tails

number of tails for test (default is 2)

Value

Power for Comparing R2 Coefficients in Multiple Regression

Examples

indR2(ry1_1=.40, ry2_1=.40, ry3_1 =-.40, r12_1=-.15,r13_1=-.60, r23_1=.25,
ry1_2=.40, ry2_2=.10, ry3_2 =-.40, r12_2=-.15,r13_2=-.60, r23_2=.25,
n1=115,n2=115, alpha=.05)

Compute power for an Independent Samples t-test 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 an Independent Samples t-test Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

indt(
  m1 = NULL,
  m2 = NULL,
  s1 = NULL,
  s2 = NULL,
  n1 = NULL,
  n2 = NULL,
  alpha = 0.05
)

Arguments

m1

Mean of first group

m2

Mean of second group

s1

Standard deviation of first group

s2

Standard deviation of second group

n1

Sample size for first group

n2

Sample size for second group

alpha

Type I error (default is .05)

Value

Power for Independent Samples t-test

Examples

indt(m1=22,m2=20,s1=5,s2=5,n1=99,n2=99)
indt(m1=1.3, m2=0, s1=4,s2=1,n1=78,n2=234)

Compute power for a One Factor Within Subjects Linear Mixed Model with up to four levels. 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 Linear Mixed Model with up to four levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

lmm1F(
  m1,
  m2,
  m3 = NA,
  m4 = NA,
  s1,
  s2,
  s3 = NULL,
  s4 = NULL,
  r12,
  r13 = NULL,
  r14 = NULL,
  r23 = NULL,
  r24 = NULL,
  r34 = NULL,
  n,
  alpha = 0.05
)

Arguments

m1

Mean of first time point

m2

Mean of second time point

m3

Mean of third time point

m4

Mean of fourth time point

s1

Standard deviation of first time point

s2

Standard deviation of second time point

s3

Standard deviation of third time point

s4

Standard deviation of forth time point

r12

correlation Time 1 and Time 2

r13

correlation Time 1 and Time 3

r14

correlation Time 1 and Time 4

r23

correlation Time 2 and Time 3

r24

correlation Time 2 and Time 4

r34

correlation Time 3 and Time 4

n

Sample size for first group

alpha

Type I error (default is .05)

Value

Power for the One Factor Within Subjects Linear Mixed Model

Examples

lmm1F(m1=-.25,m2=.00,m3=.10,m4=.15,s1=.4,s2=.5,s3=.6,s4=.7,
r12=.50, r13=.30, r14=.15, r23=.5, r24=.30, r34=.50, n=25)
lmm1F(m1=-.25,m2=.00,m3=.10,m4=.15,s1=.4,s2=.5,s3=2.5,s4=2.0,
r12=.50, r13=.30, r14=.10, r23=.5, r24=.30, r34=.40, n=100)

Compute power for a One Factor Within Subjects LMM Trends with up to four levels. 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 LMM Trends with up to four levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

lmm1Ftrends(
  m1,
  m2,
  m3 = NA,
  m4 = NA,
  s1,
  s2,
  s3 = NULL,
  s4 = NULL,
  r12,
  r13 = NULL,
  r14 = NULL,
  r23 = NULL,
  r24 = NULL,
  r34 = NULL,
  n,
  alpha = 0.05
)

Arguments

m1

Mean of first time point

m2

Mean of second time point

m3

Mean of third time point

m4

Mean of fourth time point

s1

Standard deviation of first time point

s2

Standard deviation of second time point

s3

Standard deviation of third time point

s4

Standard deviation of forth time point

r12

correlation Time 1 and Time 2

r13

correlation Time 1 and Time 3

r14

correlation Time 1 and Time 4

r23

correlation Time 2 and Time 3

r24

correlation Time 2 and Time 4

r34

correlation Time 3 and Time 4

n

Sample size for first group

alpha

Type I error (default is .05)

Value

Power for the One Factor Within Subjects LMM Trends

Examples

lmm1Ftrends(m1=-.25,m2=-.15,m3=-.05,m4=.05,s1=.4,s2=.5,s3=.6,s4=.7,
r12=.50, r13=.30, r14=.15, r23=.5, r24=.30, r34=.50, n=25)

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)

Compute power for a Two Factor Within Subjects Using Linear Mixed Models with up to two by four levels. 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 Two Factor Within Subjects Using Linear Mixed Models with up to two by four levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

lmm2F(
  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,
  r12 = NULL,
  r13 = NULL,
  r14 = NULL,
  r15 = NULL,
  r16 = NULL,
  r17 = NULL,
  r18 = NULL,
  r23 = NULL,
  r24 = NULL,
  r25 = NULL,
  r26 = NULL,
  r27 = NULL,
  r28 = NULL,
  r34 = NULL,
  r35 = NULL,
  r36 = NULL,
  r37 = NULL,
  r38 = NULL,
  r45 = NULL,
  r46 = NULL,
  r47 = NULL,
  r48 = NULL,
  r56 = NULL,
  r57 = NULL,
  r58 = NULL,
  r67 = NULL,
  r68 = NULL,
  r78 = NULL,
  r = NULL,
  s = NULL,
  n,
  alpha = 0.05
)

Arguments

m1.1

Mean of first level factor 1, 1st level factor two

m2.1

Mean of second level factor 1, 1st level factor two

m3.1

Mean of third level factor 1, 1st level factor two

m4.1

Mean of fourth level factor 1, 1st level factor two

m1.2

Mean of first level factor 1, 2nd level factor two

m2.2

Mean of second level factor 1, 2nd level factor two

m3.2

Mean of third level factor 1, 2nd level factor two

m4.2

Mean of fourth level factor 1, 2nd level factor two

s1.1

Standard deviation of first level factor 1, 1st level factor two

s2.1

Standard deviation of second level factor 1, 1st level factor two

s3.1

Standard deviation of third level factor 1, 1st level factor two

s4.1

Standard deviation of forth level factor 1, 1st level factor two

s1.2

Standard deviation of first level factor 1, 2nd level factor two

s2.2

Standard deviation of second level factor 1, 2nd level factor two

s3.2

Standard deviation of third level factor 1, 2nd level factor two

s4.2

Standard deviation of forth level factor 1, 2nd level factor two

r12

correlation Factor 1, Level 1 and Factor 1, Level 2

r13

correlation Factor 1, Level 1 and Factor 1, Level 3

r14

correlation Factor 1, Level 1 and Factor 1, Level 4

r15

correlation Factor 1, Level 1 and Factor 2, Level 1

r16

correlation Factor 1, Level 1 and Factor 2, Level 2

r17

correlation Factor 1, Level 1 and Factor 2, Level 3

r18

correlation Factor 1, Level 1 and Factor 2, Level 4

r23

correlation Factor 1, Level 2 and Factor 1, Level 3

r24

correlation Factor 1, Level 2 and Factor 1, Level 4

r25

correlation Factor 1, Level 2 and Factor 2, Level 1

r26

correlation Factor 1, Level 2 and Factor 2, Level 2

r27

correlation Factor 1, Level 2 and Factor 2, Level 3

r28

correlation Factor 1, Level 2 and Factor 2, Level 4

r34

correlation Factor 1, Level 3 and Factor 1, Level 4

r35

correlation Factor 1, Level 3 and Factor 2, Level 1

r36

correlation Factor 1, Level 3 and Factor 2, Level 2

r37

correlation Factor 1, Level 3 and Factor 2, Level 3

r38

correlation Factor 1, Level 3 and Factor 2, Level 4

r45

correlation Factor 1, Level 4 and Factor 2, Level 1

r46

correlation Factor 1, Level 4 and Factor 2, Level 2

r47

correlation Factor 1, Level 4 and Factor 2, Level 3

r48

correlation Factor 1, Level 4 and Factor 2, Level 4

r56

correlation Factor 2, Level 1 and Factor 2, Level 2

r57

correlation Factor 2, Level 1 and Factor 2, Level 3

r58

correlation Factor 2, Level 1 and Factor 2, Level 4

r67

correlation Factor 2, Level 2 and Factor 2, Level 3

r68

correlation Factor 2, Level 2 and Factor 2, Level 4

r78

correlation Factor 2, Level 3 and Factor 2, Level 4

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

Sample size for first group

alpha

Type I error (default is .05)

Value

Power for the Two Factor Within Subjects LMM

Examples

lmm2F(m1.1=-.25,m2.1=0,m1.2=-.25,m2.2=.10,s1.1=.4,s2.1=.5,s1.2=.4,s2.2=.5,r=.5,n=200)

Compute power for a Two Factor Within Subjects Using Linear Mixed Models with up to two by four levels. 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 Two Factor Within Subjects Using Linear Mixed Models with up to two by four levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

lmm2Fse(
  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,
  r12 = NULL,
  r13 = NULL,
  r14 = NULL,
  r15 = NULL,
  r16 = NULL,
  r17 = NULL,
  r18 = NULL,
  r23 = NULL,
  r24 = NULL,
  r25 = NULL,
  r26 = NULL,
  r27 = NULL,
  r28 = NULL,
  r34 = NULL,
  r35 = NULL,
  r36 = NULL,
  r37 = NULL,
  r38 = NULL,
  r45 = NULL,
  r46 = NULL,
  r47 = NULL,
  r48 = NULL,
  r56 = NULL,
  r57 = NULL,
  r58 = NULL,
  r67 = NULL,
  r68 = NULL,
  r78 = NULL,
  r = NULL,
  s = NULL,
  n,
  alpha = 0.05
)

Arguments

m1.1

Mean of first level factor 1, 1st level factor two

m2.1

Mean of second level factor 1, 1st level factor two

m3.1

Mean of third level factor 1, 1st level factor two

m4.1

Mean of fourth level factor 1, 1st level factor two

m1.2

Mean of first level factor 1, 2nd level factor two

m2.2

Mean of second level factor 1, 2nd level factor two

m3.2

Mean of third level factor 1, 2nd level factor two

m4.2

Mean of fourth level factor 1, 2nd level factor two

s1.1

Standard deviation of first level factor 1, 1st level factor two

s2.1

Standard deviation of second level factor 1, 1st level factor two

s3.1

Standard deviation of third level factor 1, 1st level factor two

s4.1

Standard deviation of forth level factor 1, 1st level factor two

s1.2

Standard deviation of first level factor 1, 2nd level factor two

s2.2

Standard deviation of second level factor 1, 2nd level factor two

s3.2

Standard deviation of third level factor 1, 2nd level factor two

s4.2

Standard deviation of forth level factor 1, 2nd level factor two

r12

correlation Factor 1, Level 1 and Factor 1, Level 2

r13

correlation Factor 1, Level 1 and Factor 1, Level 3

r14

correlation Factor 1, Level 1 and Factor 1, Level 4

r15

correlation Factor 1, Level 1 and Factor 2, Level 1

r16

correlation Factor 1, Level 1 and Factor 2, Level 2

r17

correlation Factor 1, Level 1 and Factor 2, Level 3

r18

correlation Factor 1, Level 1 and Factor 2, Level 4

r23

correlation Factor 1, Level 2 and Factor 1, Level 3

r24

correlation Factor 1, Level 2 and Factor 1, Level 4

r25

correlation Factor 1, Level 2 and Factor 2, Level 1

r26

correlation Factor 1, Level 2 and Factor 2, Level 2

r27

correlation Factor 1, Level 2 and Factor 2, Level 3

r28

correlation Factor 1, Level 2 and Factor 2, Level 4

r34

correlation Factor 1, Level 3 and Factor 1, Level 4

r35

correlation Factor 1, Level 3 and Factor 2, Level 1

r36

correlation Factor 1, Level 3 and Factor 2, Level 2

r37

correlation Factor 1, Level 3 and Factor 2, Level 3

r38

correlation Factor 1, Level 3 and Factor 2, Level 4

r45

correlation Factor 1, Level 4 and Factor 2, Level 1

r46

correlation Factor 1, Level 4 and Factor 2, Level 2

r47

correlation Factor 1, Level 4 and Factor 2, Level 3

r48

correlation Factor 1, Level 4 and Factor 2, Level 4

r56

correlation Factor 2, Level 1 and Factor 2, Level 2

r57

correlation Factor 2, Level 1 and Factor 2, Level 3

r58

correlation Factor 2, Level 1 and Factor 2, Level 4

r67

correlation Factor 2, Level 2 and Factor 2, Level 3

r68

correlation Factor 2, Level 2 and Factor 2, Level 4

r78

correlation Factor 2, Level 3 and Factor 2, Level 4

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

Sample size for first group

alpha

Type I error (default is .05)

Value

Power for Simple Effects in Two Factor Within Subjects LMM

Examples

lmm2Fse(m1.1=-.25,m2.1=0,m3.1=.10,m4.1=.15,m1.2=-.25,m2.2=.10,m3.2=.30,m4.2=.35,
s1.1=.4,s2.1=.5,s3.1=2.5,s4.1=2.0,s1.2=.4,s2.2=.5,s3.2=2.5,s4.2=2.0,r=.5,n=220)

Compute Power for Logistic Regression with a Single Categorical Predictor

Description

Compute Power for Logistic Regression with a Single Categorical Predictor

Usage

LRcat(p0 = NULL, p1 = NULL, prop = 0.5, alpha = 0.05, power, R2 = 0)

Arguments

p0

Probability of a Desirable Outcome in the Control Condition

p1

Probability of a Desirable Outcome in the Treatment Condition

prop

Proportion in the Treatment Condition

alpha

Type I error (default is .05)

power

Desired Power

R2

How Well Predictor of Interest is Explained by Other Predictors (default is 0)

Value

Power for Logistic Regression with a Single Categorical Predictor

Examples

LRcat(p0=.137,p1=.611,prop =.689,power=.95)

Compute Power for Logistic Regression with Continuous Predictors

Description

Compute Power for Logistic Regression with Continuous Predictors

Usage

LRcont(OR = NA, r = NA, ER = NULL, alpha = 0.05, power = NULL, R2 = 0)

Arguments

OR

Odds Ratio for Predictor of Interest

r

Correlation for Predictor of Interest

ER

Event Ratio Probability of a Desirable Outcome Overall

alpha

Type I error (default is .05)

power

Desired Power

R2

How Well Predictor of Interest is Explained by Other Predictors (default is 0)

Value

Power for Logistic Regression with Continuous Predictors

Examples

LRcont(OR = 4.05, ER = .463,power=.95)

Compute power for a One Factor MANOVA with up to two levels and up to four measures. 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 MANOVA with up to two levels and up to four measures. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

MANOVA1f(
  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 DV, 1st level Between Factor

m2.1

Mean of second DV, 1st level Between Factor

m3.1

Mean of third DV, 1st level Between Factor

m4.1

Mean of fourth DV, 1st level Between Factor

m1.2

Mean of first DV, 2nd level Between Factor

m2.2

Mean of second DV, 2nd level Between Factor

m3.2

Mean of third DV, 2nd level Between Factor

m4.2

Mean of fourth DV, 2nd level Between Factor

s1.1

Standard deviation of first DV, 1st level Between Factor

s2.1

Standard deviation of second DV, 1st level Between Factor

s3.1

Standard deviation of third DV, 1st level Between Factor

s4.1

Standard deviation of forth DV, 1st level Between Factor

s1.2

Standard deviation of first DV, 2nd level Between Factor

s2.2

Standard deviation of second DV, 2nd level Between Factor

s3.2

Standard deviation of third DV, 2nd level Between Factor

s4.2

Standard deviation of forth DV, 2nd level Between Factor

r1.2_1

correlation DV 1 and DV 2, 1st level Between

r1.3_1

correlation DV 1 and DV 3, 1st level Between

r1.4_1

correlation DV 1 and DV 4, 1st level Between

r2.3_1

correlation DV 1 and DV 3, 1st level Between

r2.4_1

correlation DV 1 and DV 4, 1st level Between

r3.4_1

correlation DV 1 and DV 4, 1st level Between

r1.2_2

correlation DV 1 and DV 2, 2nd level Between

r1.3_2

correlation DV 1 and DV 3, 2nd level Between

r1.4_2

correlation DV 1 and DV 4, 2nd level Between

r2.3_2

correlation DV 1 and DV 3, 2nd level Between

r2.4_2

correlation DV 1 and DV 4, 2nd level Between

r3.4_2

correlation DV 1 and DV 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

Sample size for first group

alpha

Type I error (default is .05)

Value

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

Examples

MANOVA1f(n=40,m1.1=0,m2.1=1,m3.1=2.4,m4.1=-0.7,
m1.2=-0.25,m2.2=-2,m3.2=2,m4.2=-1,
s1.1=.4,s2.1=5,s3.1=1.6,s4.1=1.2,
s1.2=.4,s2.2=5,s3.2=1.6,s4.2=1.2,
r1.2_1=.1,r1.3_1=.1,r1.4_1=.1,
r2.3_1=.35,r2.4_1=.45,r3.4_1=.40,
r1.2_2=.1,r1.3_2=.1,r1.4_2=.1,
r2.3_2=.35,r2.4_2=.45,r3.4_2=.40,alpha=.05)
MANOVA1f(n=40,m1.1=0,m2.1=1,m3.1=2.4,m4.1=-0.7,
m1.2=-0.25,m2.2=-2,m3.2=2,m4.2=-1,
s=.4,r=.5,alpha=.05)

Compute Precision Analyses for Mean Differences

Description

Compute Precision Analyses for Mean Differences

Usage

md_prec(m1, m2, s1, s2, nlow, nhigh, propn1 = 0.5, ci = 0.95, by = 1)

Arguments

m1

Mean of first group

m2

Mean of second group

s1

Standard deviation of first group

s2

Standard deviation of second group

nlow

starting sample size

nhigh

ending sample size

propn1

Proportion in First Group

ci

Type of Confidence Interval (e.g., .95)

by

Incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14)

Value

Precision Analyses for Mean Differences

Examples

md_prec(m1=2,m2 =0, s1=5, s2=5,nlow=100, nhigh =1600, propn1=.5, ci=.95, by=100)
md_prec(m1=0,m2 =0, s1=5, s2=5,nlow=100, nhigh =40000, propn1=.5, ci=.95, by=1000)

Compute Power for Mediated (Indirect) Effects Requires correlations between all variables as sample size. This approach calculates power for the Sobel test. The medjs function calculates power based on joint significance (recommended)

Description

Compute Power for Mediated (Indirect) Effects Requires correlations between all variables as sample size. This approach calculates power for the Sobel test. The medjs function calculates power based on joint significance (recommended)

Usage

med(
  rxm1,
  rxm2 = 0,
  rxm3 = 0,
  rxm4 = 0,
  rxy,
  rym1,
  rym2 = 0,
  rym3 = 0,
  rym4 = 0,
  rm1m2 = 0,
  rm1m3 = 0,
  rm1m4 = 0,
  rm2m3 = 0,
  rm2m4 = 0,
  rm3m4 = 0,
  alpha = 0.05,
  mvars,
  n
)

Arguments

rxm1

Correlation between predictor (x) and first mediator (m1)

rxm2

Correlation between predictor (x) and second mediator (m2)

rxm3

Correlation between predictor (x) and third mediator (m3)

rxm4

Correlation between predictor (x) and fourth mediator (m4)

rxy

Correlation between DV (y) and predictor (x)

rym1

Correlation between DV (y) and first mediator (m1)

rym2

Correlation between DV (y) and second mediator (m2)

rym3

Correlation DV (y) and third mediator (m3)

rym4

Correlation DV (y) and fourth mediator (m4)

rm1m2

Correlation first mediator (m1) and second mediator (m2)

rm1m3

Correlation first mediator (m1) and third mediator (m3)

rm1m4

Correlation first mediator (m1) and fourth mediator (m4)

rm2m3

Correlation second mediator (m2) and third mediator (m3)

rm2m4

Correlation second mediator (m2) and fourth mediator (m4)

rm3m4

Correlation third mediator (m3) and fourth mediator (m4)

alpha

Type I error (default is .05)

mvars

Number of Mediators

n

Sample size

Value

Power for Mediated (Indirect) Effects

Examples

med(rxm1=.25, rxy=-.35, rym1=-.5,mvars=1, n=150)
med(rxm1=.3, rxm2=.3, rxm3=.25, rxy=-.35, rym1=-.5,rym2=-.5, rym3 = -.5,
rm1m2=.7, rm1m3=.4,rm2m3=.4, mvars=3, n=150)

Compute Power for Mediated (Indirect) Effects Using Joint Significance Requires correlations between all variables as sample size. This is the recommended approach for determining power

Description

Compute Power for Mediated (Indirect) Effects Using Joint Significance Requires correlations between all variables as sample size. This is the recommended approach for determining power

Usage

medjs(
  rx1x2 = NULL,
  rx1m1,
  rx1m2 = NULL,
  rx1m3 = NULL,
  rx1m4 = NULL,
  rx1y,
  rx2m1 = NULL,
  rx2m2 = NULL,
  rx2m3 = NULL,
  rx2m4 = NULL,
  rx2y,
  rym1,
  rym2 = NULL,
  rym3 = NULL,
  rym4 = NULL,
  rm1m2 = NULL,
  rm1m3 = NULL,
  rm1m4 = NULL,
  rm2m3 = NULL,
  rm2m4 = NULL,
  rm3m4 = NULL,
  n,
  alpha = 0.05,
  mvars,
  rep = 1000,
  pred = 1
)

Arguments

rx1x2

Correlation between first predictor (x1) and second predictor (x2)

rx1m1

Correlation between first predictor (x1) and first mediator (m1)

rx1m2

Correlation between first predictor (x1) and second mediator (m2)

rx1m3

Correlation between first predictor (x1) and third mediator (m3)

rx1m4

Correlation between first predictor (x1) and fourth mediator (m4)

rx1y

Correlation between DV (y) and first predictor (x1)

rx2m1

Correlation between second predictor (x2) and first mediator (m1)

rx2m2

Correlation between second predictor (x2) and second mediator (m2)

rx2m3

Correlation between second predictor (x2) and third mediator (m3)

rx2m4

Correlation between second predictor (x2) and fourth mediator (m4)

rx2y

Correlation between DV (y) and second predictor (x2)

rym1

Correlation between DV (y) and first mediator (m1)

rym2

Correlation between DV (y) and second mediator (m2)

rym3

Correlation DV (y) and third mediator (m3)

rym4

Correlation DV (y) and fourth mediator (m4)

rm1m2

Correlation first mediator (m1) and second mediator (m2)

rm1m3

Correlation first mediator (m1) and third mediator (m3)

rm1m4

Correlation first mediator (m1) and fourth mediator (m4)

rm2m3

Correlation second mediator (m2) and third mediator (m3)

rm2m4

Correlation second mediator (m2) and fourth mediator (m4)

rm3m4

Correlation third mediator (m3) and fourth mediator (m4)

n

Sample size

alpha

Type I error (default is .05)

mvars

Number of Mediators

rep

number of repetitions (1000 is default)

pred

number of predictors (default is one)

Value

Power for Mediated (Indirect) Effects

Examples

medjs(rx1m1=.3, rx1m2=.3, rx1m3=.25, rx1y=-.35, rym1=-.5,rym2=-.5, rym3 = -.5,
rm1m2=.7, rm1m3=.4,rm2m3=.4, mvars=3, n=150)

Compute Power for Mediated (Indirect) Effects Using Joint Significance Requires paths for all effects (and if 2 mediators, correlation) Standard deviations/variances set to 1.0 so paths are technically standardized

Description

Compute Power for Mediated (Indirect) Effects Using Joint Significance Requires paths for all effects (and if 2 mediators, correlation) Standard deviations/variances set to 1.0 so paths are technically standardized

Usage

medjs_paths(
  a1,
  a2 = NULL,
  b1,
  b2 = NULL,
  rm1m2 = NULL,
  cprime,
  n,
  alpha = 0.05,
  mvars,
  rep = 1000
)

Arguments

a1

path between predictor and first mediator

a2

path between predictor and first mediator

b1

Path between first mediator and dependent variable

b2

Path between first mediator and dependent variable

rm1m2

Correlation first mediator (m1) and second mediator (m2)

cprime

Path between predictor and dependent variable

n

Sample size

alpha

Type I error (default is .05)

mvars

Number of Mediators

rep

number of repetitions (1000 is default)

Value

Power for Mediated (Indirect) Effects using Paths Coefficients

Examples

medjs_paths(a1=.25, b1=-.5,cprime=.2,mvars=1, n=150)
medjs_paths(a1=.25, a2=.1, b1=-.5,b2=-.2,cprime=.2,mvars=1, n=150)

Compute Power for Serial Mediation Effects Requires correlations between all variables as sample size. This approach calculates power for the serial mediation using joint significance (recommended)

Description

Compute Power for Serial Mediation Effects Requires correlations between all variables as sample size. This approach calculates power for the serial mediation using joint significance (recommended)

Usage

medserial(rxm1, rxm2, rxy, rm1m2, rym1, rym2, n, alpha = 0.05, rep = 1000)

Arguments

rxm1

Correlation between predictor (x) and first mediator (m1)

rxm2

Correlation between predictor (x) and second mediator (m2)

rxy

Correlation between DV (y) and predictor (x)

rm1m2

Correlation first mediator (m1) and second mediator (m2)

rym1

Correlation between DV (y) and first mediator (m1)

rym2

Correlation between DV (y) and second mediator (m2)

n

sample size

alpha

Type I error (default is .05)

rep

number of repetitions (1000 is default)

Value

Power for Serial Mediated (Indirect) Effects

Examples

medserial(rxm1=.3, rxm2=.3, rxy=-.35,
rym1=-.5,rym2=-.5, rm1m2=.7,n=150)

Compute Power for Serial Mediation Effects Requires correlations between all variables as sample size. This approach calculates power for the serial mediation using joint significance (recommended) and path coefficients

Description

Compute Power for Serial Mediation Effects Requires correlations between all variables as sample size. This approach calculates power for the serial mediation using joint significance (recommended) and path coefficients

Usage

medserial_paths(a1, a2, b1, b2, d, cprime, n, alpha = 0.05, reps = 1000)

Arguments

a1

path between predictor and first mediator

a2

path between predictor and first mediator

b1

Path between first mediator and dependent variable

b2

Path between first mediator and dependent variable

d

Path first mediator (m1) and second mediator (m2)

cprime

Path between predictor and dependent variable

n

Sample size

alpha

Type I error (default is .05)

reps

number of repetitions (1000 is default)

Value

Power for Serial Mediated (Indirect) Effects

Examples

medserial_paths(a1=.3, a2=.3, b1=.35,
b2=.3,d=.2,cprime=.1,n=150)

Compute Power for Conditional Process Model 14 Joint Significance Requires correlations between all variables as sample size. This is the recommended approach for determining power

Description

Compute Power for Conditional Process Model 14 Joint Significance Requires correlations between all variables as sample size. This is the recommended approach for determining power

Usage

modmed14(
  rxw,
  rxm,
  rxxw = 0,
  rxy,
  rwm = 0,
  rxww = 0,
  rwy,
  rxwm = 0,
  rxwy,
  rmy,
  n,
  alpha = 0.05,
  rep = 5000
)

Arguments

rxw

Correlation between predictor (x) and moderator (w)

rxm

Correlation between predictor (x) and mediator (m)

rxxw

Correlation between predictor (x) and xweraction term (xw) - defaults to 0

rxy

Correlation between DV (y) and predictor (x)

rwm

Correlation between moderator (w) and mediator (m)

rxww

Correlation between moderator (w) and xweraction (xw) - defaults to 0

rwy

Correlation between DV (y) and moderator (w)

rxwm

Correlation between mediator (m) and xweraction (xw) - Key value

rxwy

Correlation between DV (y) and xweraction (xw) - defaults to 0

rmy

Correlation between DV (y) and mediator (m)

n

Sample size

alpha

Type I error (default is .05)

rep

Number of samples drawn (defaults to 5000)

Value

Power for Model 14 Conditional Processes

Examples

modmed14(rxw=.2, rxm=.2, rxy=.31,rwy=.35, rxwy=.2,
rmy=.32, n=200, rep=1000,alpha=.05)

Compute Power for Model 7 Conditional Processes Using Joint Significance Requires correlations between all variables as sample size Several values default to zero if no value provided This is the recommended approach for determining power

Description

Compute Power for Model 7 Conditional Processes Using Joint Significance Requires correlations between all variables as sample size Several values default to zero if no value provided This is the recommended approach for determining power

Usage

modmed7(
  rxm,
  rxw,
  rxxw = 0,
  rxy,
  rwm,
  rwxw = 0,
  rwy = 0,
  rmxw,
  rmy,
  rxwy = 0,
  alpha = 0.05,
  rep = 1000,
  n = NULL
)

Arguments

rxm

Correlation between predictor (x) and mediator (m)

rxw

Correlation between predictor (x) and moderator (w)

rxxw

Correlation between predictor (x) and interaction term (xw) - defaults to 0

rxy

Correlation between DV (y) and predictor (x)

rwm

Correlation between moderator (w) and mediator (m)

rwxw

Correlation between moderator (w) and interaction (xw) - defaults to 0

rwy

Correlation between DV (y) and moderator (w)

rmxw

Correlation between mediator (m) and interaction (xw) - Key value

rmy

Correlation between DV (y) and mediator (m)

rxwy

Correlation between DV (y) and interaction (xw) - defaults to 0

alpha

Type I error (default is .05)

rep

Number of samples drawn (defaults to 5000)

n

Sample size

Value

Power for Model 7 Conditional Processes

Examples

modmed7(rxm=.4, rxw=.2, rxy=.3, rwm=.2, rmxw=.1, rmy=.3,n=200)

Compute power for Multiple Regression with up to Five Predictors Example code below for three predictors. Expand as needed for four or five

Description

Compute power for Multiple Regression with up to Five Predictors Example code below for three predictors. Expand as needed for four or five

Usage

MRC(
  ry1 = NULL,
  ry2 = NULL,
  ry3 = NULL,
  ry4 = NULL,
  ry5 = NULL,
  r12 = NULL,
  r13 = NULL,
  r14 = NULL,
  r15 = NULL,
  r23 = NULL,
  r24 = NULL,
  r25 = NULL,
  r34 = NULL,
  r35 = NULL,
  r45 = NULL,
  n = NULL,
  alpha = 0.05
)

Arguments

ry1

Correlation between DV (y) and first predictor (1)

ry2

Correlation between DV (y) and second predictor (2)

ry3

Correlation between DV (y) and third predictor (3)

ry4

Correlation between DV (y) and fourth predictor (4)

ry5

Correlation between DV (y) and fifth predictor (5)

r12

Correlation between first (1) and second predictor (2)

r13

Correlation between first (1) and third predictor (3)

r14

Correlation between first (1) and fourth predictor (4)

r15

Correlation between first (1) and fifth predictor (5)

r23

Correlation between second (2) and third predictor (3)

r24

Correlation between second (2) and fourth predictor (4)

r25

Correlation between second (2) and fifth predictor (5)

r34

Correlation between third (3) and fourth predictor (4)

r35

Correlation between third (3) and fifth predictor (5)

r45

Correlation between fourth (4) and fifth predictor (5)

n

Sample size

alpha

Type I error (default is .05)

Value

Power for Multiple Regression with Two to Five Predictors

Examples

MRC(ry1=.40,ry2=.40, r12=-.15,n=30)
MRC(ry1=.40,ry2=.40,ry3=-.40, r12=-.15, r13=-.60,r23=.25,n=24)

Compute power for Multiple Regression with Up to Five Predictors Requires correlations between all variables as sample size. Means, sds, and alpha are option. Also computes Power(All)

Description

Compute power for Multiple Regression with Up to Five Predictors Requires correlations between all variables as sample size. Means, sds, and alpha are option. Also computes Power(All)

Usage

MRC_all(
  ry1 = NULL,
  ry2 = NULL,
  ry3 = NULL,
  ry4 = NULL,
  ry5 = NULL,
  r12 = NULL,
  r13 = NULL,
  r14 = NULL,
  r15 = NULL,
  r23 = NULL,
  r24 = NULL,
  r25 = NULL,
  r34 = NULL,
  r35 = NULL,
  r45 = NULL,
  n = NULL,
  alpha = 0.05,
  rep = 10000
)

Arguments

ry1

Correlation between DV (y) and first predictor (1)

ry2

Correlation between DV (y) and second predictor (2)

ry3

Correlation between DV (y) and third predictor (3)

ry4

Correlation between DV (y) and fourth predictor (4)

ry5

Correlation between DV (y) and fifth predictor (5)

r12

Correlation between first (1) and second predictor (2)

r13

Correlation between first (1) and third predictor (3)

r14

Correlation between first (1) and fourth predictor (4)

r15

Correlation between first (1) and fifth predictor (5)

r23

Correlation between second (2) and third predictor (3)

r24

Correlation between second (2) and fourth predictor (4)

r25

Correlation between second (2) and fifth predictor (5)

r34

Correlation between third (3) and fourth predictor (4)

r35

Correlation between third (3) and fifth predictor (5)

r45

Correlation between fourth (4) and fifth predictor (5)

n

Sample size

alpha

Type I error (default is .05)

rep

number of replications (default is 10000)

Value

Power for Multiple Regression (ALL)

Examples

MRC_all(ry1=.50,ry2=.50,ry3=.50, r12=.2, r13=.3,r23=.4,n=82, rep=10000)

Compute Multiple Regression shortcuts with three predictors for Ind Coefficients Requires correlations between all variables as sample size. Means and sds are option. Also computes Power(All)

Description

Compute Multiple Regression shortcuts with three predictors for Ind Coefficients Requires correlations between all variables as sample size. Means and sds are option. Also computes Power(All)

Usage

MRC_short2(
  ry1_1,
  ry2_1,
  ry3_1 = NULL,
  r12_1,
  r13_1 = NULL,
  r23_1 = NULL,
  n1,
  ry1_2,
  ry2_2,
  ry3_2 = NULL,
  r12_2,
  r13_2 = NULL,
  r23_2 = NULL,
  n2,
  alpha = 0.05,
  my_1 = 0,
  m1_1 = 0,
  m2_1 = 0,
  m3_1 = 0,
  s1_1 = 1,
  s2_1 = 1,
  s3_1 = 1,
  sy_1 = 1,
  my_2 = 0,
  m1_2 = 0,
  m2_2 = 0,
  m3_2 = 0,
  s1_2 = 1,
  s2_2 = 1,
  s3_2 = 1,
  sy_2 = 1
)

Arguments

ry1_1

Correlation between DV (y) and first predictor (1), first group

ry2_1

Correlation between DV (y) and second predictor (2), first group

ry3_1

Correlation between DV (y) and third predictor (3), first group

r12_1

Correlation between first (1) and second predictor (2), first group

r13_1

Correlation between first (1) and third predictor (3), first group

r23_1

Correlation between second (2) and third predictor (3), first group

n1

Sample size, first group

ry1_2

Correlation between DV (y) and first predictor (1), second group

ry2_2

Correlation between DV (y) and second predictor (2), second group

ry3_2

Correlation between DV (y) and third predictor (3), second group

r12_2

Correlation between first (1) and second predictor (2), second group

r13_2

Correlation between first (1) and third predictor (3), second group

r23_2

Correlation between second (2) and third predictor (3), second group

n2

Sample size, second group

alpha

Type I error (default is .05)

my_1

Mean of DV (default is 0), first group

m1_1

Mean of first predictor (default is 0), first group

m2_1

Mean of second predictor (default is 0), first group

m3_1

Mean of third predictor (default is 0), first group

s1_1

Standard deviation of first predictor (default is 1), first group

s2_1

Standard deviation of second predictor (default is 1), first group

s3_1

Standard deviation of third predictor (default is 1), first group

sy_1

Standard deviation of DV (default is 1), first group

my_2

Mean of DV (default is 0), second group

m1_2

Mean of first predictor (default is 0), second group

m2_2

Mean of second predictor (default is 0), second group

m3_2

Mean of third predictor (default is 0), second group

s1_2

Standard deviation of first predictor (default is 1), second group

s2_2

Standard deviation of second predictor (default is 1), second group

s3_2

Standard deviation of third predictor (default is 1), second group

sy_2

Standard deviation of DV (default is 1), second group

Value

Multiple Regression shortcuts with three predictors for Ind Coefficients

Examples

MRC_short2(ry1_1=.40, ry2_1=.40, ry3_1 =-.40, r12_1=-.15,r13_1=-.60, r23_1=.25,
ry1_2=.40, ry2_2=.10, ry3_2 =-.40, r12_2=-.15,r13_2=-.60, r23_2=.25,
n1=50,n2=50,alpha=.05,my_1=1,m1_1=1,m2_1=1,m3_1=1,
sy_1=7,s1_1=1,s2_1=1,s3_1=2,
my_2=1,m1_2=1,m2_2=1,m3_2=1,sy_2=7,s1_2=1,s2_2=1,s3_2=2)

Compute Multiple Regression shortcuts with three predictors (will expand to handle two to five) Requires correlations between all variables as sample size. Means and sds are option. Also computes Power(All)

Description

Compute Multiple Regression shortcuts with three predictors (will expand to handle two to five) Requires correlations between all variables as sample size. Means and sds are option. Also computes Power(All)

Usage

MRC_shortcuts(
  ry1 = NULL,
  ry2 = NULL,
  ry3 = NULL,
  r12 = NULL,
  r13 = NULL,
  r23 = NULL,
  n = 100,
  alpha = 0.05,
  my = 0,
  m1 = 0,
  m2 = 0,
  m3 = 0,
  s1 = 1,
  s2 = 1,
  s3 = 1,
  sy = 1
)

Arguments

ry1

Correlation between DV (y) and first predictor (1)

ry2

Correlation between DV (y) and second predictor (2)

ry3

Correlation between DV (y) and third predictor (3)

r12

Correlation between first (1) and second predictor (2)

r13

Correlation between first (1) and third predictor (3)

r23

Correlation between second (2) and third predictor (3)

n

Sample size

alpha

Type I error (default is .05)

my

Mean of DV (default is 0)

m1

Mean of first predictor (default is 0)

m2

Mean of second predictor (default is 0)

m3

Mean of third predictor (default is 0)

s1

Standard deviation of first predictor (default is 1)

s2

Standard deviation of second predictor (default is 1)

s3

Standard deviation of third predictor (default is 1)

sy

Standard deviation of DV (default is 1)

Value

Multiple Regression shortcuts with three predictors

Examples

MRC_shortcuts(ry1=.40,ry2=.40,ry3=-.40, r12=-.15, r13=-.60,r23=.25,
n=110, my=1,m1=1,m2=1,m3=1,sy=7,s1=1,s2=1,s3=2)

Compute power for a Paired t-test Takes means, sd, and sample sizes. Alpha is .05 by default, alternative values may be entered by user. correlation (r) defaults to .50.

Description

Compute power for a Paired t-test Takes means, sd, and sample sizes. Alpha is .05 by default, alternative values may be entered by user. correlation (r) defaults to .50.

Usage

pairt(m1 = NULL, m2 = NULL, s = NULL, n = NULL, r = NULL, alpha = 0.05)

Arguments

m1

Mean for Pre Test

m2

Mean for Post Test

s

Standard deviation

n

Sample size

r

Correlation pre-post measures (default is .50)

alpha

Type I error (default is .05)

Value

Power for the Paired t-test

Examples

pairt(m1=25,m2=20, s = 5, n = 25, r = .5)

Compute power for a single sample proportion test Takes phi, degrees of freedom, and a range of sample sizes. Alpha is .05 by default, alternative values may be entered by user

Description

Compute power for a single sample proportion test Takes phi, degrees of freedom, and a range of sample sizes. Alpha is .05 by default, alternative values may be entered by user

Usage

prop1(p1, p0, nlow, nhigh, alpha = 0.05, tails = 2, by = 1)

Arguments

p1

expected proportion (a.k.a. alternative proportion)

p0

null proportion

nlow

starting sample size

nhigh

ending sample size

alpha

Type I error (default is .05)

tails

number of tails for test (default is 2)

by

Incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14)

Value

Power for Tests of Single Proportion

Examples

prop1(p1=.60, p0=.42,nlow=20,nhigh=100, tails=1, by=10)

Compute power for Tests of Two Independent Proportions Takes phi, degrees of freedom, and a range of sample sizes. Alpha is .05 by default, alternative values may be entered by user This test uses what is sometimes called the chi-square test for comparing proportions

Description

Compute power for Tests of Two Independent Proportions Takes phi, degrees of freedom, and a range of sample sizes. Alpha is .05 by default, alternative values may be entered by user This test uses what is sometimes called the chi-square test for comparing proportions

Usage

propind(p1, p2, nlow, nhigh, nratio = 0.5, alpha = 0.05, tails = 2, by = 1)

Arguments

p1

expected proportion Group 1

p2

expected proportion Group 2

nlow

starting sample size

nhigh

ending sample size

nratio

ratio of sample size of first group to second (default is .5 for equally sized groups)

alpha

Type I error (default is .05)

tails

number of tails for test (default is 2)

by

Incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14)

Value

Power for Tests of Two Independent Proportions

Examples

propind(p1=.62, p2=.55,nlow=200,nhigh=2500, by=100,nratio=.2)

Compute Precision Analyses for Correlations This approach simply loops a function from MBESS

Description

Compute Precision Analyses for Correlations This approach simply loops a function from MBESS

Usage

r_prec(r, nlow, nhigh, ci = 0.95, by = 1)

Arguments

r

Correlation

nlow

starting sample size

nhigh

ending sample size

ci

Type of Confidence Interval (e.g., .95)

by

Incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14)

Value

Precision Analyses for Correlations

Examples

r_prec(r=.3, nlow=80, nhigh=400, by=20, ci=.95)

Compute Precision Analyses for R-Squared This approach simply loops a function from MBESS

Description

Compute Precision Analyses for R-Squared This approach simply loops a function from MBESS

Usage

R2_prec(R2, nlow, nhigh, pred, ci = 0.95, by = 1)

Arguments

R2

R-squared

nlow

starting sample size

nhigh

ending sample size

pred

Number of Predictors

ci

Type of Confidence Interval (e.g., .95)

by

Incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14)

Value

Precision Analyses for R-Squared

Examples

R2_prec(R2=.467, nlow=24, nhigh=100, pred=3, by=4)

Compute power for R2 change in Multiple Regression (up to three predictors) Requires correlations between all variables as sample size. Means, sds, and alpha are option. Also computes Power(All) Example code below for three predictors. Expand as needed for four or five

Description

Compute power for R2 change in Multiple Regression (up to three predictors) Requires correlations between all variables as sample size. Means, sds, and alpha are option. Also computes Power(All) Example code below for three predictors. Expand as needed for four or five

Usage

R2ch(
  ry1 = NULL,
  ry2 = NULL,
  ry3 = NULL,
  r12 = NULL,
  r13 = NULL,
  r23 = NULL,
  n = NULL,
  alpha = 0.05,
  my = 0,
  m1 = 0,
  m2 = 0,
  m3 = 0,
  s1 = 1,
  s2 = 1,
  s3 = 1,
  sy = 1
)

Arguments

ry1

Correlation between DV (y) and first predictor (1)

ry2

Correlation between DV (y) and second predictor (2)

ry3

Correlation between DV (y) and third predictor (3)

r12

Correlation between first (1) and second predictor (2)

r13

Correlation between first (1) and third predictor (3)

r23

Correlation between second (2) and third predictor (3)

n

Sample size

alpha

Type I error (default is .05)

my

Mean of DV (default is 0)

m1

Mean of first predictor (default is 0)

m2

Mean of second predictor (default is 0)

m3

Mean of third predictor (default is 0)

s1

Standard deviation of first predictor (default is 1)

s2

Standard deviation of second predictor (default is 1)

s3

Standard deviation of third predictor (default is 1)

sy

Standard deviation of DV (default is 1)

Value

Power for R2 change in Multiple Regression (up to three predictors)

Examples

R2ch(ry1=.40,ry2=.40,ry3=-.40, r12=-.15, r13=-.60,r23=.25,n=24)

Compute Power for Regression Interaction (Correlation/Coefficient Approach)

Description

Compute Power for Regression Interaction (Correlation/Coefficient Approach)

Usage

regint(
  Group1,
  Group2,
  sx1 = 1,
  sx2 = 1,
  sy1 = 1,
  sy2 = 1,
  nlow,
  nhigh,
  alpha = 0.05,
  Prop_n1 = 0.5,
  by = 2,
  Estimates = 1
)

Arguments

Group1

Estimates (r or b) for Group 1

Group2

Estimates (r or b) for Group 2

sx1

Standard deviation of predictor, group 1 (defaults to 1)

sx2

Standard deviation of predictor, group 2 (defaults to 1)

sy1

Standard deviation of outcome, group 1 (defaults to 1)

sy2

Standard deviation of outcome, group 2 (defaults to 1)

nlow

starting sample size

nhigh

ending sample size

alpha

Type I error (default is .05)

Prop_n1

Proportion of Sample in First Group (defaults to equal sample sizes)

by

incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14)

Estimates

1 for Correlations (default), 2 for coefficients

Value

Power for Regression Interaction (Correlation/Coefficient Approach)

Examples

regint(Group1=-.26,Group2=.25, alpha=.05,Prop_n1=0.5,nlow=110, nhigh=140,by=2,Estimates=1)

Compute Power for Regression Interaction (R2 Change Approach)

Description

Compute Power for Regression Interaction (R2 Change Approach)

Usage

regintR2(R2Mod, R2Ch, mod_pred, ch_pred, nlow, nhigh, by = 1, alpha = 0.05)

Arguments

R2Mod

Full Model R2

R2Ch

Change in R2 Added by Interaction

mod_pred

Full Model Number of Predictors

ch_pred

Change Model Number of Predictors

nlow

starting sample size

nhigh

ending sample size

by

incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14)

alpha

Type I error (default is .05)

Value

Power for Regression Interaction (R2 Change Approach)

Examples

regintR2(R2Mod=.092,R2Ch=.032,mod_pred=3, ch_pred=1,nlow=100,nhigh=400,by=20)

Compute power for a t test using d statistic Takes d, sample size range, type of test, and tails.

Description

Compute power for a t test using d statistic Takes d, sample size range, type of test, and tails.

Usage

tfromd(d, nlow, nhigh, alpha = 0.05, test = "I", tails = 2, by = 2)

Arguments

d

standardize mean difference (Cohen's d)

nlow

Starting total sample size

nhigh

Ending total sample size

alpha

Type I error (default is .05)

test

"I" for independent, "P" for paired

tails

one or two-tailed tests (default is 2)

by

Incremental increase in sample size from low to high

Value

Power for the t-test from d statistic

Examples

tfromd(d=.2,nlow=10,nhigh=200,by=10, test="P")
tfromd(d=.2,nlow=10,nhigh=200,by=10, test="I")

Compute power for a One Factor Within Subjects and One Factor Between ANOVA 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 ANOVA 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

win1bg1(
  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

for each between group level

alpha

Type I error (default is .05)

Value

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

Examples

win1bg1(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)
win1bg1(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)

Compute power for a One Factor Within Subjects ANOVA with up to four levels. 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 ANOVA with up to four levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

win1F(
  m1,
  m2,
  m3 = NA,
  m4 = NA,
  s1,
  s2,
  s3 = NULL,
  s4 = NULL,
  r12,
  r13 = NULL,
  r14 = NULL,
  r23 = NULL,
  r24 = NULL,
  r34 = NULL,
  n,
  alpha = 0.05
)

Arguments

m1

Mean of first time point

m2

Mean of second time point

m3

Mean of third time point

m4

Mean of fourth time point

s1

Standard deviation of first time point

s2

Standard deviation of second time point

s3

Standard deviation of third time point

s4

Standard deviation of forth time point

r12

correlation Time 1 and Time 2

r13

correlation Time 1 and Time 3

r14

correlation Time 1 and Time 4

r23

correlation Time 2 and Time 3

r24

correlation Time 2 and Time 4

r34

correlation Time 3 and Time 4

n

Total sample size

alpha

Type I error (default is .05)

Value

Power for the One Factor Within Subjects ANOVA

Examples

win1F(m1=-.25,m2=.00,m3=.10,m4=.15,s1=.4,s2=.5,s3=.6,s4=.7,
r12=.50, r13=.30, r14=.15, r23=.5, r24=.30, r34=.50, n=25)
win1F(m1=-.25,m2=.00,m3=.10,m4=.15,s1=.4,s2=.5,s3=2.5,s4=2.0,
r12=.50, r13=.30, r14=.10, r23=.5, r24=.30, r34=.40, n=100)

Compute power for a One Factor Within Subjects Trends with up to four levels. 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 Trends with up to four levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

win1Ftrends(
  m1,
  m2,
  m3 = NA,
  m4 = NA,
  s1,
  s2,
  s3 = NULL,
  s4 = NULL,
  r12,
  r13 = NULL,
  r14 = NULL,
  r23 = NULL,
  r24 = NULL,
  r34 = NULL,
  n,
  alpha = 0.05
)

Arguments

m1

Mean of first time point

m2

Mean of second time point

m3

Mean of third time point

m4

Mean of fourth time point

s1

Standard deviation of first time point

s2

Standard deviation of second time point

s3

Standard deviation of third time point

s4

Standard deviation of forth time point

r12

correlation Time 1 and Time 2

r13

correlation Time 1 and Time 3

r14

correlation Time 1 and Time 4

r23

correlation Time 2 and Time 3

r24

correlation Time 2 and Time 4

r34

correlation Time 3 and Time 4

n

Sample size for first group

alpha

Type I error (default is .05)

Value

Power for the One Factor Within Subjects Trends

Examples

win1Ftrends(m1=-.25,m2=-.15,m3=-.05,m4=.05,s1=.4,s2=.5,s3=.6,s4=.7,
r12=.50, r13=.30, r14=.15, r23=.5, r24=.30, r34=.50, n=25)

Compute power for a Two Factor Within Subjects ANOVA with up to two by four levels. 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 Two Factor Within Subjects ANOVA with up to two by four levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

win2F(
  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,
  r12 = NULL,
  r13 = NULL,
  r14 = NULL,
  r15 = NULL,
  r16 = NULL,
  r17 = NULL,
  r18 = NULL,
  r23 = NULL,
  r24 = NULL,
  r25 = NULL,
  r26 = NULL,
  r27 = NULL,
  r28 = NULL,
  r34 = NULL,
  r35 = NULL,
  r36 = NULL,
  r37 = NULL,
  r38 = NULL,
  r45 = NULL,
  r46 = NULL,
  r47 = NULL,
  r48 = NULL,
  r56 = NULL,
  r57 = NULL,
  r58 = NULL,
  r67 = NULL,
  r68 = NULL,
  r78 = NULL,
  r = NULL,
  s = NULL,
  n,
  alpha = 0.05
)

Arguments

m1.1

Mean of first level factor 1, 1st level factor two

m2.1

Mean of second level factor 1, 1st level factor two

m3.1

Mean of third level factor 1, 1st level factor two

m4.1

Mean of fourth level factor 1, 1st level factor two

m1.2

Mean of first level factor 1, 2nd level factor two

m2.2

Mean of second level factor 1, 2nd level factor two

m3.2

Mean of third level factor 1, 2nd level factor two

m4.2

Mean of fourth level factor 1, 2nd level factor two

s1.1

Standard deviation of first level factor 1, 1st level factor two

s2.1

Standard deviation of second level factor 1, 1st level factor two

s3.1

Standard deviation of third level factor 1, 1st level factor two

s4.1

Standard deviation of forth level factor 1, 1st level factor two

s1.2

Standard deviation of first level factor 1, 2nd level factor two

s2.2

Standard deviation of second level factor 1, 2nd level factor two

s3.2

Standard deviation of third level factor 1, 2nd level factor two

s4.2

Standard deviation of forth level factor 1, 2nd level factor two

r12

correlation Factor 1, Level 1 and Factor 1, Level 2

r13

correlation Factor 1, Level 1 and Factor 1, Level 3

r14

correlation Factor 1, Level 1 and Factor 1, Level 4

r15

correlation Factor 1, Level 1 and Factor 2, Level 1

r16

correlation Factor 1, Level 1 and Factor 2, Level 2

r17

correlation Factor 1, Level 1 and Factor 2, Level 3

r18

correlation Factor 1, Level 1 and Factor 2, Level 4

r23

correlation Factor 1, Level 2 and Factor 1, Level 3

r24

correlation Factor 1, Level 2 and Factor 1, Level 4

r25

correlation Factor 1, Level 2 and Factor 2, Level 1

r26

correlation Factor 1, Level 2 and Factor 2, Level 2

r27

correlation Factor 1, Level 2 and Factor 2, Level 3

r28

correlation Factor 1, Level 2 and Factor 2, Level 4

r34

correlation Factor 1, Level 3 and Factor 1, Level 4

r35

correlation Factor 1, Level 3 and Factor 2, Level 1

r36

correlation Factor 1, Level 3 and Factor 2, Level 2

r37

correlation Factor 1, Level 3 and Factor 2, Level 3

r38

correlation Factor 1, Level 3 and Factor 2, Level 4

r45

correlation Factor 1, Level 4 and Factor 2, Level 1

r46

correlation Factor 1, Level 4 and Factor 2, Level 2

r47

correlation Factor 1, Level 4 and Factor 2, Level 3

r48

correlation Factor 1, Level 4 and Factor 2, Level 4

r56

correlation Factor 2, Level 1 and Factor 2, Level 2

r57

correlation Factor 2, Level 1 and Factor 2, Level 3

r58

correlation Factor 2, Level 1 and Factor 2, Level 4

r67

correlation Factor 2, Level 2 and Factor 2, Level 3

r68

correlation Factor 2, Level 2 and Factor 2, Level 4

r78

correlation Factor 2, Level 3 and Factor 2, Level 4

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

Sample size for first group

alpha

Type I error (default is .05)

Value

Power for the Two Factor Within Subjects ANOVA

Examples

win2F(m1.1=-.25,m2.1=0,m3.1=.10,m4.1=.15,m1.2=-.25,m2.2=.10,m3.2=.30,m4.2=.35,
s1.1=.4,s2.1=.5,s3.1=2.5,s4.1=2.0,s1.2=.4,s2.2=.5,s3.2=2.5,s4.2=2.0,r=.5,n=80)
win2F(m1.1=-.25,m2.1=0,m1.2=-.25,m2.2=.10,s1.1=.4,s2.1=.5,,s1.2=.4,s2.2=.5,
r12=.5,r13=.4,r14=.55,r23=.4,r24=.5,r34=.45,n=200)

Compute power for Simple Effects in Two Factor Within Subjects ANOVA with up to two by four levels. 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 Simple Effects in Two Factor Within Subjects ANOVA with up to two by four levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user

Usage

win2Fse(
  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,
  r12 = NULL,
  r13 = NULL,
  r14 = NULL,
  r15 = NULL,
  r16 = NULL,
  r17 = NULL,
  r18 = NULL,
  r23 = NULL,
  r24 = NULL,
  r25 = NULL,
  r26 = NULL,
  r27 = NULL,
  r28 = NULL,
  r34 = NULL,
  r35 = NULL,
  r36 = NULL,
  r37 = NULL,
  r38 = NULL,
  r45 = NULL,
  r46 = NULL,
  r47 = NULL,
  r48 = NULL,
  r56 = NULL,
  r57 = NULL,
  r58 = NULL,
  r67 = NULL,
  r68 = NULL,
  r78 = NULL,
  r = NULL,
  s = NULL,
  n,
  alpha = 0.05
)

Arguments

m1.1

Mean of first level factor 1, 1st level factor two

m2.1

Mean of second level factor 1, 1st level factor two

m3.1

Mean of third level factor 1, 1st level factor two

m4.1

Mean of fourth level factor 1, 1st level factor two

m1.2

Mean of first level factor 1, 2nd level factor two

m2.2

Mean of second level factor 1, 2nd level factor two

m3.2

Mean of third level factor 1, 2nd level factor two

m4.2

Mean of fourth level factor 1, 2nd level factor two

s1.1

Standard deviation of first level factor 1, 1st level factor two

s2.1

Standard deviation of second level factor 1, 1st level factor two

s3.1

Standard deviation of third level factor 1, 1st level factor two

s4.1

Standard deviation of forth level factor 1, 1st level factor two

s1.2

Standard deviation of first level factor 1, 2nd level factor two

s2.2

Standard deviation of second level factor 1, 2nd level factor two

s3.2

Standard deviation of third level factor 1, 2nd level factor two

s4.2

Standard deviation of forth level factor 1, 2nd level factor two

r12

correlation Factor 1, Level 1 and Factor 1, Level 2

r13

correlation Factor 1, Level 1 and Factor 1, Level 3

r14

correlation Factor 1, Level 1 and Factor 1, Level 4

r15

correlation Factor 1, Level 1 and Factor 2, Level 1

r16

correlation Factor 1, Level 1 and Factor 2, Level 2

r17

correlation Factor 1, Level 1 and Factor 2, Level 3

r18

correlation Factor 1, Level 1 and Factor 2, Level 4

r23

correlation Factor 1, Level 2 and Factor 1, Level 3

r24

correlation Factor 1, Level 2 and Factor 1, Level 4

r25

correlation Factor 1, Level 2 and Factor 2, Level 1

r26

correlation Factor 1, Level 2 and Factor 2, Level 2

r27

correlation Factor 1, Level 2 and Factor 2, Level 3

r28

correlation Factor 1, Level 2 and Factor 2, Level 4

r34

correlation Factor 1, Level 3 and Factor 1, Level 4

r35

correlation Factor 1, Level 3 and Factor 2, Level 1

r36

correlation Factor 1, Level 3 and Factor 2, Level 2

r37

correlation Factor 1, Level 3 and Factor 2, Level 3

r38

correlation Factor 1, Level 3 and Factor 2, Level 4

r45

correlation Factor 1, Level 4 and Factor 2, Level 1

r46

correlation Factor 1, Level 4 and Factor 2, Level 2

r47

correlation Factor 1, Level 4 and Factor 2, Level 3

r48

correlation Factor 1, Level 4 and Factor 2, Level 4

r56

correlation Factor 2, Level 1 and Factor 2, Level 2

r57

correlation Factor 2, Level 1 and Factor 2, Level 3

r58

correlation Factor 2, Level 1 and Factor 2, Level 4

r67

correlation Factor 2, Level 2 and Factor 2, Level 3

r68

correlation Factor 2, Level 2 and Factor 2, Level 4

r78

correlation Factor 2, Level 3 and Factor 2, Level 4

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

Sample size for first group

alpha

Type I error (default is .05)

Value

Power for Simple Effects for Two Factor Within Subjects ANOVA

Examples

win2Fse(m1.1=-.25,m2.1=0,m3.1=.10,m4.1=.15,m1.2=-.25,m2.2=.10,m3.2=.30,m4.2=.35,
s1.1=.4,s2.1=.5,s3.1=2.5,s4.1=2.0,s1.2=.4,s2.2=.5,s3.2=2.5,s4.2=2.0,r=.5,n=220)