beta_stats | R Documentation |
This function calculates beta statistics for a linear model fit.
beta_stats(lmfit, varnames, se = TRUE)
lmfit |
Fitted linear model object. |
varnames |
Vector of variable names. |
se |
Logical flag indicating whether to calculate standard errors (default: TRUE). |
A list containing the following elements:
estimate
: Estimated beta coefficients.
stat
: t-statistics of the beta coefficients (if se = TRUE
).
se
: Standard errors of the beta coefficients (if se = TRUE
).
prob
: Probabilities associated with the t-statistics (if se = TRUE
).
stat_type
: Type of the statistics calculated.
data(mtcars)
lm_fit <- lm(mpg ~ wt + qsec + am, data = mtcars)
beta_stats(lm_fit, c("Intercept", "wt", "qsec", "am"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.