Power Functions for Tests of Simple Linear Regression Coefficients
A function to calculate the power of the t-tests corresponding to tests on the intercept and slope coefficients in the simple linear regression model.
power.b(x, y, alpha = 0.05, B0 = 0, B1 = 0)
x
: A vector of predictor values. Must be the same length as y
.y
: A vector of response values. Must be the same length as x
.alpha
: Significance level of the test. Default level is 0.05.B0
: Null value for the test about the intercept.B1
: Null value for the test about the slope. ## Returnspower.b
returns a matrix with the noncentrality parameters and power levels for the corresponding t-tests. ## See Also
power.F
Young, D. S. (2017), Handbook of Regression Methods, CRC Press.
## Applied to the toy dataset. data(toy) power.b(x = toy$x, y = toy$y)