This function is a switcher among various numerical fitting functions
(ols.fit.chol, ols.fit.qr, ols.fit.svd
and ols.fit.sweep). The argument method does the switching:
"qr" for ols.fit.qr, etc. This should usually not be
used directly unless by experienced users.
Usage
ols.fit(x, y, method = "qr", …)
Arguments
x
design matrix of dimension \(n\times q\).
y
vector of observations of length \(n\).
method
currently, methods "chol", "qr" (default), "svd"
and "sweep" are supported.
# NOT RUN {set.seed(151)
n <- 100
p <- 2
x <- matrix(rnorm(n * p), n, p) # no intercept!y <- rnorm(n)
fm <- ols.fit(x = x, y = y, method = "chol")
fm
# }