terms2order {regr0} | R Documentation |
Create all square and interaction terms of a given formula
terms2order(object, squared = TRUE, interactions = TRUE)
object |
An object for which |
squared |
logical: Should square terms be added to the interactions? |
interactions |
logical: Should interaction terms be added? |
The 'squares' are the squares of the terms of dataClass
'numeric' appearing in the formula (cf.
attr(object$terms, "dataClass")
,
except for terms that are already squares (contain ^
).
Analogously for interactions: they combine all terms that do not
contain :
.
'term.labels' of the generated terms
Werner A. Stahel, ETH Zurich
data(d.blast) t.r <- regr(log10(tremor)~location+log10(distance)+log10(charge), data=d.blast) terms2order(t.r)