regintR2: Compute Power for Regression Interaction (R2 Change Approach)

Description Usage Arguments Value Examples

View source: R/regintR2.R

Description

Compute Power for Regression Interaction (R2 Change Approach)

Usage

1
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

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

Example output

     n R2 Change)  Power
1  100      0.032 0.4448
2  120      0.032 0.5181
3  140      0.032 0.5847
4  160      0.032 0.6444
5  180      0.032 0.6974
6  200      0.032 0.7439
7  220      0.032 0.7843
8  240      0.032 0.8192
9  260      0.032 0.8491
10 280      0.032 0.8745
11 300      0.032 0.8960
12 320      0.032 0.9142
13 340      0.032 0.9294
14 360      0.032 0.9421
15 380      0.032 0.9526
16 400      0.032 0.9614

pwr2ppl documentation built on April 4, 2021, 9:06 a.m.