Learn Data & AI Skills | 50% off

Last chance! 50% off unlimited learning

Sale ends in


powerMediation (version 0.3.4)

power.SLR.rho: Power for testing slope for simple linear regression

Description

Calculate power for testing slope for simple linear regression.

Usage

power.SLR.rho(n, 
              rho2, 
              alpha = 0.05, 
              verbose = TRUE)

Arguments

n

sample size.

rho2

square of the correlation between the outcome and the predictor.

alpha

type I error rate.

verbose

logical. TRUE means printing power; FALSE means not printing power.

Value

power

power for testing if b2=0.

delta

n/1/ρ21.

Details

The power is for testing the null hypothesis λ=0 versus the alternative hypothesis λ0 for the simple linear regressions: yi=γ+λxi+ϵi,ϵiN(0,σe2)

References

Dupont, W.D. and Plummer, W.D.. Power and Sample Size Calculations for Studies Involving Linear Regression. Controlled Clinical Trials. 1998;19:589-601.

See Also

minEffect.SLR, power.SLR, ss.SLR.rho, ss.SLR.

Examples

Run this code
# NOT RUN {
  power.SLR.rho(n=100, rho2=0.6, alpha = 0.05, verbose = TRUE)

# }

Run the code above in your browser using DataLab