predict.splinesurv: Prediction for splinesurv objects

Description Usage Arguments

Description

Function to predict the the baseline hazard, frailty density, linear predictor, or risk for objects of type splinesurv.

Usage

1
2
3
4
5
## S3 method for class 'splinesurv'
predict(object, type = c("hazard","survival","lp","risk","frailty"),
        x = NULL, marginal = c("none", "mc", "numerical"), 
        newdata = NULL, iter = NULL, fn = mean,
        alpha = NULL, npost = 100, ...)

Arguments

object

an object of type splinesurv.

type

a string specifying the type of prediction. Setting "hazard" predicts the baseline hazard (default), "survival" predicts the survivor function, "lp" predicts the linear predictor, "risk" produces risk estimates, and "frailty" predicts the frailty density.

x

a vector containing the values at which prediction is desired. If NULL, a sequence of length 100 over the data range is used.

marginal

string specifying whether to plot marginal survivor functions. If "none", conditional survivor functions are plotted. If "mc", marginal survivor functions are computed by Monte Carlo integration, and if "numerical", by numerical integration. Ignored if type is not "survival"

newdata

a data frame in the same format as the original data containing data for prediction. If cluster membership is not set to NA, the frailty is included in predictions of the hazard or survival.

iter

integer, indicating which iteration of the MCMC chain to use. If NULL (default), the posterior means are used

npost

number of samples from the posterior to be used for estimating the curve

fn

function to be applied to the posterior samples. Defaults to mean, but can be set to median or any other summary function.

alpha

level of pointwise confidence bands. Setting alpha=NULL omits bands.

...

additional parameters currently ignored


splinesurv documentation built on May 2, 2019, 4:57 p.m.