Description Usage Arguments Value References See Also Examples
The Generic predict
Function for Object of WOCR
Class
1 2 |
fit |
an object of |
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. |
The predicted values for observations in the new data.
Su, X., Wonkye, Y., Wang, P., and Yin, X. (2016+). Weighted orthogonal component regression (WOCR). Submitted.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.