power.SLR {powerMediation} | R Documentation |
Power for testing slope for simple linear regression
Description
Calculate power for testing slope for simple linear regression.
Usage
power.SLR(n,
lambda.a,
sigma.x,
sigma.y,
alpha = 0.05,
verbose = TRUE)
Arguments
n |
sample size. |
lambda.a |
regression coefficient in the simple linear regression
|
sigma.x |
standard deviation of the predictor |
sigma.y |
marginal standard deviation of the outcome |
alpha |
type I error rate. |
verbose |
logical. |
Details
The power is for testing the null hypothesis
versus the alternative hypothesis
for the simple linear regressions:
Value
power |
power for testing if |
delta |
|
s |
|
t.cr |
|
rho |
correlation between the predictor |
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.rho
,
ss.SLR.rho
,
ss.SLR
.
Examples
power.SLR(n=100, lambda.a=0.8, sigma.x=0.2, sigma.y=0.5,
alpha = 0.05, verbose = TRUE)