The function returns the labels of the terms of the model Note. The terms are not identical to the coefficients.
a model object.
a character vector of coefficient labels.
model is an object returned by a model fitting
The character string passed to
ef must not include the
All non-intercept labels of any order are allowed.
a character vector of term labels (one element for each
term2coef for the inverse function.
1 2 3 4 5 6 7 8 9 10 11 12
require(utils) data(iris) fit <- lm(Sepal.Length ~ poly(Sepal.Width, 3), data = iris) summary(fit) coef2term(fit, "poly(Sepal.Width, 3)2") data(warpbreaks) fit2 <- lm(breaks ~ wool * tension, data = warpbreaks) summary(fit2) coef2term(fit2, c("woolB", "tensionH")) coef2term(fit2, c("woolB:tensionM"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.