
ols.rgr(dataset)
p
x m
data matrix, where the final column
is a continuous outcome variable. datashape
may be applied to data
so that the dataset is in the correct format for this function (see manual)## 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))
Run the code above in your browser using DataLab