A formula such as "y ~ A * B + x".
The data frame: an object of columns.
Optionaloptions: LmFormulaOptionsFit a linear model by least squares, the predictors given as a matrix: R's lm(y ~ x) (or y ~ x - 1 without
intercept, with weights for weighted least squares) together with summary(). Rows with a missing value in x,
y or the weights are dropped.
Predictors: a matrix (array of rows, one column per predictor) or a vector (one predictor).
Response.
Optionaloptions: LmOptions
Fit a linear model from a formula. Equivalent to R's
lm(formula, data). Withweightsandcontrasts, and the quantities ofsummary().The model matrix is that of modelMatrix (but the levels given by
levelsthat have no row left are dropped, as R'sdrop.unused.levels; a boolean column keeps both levels FALSE and TRUE); the fit is that of the matrix form (same pivoting and tolerance), its sums of squares computed in double-double so that data with a large mean keep their accuracy. Rows with a missing value in a variable of the formula or in the weights are dropped (rowslists those used).