RSqCI | R Documentation |
Calculate bootstrap intervals for the the R squared of a linear model as returned
by lm
.
RSqCI(
object,
conf.level = 0.95,
sides = c("two.sided", "left", "right"),
adjusted = TRUE,
...
)
object |
the model object as returned by glm. |
conf.level |
confidence level of the interval. |
sides |
a character string specifying the side of the confidence
interval, must be one of |
adjusted |
logical, defining if the R squared or the adjusted R squared
should be used. Default is |
... |
further arguments are passed to the |
a numeric vector with 3 elements:
mean |
mean |
lwr.ci |
lower bound of the confidence interval |
upr.ci |
upper bound of the confidence interval |
Andri Signorell andri@signorell.net
BrierScore
# get linear model
r.lm <- lm(Fertility ~ Agriculture + Examination + Education
+ Catholic + Infant.Mortality, data=swiss)
# calculate confidence intervals for the R2
summary(r.lm)$r.squared
RSqCI(r.lm, R=99) # use higher R in real life!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.