predict.regr {regr0} | R Documentation |
Calculates predicted values for regr
objects.
The possible results depend on the class of the fitted model.
## S3 method for class 'regr' predict(object, newdata = NULL, scale = object$sigma, df=object$df.residual, type = NULL, ...) ## S3 method for class 'polr' predict(object, newdata=NULL, type = c("class", "probs", "link"), ...) ## 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
data(d.blast) r.blast <- regr(log10(tremor)~location+log10(distance)+log10(charge), data=d.blast) t.pr <- predict(r.blast) showd(t.pr) data(d.fossiles) r.mregr <- regr(cbind(sAngle,lLength,rWidth)~SST.Mean+Salinity+lChlorophyll+region+N, data=d.fossiles) t.pr <- predict(r.mregr) showd(t.pr)