power.SLR.rho {powerMediation} | R Documentation |
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. |
Details
The power is for testing the null hypothesis \lambda=0
versus the alternative hypothesis \lambda\neq 0
for the simple linear regressions:
y_i=\gamma+\lambda x_i + \epsilon_i, \epsilon_i\sim N(0, \sigma^2_{e})
Value
power |
power for testing if |
delta |
|
Note
The test is a two-sided test. For one-sided tests, please double the
significance level. For example, you can set alpha=0.10
to obtain one-sided test at 5% significance level.
Author(s)
Weiliang Qiu stwxq@channing.harvard.edu
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
power.SLR.rho(n=100, rho2=0.6, alpha = 0.05, verbose = TRUE)