View source: R/regression.linear.R
| power.f.regression | R Documentation |
Calculates power or sample size (only one can be NULL at a time) to test R-squared deviation from 0 (zero) in linear regression or to test R-squared change between two linear regression models. The test of R-squared change is often used to evaluate incremental contribution of a set of predictors in hierarchical linear regression.
Formulas are validated using Monte Carlo simulation, G*Power, and tables in the PASS documentation.
power.f.regression(
r.squared.change = NULL,
margin = 0,
k.total,
k.tested = k.total,
n = NULL,
power = NULL,
alpha = 0.05,
ceil.n = TRUE,
verbose = 1,
utf = FALSE
)
power.f.reg(
r.squared.change = NULL,
margin = 0,
k.total,
k.tested = k.total,
n = NULL,
power = NULL,
alpha = 0.05,
ceil.n = TRUE,
verbose = 1,
utf = FALSE
)
r.squared.change |
R-squared (or R-squared change). |
margin |
margin - ignorable R-squared (or R-squared change). |
k.total |
integer; total number of predictors. |
k.tested |
integer; number of predictors in the subset of
interest. By default |
n |
integer; sample size. |
power |
statistical power, defined as the probability of
correctly rejecting a false null hypothesis, denoted
as |
alpha |
type 1 error rate, defined as the probability of
incorrectly rejecting a true null hypothesis,
denoted as |
ceil.n |
logical; whether sample size should be rounded up.
|
verbose |
|
utf |
logical; whether the output should show Unicode
characters (if encoding allows for it).
|
NB: The pwrss.f.regression function and its alias
pwrss.f.reg() are deprecated, but they will remain available as a
wrapper for the power.f.regression() function during a transition
period.
parms |
list of parameters used in calculation. |
test |
type of the statistical test (F-Test). |
df1 |
numerator degrees of freedom. |
df2 |
denominator degrees of freedom. |
ncp |
non-centrality parameter for the alternative. |
null.ncp |
non-centrality parameter for the null. |
f.alpha |
critical value. |
power |
statistical power |
n |
sample size. |
Bulus, M., & Polat, C. (2023). pwrss R paketi ile istatistiksel guc analizi [Statistical power analysis with pwrss R package]. Ahi Evran Universitesi Kirsehir Egitim Fakultesi Dergisi, 24(3), 2207-2328. https://doi.org/10.29299/kefad.1209913
Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.
# in the outcome (R-squared = 0.15).
power.f.regression(r.squared = 0.15,
k.total = 3, # total number of predictors
power = 0.80)
# adding two more variables will increase R-squared
# from 0.15 (with 3 predictors) to 0.25 (with 3 + 2 predictors)
power.f.regression(r.squared.change = 0.10, # R-squared change
k.total = 5, # total number of predictors
k.tested = 2, # predictors to be tested
power = 0.80)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.