Description Usage Arguments Value Examples
View source: R/adjusted_r_squared.R
This function is an alternative way of calling adjusted_r_squared. It derives
n
, p
, and rsquared
from an lm
object.
1 2 | lm_adjusted_r_squared(fit, method = c("ezekiel", "smith", "olkinpratt",
"pratt", "wherry1", "wherry2"))
|
fit |
object of class lm |
method |
method used calculating r-squared (see adjusted_r_squared) |
adjusted r-squared
1 2 3 4 5 6 7 8 9 10 11 12 | # Get data and meta data
data(facets_data); data(facets_meta)
facets_meta$ipip_factors
# Example showing the use of the regression function
fit1 <- regression('swl', ivs= facets_meta$ipip_factors, data=facets_data)
lm_adjusted_r_squared(fit1, method='olkinpratt')
# Example showing use of lm formula and how ezekiel values are equivalent
fit2 <- lm(swl ~ ipip_extraversion + ipip_openness, facets_data)
lm_adjusted_r_squared(fit2, method='ezekiel')
summary(fit2)$adj.r.squared
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.