p_lm.R2 {Spower} | R Documentation |
p-value from global linear regression model simulation
Description
p-values associated with linear regression model using fixed/random independent variables. Focus is on the omnibus behavior of the R^2 statistic.
Usage
p_lm.R2(n, R2, k, R2_0 = 0, k.R2_0 = 0, R2.resid = 1 - R2, fixed = TRUE, ...)
Arguments
n |
sample size |
R2 |
R-squared effect size |
k |
number of IVs |
R2_0 |
null hypothesis for R-squared |
k.R2_0 |
number of IVs associated with the null hypothesis model |
R2.resid |
residual R-squared value, typically used when comparing nested models when fit sequentially (e.g., comparing model A vs B when model involves the structure A -> B -> C) |
fixed |
logical; if FALSE then the data are random generated according to a joint multivariate normal distribution |
... |
additional arguments to be passed to |
Value
a single p-value
Author(s)
Phil Chalmers rphilip.chalmers@gmail.com
See Also
Examples
# 5 fixed IVs, R^2 = .1, sample size of 95
p_lm.R2(n=95, R2=.1, k=5)
# random model
p_lm.R2(n=95, R2=.1, k=5, fixed=FALSE)
[Package Spower version 0.3.1 Index]