predict.WOCR: The Generic 'predict' Function for Object of 'WOCR' Class

Description Usage Arguments Value References See Also Examples

Description

The Generic predict Function for Object of WOCR Class

Usage

1
2
## S3 method for class 'WOCR'
predict(fit, newdata = NULL)

Arguments

fit

an object of WOCR class.

newdata

An optional data frame in which to look for variables with which to predict. If omitted, the fitted values (based on the original WOCR fit) are returned.

Value

The predicted values for observations in the new data.

References

See Also

WOCR

Examples

1
2
3
4
5
6
7
   data(BostonHousing1)
   fit.WOCR <- WOCR(formula=cmedv~., data=BostonHousing1, model="RR.d.lambda")
   # THE SAME DATA IS USED FOR PREDICTION HERE JUST FOR ILLUSTRATION
   par(mfrow=c(1, 1), mar=rep(4, 4))
   y.pred <- predict(fit.WOCR, newdata=BostonHousing1)
   plot(BostonHousing1$cmedv, y.pred, pch=19, cex=.6, col="cadetblue3", xlab="observed", ylab="predicted")
   abline(a=0, b=1, col="chocolate1", lwd=1.8)

xgsu/WOCR documentation built on May 4, 2019, 1:06 p.m.