predict.tsriadditive {tsriadditive} | R Documentation |
Predict method for Additive Hazards Model with Two Stage Residual Inclusion Method Fits
Description
Predicted values based on tsriadditive object.
Usage
## S3 method for class 'tsriadditive'
predict(object, newtreatment = NULL,
newIV = NULL, newcovariates = NULL, ...)
Arguments
object |
an object of class "tsriadditive", usually, a result of a call to tsriadditive. |
newtreatment |
a new treatment value. |
newIV |
a new instrumental variable value. |
newcovariates |
a new observed covariates. |
... |
further arguments passed to or from other methods. |
Value
predict.tsriadditive produces a venctor of predictions based on new values. A list with the following components is returned:
newobsz |
the vector grouping newtreatment, new IV and newcovariates |
score_pred |
the predicted scores |
hazard_pred |
the predicted baseline hazards function |
surival_pred |
the predicted surival function |
Examples
survtime <- rexp(100)
cause <- rbinom(100, 1, 0.7)
treatment <- rbinom(100, 1, 0.5)
IV <- rnorm(100)
covariates <- rnorm(100)
fit <- tsriadditive(survtime, cause, treatment, IV, covariates)
predict(fit, 1, 0, 0)
[Package tsriadditive version 1.0.0 Index]