Linear Regression using Ordinary Least Squares
Fit a linear regression model using Ordinary Least Squares.
ols.rgr(dataset)
dataset |
a |
This function may be called directly. For regression with an intercept included, the first column in the dataset must be a column of 1s.
the function returns a column-vector containing the linear regression coefficients.
## Linear regression using a subset of the mtcars data (outcome is "wt") data(mtcars) mtc.df <- mtcars[, c(6, 1, 4)] mtc.shaped <- datashape(dataset = mtc.df, y = 1) ols.rgr(mtc.shaped) ols.rgr(cbind(1,mtc.shaped))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.