Description Usage Arguments Details Value Author(s) See Also Examples
Calculates predicted values for regr
objects.
The possible results depend on the class of the fitted model.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## S3 method for class 'regr'
predict(object, newdata = NULL, scale = object$sigma,
df=object$df.residual, type = NULL, ...)
## S3 method for class 'mlm'
predict(object, newdata=NULL, se.fit = FALSE,
scale = NULL, df = Inf,
interval = c("none", "confidence", "prediction"), level = 0.95,
type = c("response", "terms"), terms = NULL, na.action = na.pass,
pred.var = NULL, weights = 1, ...)
|
object |
Object of class |
newdata |
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used. |
se.fit |
if TRUE, standard errors will be calculated if possible |
scale |
Scale parameter for std.err. calculation |
df |
Degrees of Freedom to be used, for quantiles defining intervals |
interval |
Type of interval requested |
level |
Confidence level |
type |
Type of prediction: response or model term |
terms |
If |
na.action |
function determining what should be done with missing values
in |
pred.var, weights |
see |
... |
further arguments passed to specific methods |
regr
is a "super class" which includes many specific model
classes such as "lm", "glm", "polr", ... .
predict.regr
is a wrapper function that calls the specific methods
corresponding to the specific model class.
vector of predictions, or matrix with columns fit
, lwr
,
and upr
if interval
is set.
If se.fit
is TRUE
, a list with the
following components is returned:
fit |
vector or matrix as above |
se.fit |
standard error of predicted means |
residual.scale |
residual standard deviations |
df |
degrees of freedom for residual~Describe the value returned |
Werner A. Stahel, ETH Zurich
1 2 3 4 5 6 7 8 9 10 11 12 | data(d.blast, package="plgraphics")
r.blast <- regr(log10(tremor)~location+log10(distance)+log10(charge),
data=d.blast)
t.pr <- predict(r.blast)
plgraphics::showd(t.pr)
data(d.fossileSamples, package="plgraphics")
r.mregr <-
regr(cbind(sAngle,lLength,rWidth)~SST+Salinity+lChlorophyll+Region+N,
data=d.fossileSamples)
t.pr <- predict(r.mregr)
plgraphics::showd(t.pr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.