predict.DTR.Boots.KernSmooth {DTRKernSmooth}R Documentation

Predict the optimal treatment given a 'DTR.Boots.KernSmooth' object

Description

This function predicts the optimal treatments for new subjects from a fitted DTR.Boots.KernSmooth model.

Usage

## S3 method for class 'DTR.Boots.KernSmooth'
predict(object, newX, ...)

Arguments

object

Fitted "DTR.Boots.KernSmooth" model object.

newX

Matrix of new values for X at which predictions are to be made.

...

Not used. Other arguments to predict.

Details

All the predicted optimal treatments are labeled as {0,1}.

Value

A vector of predicted optimal treatments for the new subjects given the fitted DTR.Boots.KernSmooth model.

Author(s)

Yunan Wu and Lan Wang
Maintainer: Yunan Wu <yunan.wu@utdallas.edu>

References

Wu, Y. and Wang, L. (2021), Resampling-based Confidence Intervals for Model-free Robust Inference on Optimal Treatment Regimes, Biometrics, 77: 465– 476, doi:10.1111/biom.13337.

See Also

predict.DTR.KernSmooth, DTR.KernSmooth, DTR.Boots.KernSmooth

Examples

n <- 500; p <- 3
beta <- c(0.2,1,-0.5,-0.8)*0.7
beta1 <- c(1,-0.5,-0.5,0.5)

set.seed(12345)
X <- matrix(rnorm(n*p),n)
a <- rbinom(n,1,0.7)
mean1 <- exp(cbind(1,X) %*% beta1)
mean2 <- 8/(1 + exp(-cbind(1,X) %*% beta)) - 4
y <- mean1 + a * mean2 + rnorm(n)

boots_smooth_model <- DTR.Boots.KernSmooth(X, y, a, prob = 0.3 + 0.4*a, B = 100)
newn <- 10
newX <- matrix(rnorm(newn*p),newn)
predict(boots_smooth_model, newX)


[Package DTRKernSmooth version 1.1.0 Index]