This linear regression reference class will compute the coefficients, residuals, predicted values, standard errors for both the coefficients and the residuals, t-values and p-values, and the degrees of freedom of a model matrix based on the provided formula and data set.
formula
A formula object
data
A data set
coef()
Returns the coefficients.
initialize(formula, data)
The constructor will return an object of class linreg.
plot()
Plots two graphs; residuals vs fitted values, and scale-location.
pred()
Returns the predicted values.
print()
Prints how the function was called and the coefficients.
resid()
Returns the residuals.
summary()
Prints a summary of the model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.