CaseDeletion_LST | R Documentation |
Leave-one-out cross validation analysis. The function returns a matrix with n rows. The first column contains the logarithm of the CPO (Geisser and Eddy, 1979). Larger values of the CPO indicate better predictive accuracy of the model. The second and third columns contain the KL divergence between π(β, σ^2, θ | t_{-i}) and π(β, σ^2, θ | t) and its calibration index p_i, respectively.
CaseDeletion_LST(Time, Cens, X, chain, set = TRUE, eps_l = 0.5, eps_r = 0.5)
Time |
Vector containing the survival times. |
Cens |
Censoring indication (1: observed, 0: right-censored). |
X |
Design matrix with dimensions n x k where n is the number of observations and k is the number of covariates (including the intercept). |
chain |
MCMC chains generated by a BASSLINE MCMC function |
set |
Indicator for the use of set observations (1: set observations, 0: point observations). The former is strongly recommended over the latter as point observations cause problems in the context of Bayesian inference (due to continuous sampling models assigning zero probability to a point). |
eps_l |
Lower imprecision (ε_l) for set observations (default value: 0.5). |
eps_r |
Upper imprecision (ε_r) for set observations (default value: 0.5) |
library(BASSLINE) # Please note: N=1000 is not enough to reach convergence. # This is only an illustration. Run longer chains for more accurate # estimations. LST <- MCMC_LST(N = 1000, thin = 20, burn = 40, Time = cancer[, 1], Cens = cancer[, 2], X = cancer[, 3:11]) LST.CD <- CaseDeletion_LST(Time = cancer[, 1], Cens = cancer[, 2], cancer[, 3:11], chain = LST)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.