R/ols.fit2.R

Defines functions ols.fit2

Documented in ols.fit2

ols.fit2 <-
function(y, x, tol = 1e-07 , LAPACK = FALSE)
{
tmp <- crossprod(x)
out <- qr(tmp)
out$xtxinv <- solve.qr(out, tol=tol, LAPACK=LAPACK)
out$xtx <- tmp
out$xty <- crossprod(x,y)
out$coefficients <- as.vector(out$xtxinv%*%out$xty)
return(out)
}

Try the AutoSEARCH package in your browser

Any scripts or data that you put into this service are public.

AutoSEARCH documentation built on May 1, 2019, 10:31 p.m.