This function fits an ordinary LS regression of a response on a full second order model, or returns the residuals from such a fit. Used in the phdq method in dr.
fullquad.fit(x, y, w, ...) fullquad.residuals(...)
x |
an n by p matrix of predictors |
y |
an n vector of the response |
w |
an n vector of positive weights or NULL |
... |
arguments passed to lm |
fullquad.fit returns an object of type lm. fullquad.residuals returns a vector of n residuals.
Sanford Weisberg <sandy@stat.umn.edu>