Description Usage Arguments Value Author(s) Examples
This functions returns a Monte Carlo estimate of the predictive CDF P(T < t | D), based on a (pre-computed) posterior sample of all model parameters of the associated RMW regression model (obtained based on a dataset D).
1 | RMWreg_PredictCDF(Chain, Time, x, Mixing = "None", BaseModel = "Weibull")
|
Chain |
List containing the pre-computed MCMC sample (as generated by the function |
Time |
Time threshold t at which the predictive CDF is estimated. |
x |
Vector of covariate information for the new subject (must be in the same order as in the design matrix used to fit the model, including a '1' on the first position to represent the intercept). |
Mixing |
Mixing distribution assigned to the (frailty) random effects. Possible values are
|
BaseModel |
If |
A Monte Carlo estimate of the predictive CDF.
Catalina A. Vallejos cvallejos@turing.ac.uk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(KMsurv)
data(alloauto)
n=dim(alloauto)[1]; k=2
Intercept=rep(1,times=n); x1=alloauto$type-1
DesignMat=cbind(Intercept,x1); rm(Intercept)
Time=alloauto$time; Event=alloauto$delta
Chain <- RMWreg_MCMC(N = 100, Thin = 2, Burn = 50,
Time, Event, DesignMat,
Mixing = "None", BaseModel = "Weibull",
PriorCV = "Pareto", PriorMeanCV = 1.5,
Hyp1Gam = 1, Hyp2Gam = 1)
# Predictive CDF at time = 5, for a given covariate configuration
RMWreg_PredictCDF(Chain, Time = 5, x = c(1,1), Mixing = "None", BaseModel = "Weibull")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.