predict.KMforCSD: Kernel Machine for Current Status Data - Prediction

Description Usage Arguments Value Examples

View source: R/train_predict.R

Description

predict.KMforCSD returns the KM decision function, together with the test data (which can be equivalent to the training data).

Usage

1
2
## S3 method for class 'KMforCSD'
predict(object, newdata)

Arguments

object

A KMforCSD fitted model. This is the output of KMforCSD.

newdata

A data frame consisting of the p-dimensional covariates Z, the current status indicator vector delta, and the censoring times C.

Value

The function returns a data frame consisting of newdata, and the kernel machine predictions.

Examples

1
2
3
4
5
d <- exp_data(n=100) #training set
sol <- KMforCSD(data=d[[1]]) #training
d_test <- exp_data(n=50) #test set
new_data <- predict(sol,d_test[[1]]) #prediction
decision_function <- new_data$prediction

Yael-Travis-Lumer/KMforCSD documentation built on June 3, 2021, 6:54 a.m.