Description Usage Arguments Value Examples
View source: R/regression_fit.R
Fits multiple linear regression model using ordinary least squares
1 | regression_fit(formula, data, alpha = 0.05)
|
formula |
an object of class "formula" or one that can be coerced by as.formula |
data |
an object of class "data.frame" or one that can be coerced by as.data.frame. |
alpha |
an optional argument indicating significance level of confidence intervals. If not provided, 0.05 is used. |
A list containing model details, estimated coefficients, confidence intervals, fitted values, residuals, variance-covariance matrix, ANOVA test results, and R-squared.
1 2 3 4 5 6 7 8 | data(mtcars)
mlr_output <- regression_fit(formula = mpg ~ wt + hp + wt:hp, data = mtcars)
mlr_coefficients <- mlr_output$coefficients
wt_estimate <- mlr_coefficients["wt","Estimate"]
mlr_residuals <- mlr_output$residuals
mlr_vcov <- mlr_output$variances
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.