Description Usage Arguments Value Examples
Fits a linear regression model using OLS or WLS
1 |
formula |
formula specifying the regression equation |
data |
n x p data.frame to be used to fit the model |
weights |
optional length n numeric vector to be used in a WLS regression |
A list containing regression results
coefficients - beta coefficients
residuals - observed minus fitted values
fitted.values - expected outcomes based on regression coefficients
mse - variance of the outcome
se_beta - standard errors for the coefficients
r2 - R-squared
adj.r2 - adjusted R-squared
t - t test statistics for each coefficient
t.p.vals - p values for each coefficient
f - f statistic for the model
f.p.val - p value for the f statistic
df.residual - degrees of freedom for SSE (n-p)
n - number of observations
p - number of mean parameters
method - OLS or WLS depending on whether weights were specified
weights - if weights provided as argument, this returns that argument
formula - this returns the formula argument
design.mat - design matrix used to fit the model
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.