The object itself is simply the formula supplied to the call of
terms.formula
. The object has a number of attributes
and they are used to construct the model frame:
factorsA matrix of variables by terms showing which variables
appear in which terms. The entries are 0 if the variable does not
occur in the term, 1 if it does occur and should be coded by
contrasts, and 2 if it occurs and should be coded via dummy
variables for all levels (as when a lower-order term
is missing). Note that variables in main effects always receive 1,
even if the intercept is missing (in which case the first one
should be coded with dummy variables).
If there are no terms other than an intercept and offsets,
this is numeric(0)
.
term.labelsA character vector containing the labels for each
of the terms in the model, except for offsets. Note that these are
after possible re-ordering of terms.
Non-syntactic names will be quoted by backticks: this makes it
easier to re-construct the formula from the term labels.
variablesA call to list
of the variables in the model.
interceptEither 0, indicating no intercept is to be fit, or 1
indicating that an intercept is to be fit.
orderA vector of the same length as term.labels
indicating the order of interaction for each term.
responseThe index of the variable (in variables) of the
response (the left hand side of the formula). Zero, if there is no
response.
offsetIf the model contains offset
terms there
is an offset
attribute indicating which variable(s) are offsets
specialsIf a specials
argument was given to
terms.formula
there is a specials
attribute, a
pairlist of vectors (one for each specified special function) giving
numeric indices of the arguments of the list returned as the
variables
attribute which contain these special functions.
dataClassesoptional. A named character vector giving the classes
(as given by .MFclass
) of the variables used in a fit.
predvarsoptional. An expression to help in computing
predictions at new covariate values; see makepredictcall
.
The object has class c("terms", "formula").