ci_rsquared {confintr} | R Documentation |
CI for the Population R-Squared
Description
This function calculates parametric CIs for the population .
It is based on CIs for the non-centrality parameter
of the F
distribution found by test inversion. Values of
are mapped to
by
,
where the
are the degrees of freedom of the F test statistic.
A positive lower
-confidence limit for the
goes hand-in-hand with a significant F test at level
.
Usage
ci_rsquared(x, df1 = NULL, df2 = NULL, probs = c(0.025, 0.975))
Arguments
x |
The result of |
df1 |
The numerator df. Only used if |
df2 |
The denominator df. Only used if |
probs |
Lower and upper probabilities, by default |
Details
According to stats::pf()
, the results might be unreliable for very large F values.
Note that we do not provide bootstrap CIs here to keep the input interface simple.
Value
An object of class "cint", see ci_mean()
for details.
References
Smithson, M. (2003). Confidence intervals. Series: Quantitative Applications in the Social Sciences. New York, NY: Sage Publications.
See Also
Examples
fit <- lm(Sepal.Length ~ ., data = iris)
summary(fit)$r.squared
ci_rsquared(fit)
ci_rsquared(fit, probs = c(0.05, 1))