predict.lmodel2 | R Documentation |
predict
is a generic function for predictions from the results of
various model fitting functions. predict.lmodel2
is the method
for model fit objects of class "lmodel2"
.
## S3 method for class 'lmodel2'
predict(
object,
method = "MA",
newdata = NULL,
interval = c("none", "confidence"),
level = 0.95,
...
)
object |
a fitted model object. |
method |
character One of the methods available in |
newdata |
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used. |
interval |
Type of interval calculation. |
level |
the confidence level required. Currently only 0.95 accepted. |
... |
ignored by this method. |
Function lmodel2()
from package 'lmodel2' returns a fitted
model object of class "lmodel2"
which differs from that returned by
lm()
. Here we implement a predict()
method for objects of
this class. It differs from the generic method and that for lm
objects in having an additional formal parameter method
that must be
used to select which of the methods supported by lmodel2()
are to be
used in the prediction. The returned object is similar in its structure to
that returned by predict.lm()
but lacking names or rownames.
If interval = "none"
a numeric vector is returned, while if
interval = "confidence"
a data frame with columns fit
,
lwr
and upr
is returned.
lmodel2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.