Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:

- lm(formula, data, subset, weights, na.action, method = "qr", model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE, contrasts = NULL, offset, ...)

Parameter | Meaning |
---|---|

formula | a formula in Wilkinson-Rogers notation; `response ~ ...` where `...` contains terms corresponding to variables in the environment or in the data frame specified by the `data` argument |

data | data frame containing the response and predictor variables |

subset | a vector specifying a subset of observations to be used: may be expressed as a logical statement in terms of the variables in `data` |

weights | analytical weights (see Weights section above) |

na.action | how to handle missing (`NA` ) values: see `?na.action` |

method | how to perform the fitting. Only choices are `"qr"` or `"model.frame"` (the latter returns the model frame without fitting the model, identical to specifying `model=TRUE` ) |

model | whether to store the model frame in the fitted object |

x | whether to store the model matrix in the fitted object |

y | whether to store the model response in the fitted object |

qr | whether to store the QR decomposition in the fitted object |

singular.ok | whether to allow singular fits, models with collinear predictors (a subset of the coefficients will automatically be set to `NA` in this case |

contrasts | a list of contrasts to be used for particular factors in the model; see the `contrasts.arg` argument of `?model.matrix.default` . Contrasts can also be set with `options()` (see the `contrasts` argument) or by assigning the `contrast` attributes of a factor (see `?contrasts` ) |

offset | used to specify an a priori known component in the model. May also be specified as part of the formula. See `?model.offset` |

... | additional arguments to be passed to lower-level fitting functions (`lm.fit()` or `lm.wfit()` ) |