predict.swReg: Get predictions for a given swReg model

Description Usage Arguments Value Examples

Description

predict.swReg returns predictions for a given swReg model

Usage

1
2
## S3 method for class 'swReg'
predict(object, newdata = object$data$X, ...)

Arguments

object

an R object resulting from application of swReg

newdata

a dataframe or matrix with predictor variable values.

...

currently not used.

Value

A vector of predictions for newdata.

Examples

1
2
3
4
5
6
7
8
## Example using Boston Housing data:
 library(MASS)
 X <- as.matrix(Boston[1:400,-14])
 Y <- Boston$medv[1:400]
 swReg1 <- swReg(X, Y, stepsize = .01)
 swReg2 <- swReg(X, Y, stepsize = .01, standardizeY = FALSE)
 plot.swReg(swReg1, newdata = Boston[401:502,-14])
 plot.swReg(swReg2, newdata = Boston[401:502,-14])

marjoleinF/swReg documentation built on May 21, 2019, 11:47 a.m.