predict.WEE.linear: WEE Linear Regression Prediction

Description Usage Arguments Details Value See Also Examples

View source: R/WEE_functions.r

Description

Prediction on new dataset based on model fitted by WEE linear regression

Usage

1
2
## S3 method for class 'WEE.linear'
predict(object,newx, ...)

Arguments

object

Object produced by WEE.linear.

newx

A data matrix in which to look for variables with which to predict, newx cannot be omitted.

...

Further arguments passed to or from other methods.

Details

Produces predicted values, obtained by evaluating the WEE linear regression function on newx.

Value

If in the WEE.linear fitting procedure boot = 0, only point predictions are provided here. If in the WEE.linear fitting procedurep boot > 0, standard errors of prediction are also provided.

See Also

WEE.linear

Examples

1
2
3
4
5
6
7
## continued from WEE.linear
## predict outcome y based on newx
newx = dat[sample(500000,3, replace=F),][,c("x","z")]
predict(WEE.linear(y ~ x + z, D, 
data = dat_sample, pD),newx)                                        
predict(WEE.linear(y ~ x + z, D, 
data = dat_sample, pD, boot = 500),newx)

WEE documentation built on May 2, 2019, 6:43 a.m.