model.extract
Extract Special Information from Model Frame

### Description

Extracts Special Information from Model Frame

### Usage

    model.extract(frame, component)
    model.response(data, type="any")
    model.offset(x)
    model.weights(x)

### Arguments

frame, data, x | a model frame, the result of calling model.frame()
component | a character string that specifies the name of the information to retrieve. Built-in requests include "response", "weights", and three flavors of predictor matrix, "tree.x", "loess.x", and "lm.x" (a synonym for model.matrix()), for the use of the corresponding fitting functions. Other names are wrapped in parentheses and selected as the corresponding variable of the model frame, following the convention of model.frame() for special= arguments.
type | a character string given the type of response returned. Possible values are "any", "numeric", "double". If "numeric" or "double", the results are coerced with a call to as.numeric.

Value
returns the selected variable from the model frame. An important special feature is that the names or row labels of the extracted data are set to the row names of the model frame. This is the mechanism that transmits row names to the fitted values and residuals in model- fitting.
This function is normally a support routine for fitting functions, such as lm().
Note
The model.response, model.weights, and model.offset functions are wrapper functions that model.extract uses to get the appropriate component. The model.weights and model.offset functions do not retain the row names of the model frame like model.extract.
Package stats version 6.1.5-18
Package Index