Fast and simple linear model

fastLmPure(X, y, useDouble = FALSE)

Arguments

X

a model matrix

y

a vector containing the explained variable

useDouble

use float or double internally

Value

fastLmPure returns a list with three components:

coefficients

a vector of coefficients

residuals

the residuals, that is response minus fitted values

fitted.values

the fitted mean values

stderr

a vector of the (estimated) standard errors of the coefficient estimates

df.residual

a scalar denoting the degrees of freedom in the model

intercept

a boolean denoting if a model with intercept was fitted

Details

Single precision floats are used by default since not all devices support double precision.