R/lm_rSq_ci.R
lm_rSq_ci.Rd
The lm_rSq_ci
function uses the base R lm
function to conduct
a regression analysis and then computes the confidence interval for R squared.
lm_rSq_ci(
formula,
data = NULL,
conf.level = 0.95,
ci.method = c("widest", "r.con", "olkinfinn"),
env = parent.frame()
)
The formula of the regression analysis, of the form y ~
x1 + x2
, where y is the dependent variable and x1 and x2 are the
predictors.
If the terms in the formula aren't vectors but variable names, this should be the dataframe where those variables are stored.
The confidence of the confidence interval around the regression coefficients.
Which method to use for the confidence interval around R squared.
The enviroment where to evaluate the formula.
The confidence interval
### Do a simple regression analysis
lm_rSq_ci(age ~ circumference, dat=Orange);
#> [1] 0.7441914 0.9248420