Log-marginal Likelihood estimator for the log-student's t model
Arguments
- thin
Thinning period.
- 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
- Q
Update period for the \(\lambda_{i}\)’s
- prior
Indicator of prior (1: Jeffreys, 2: Type I Ind. Jeffreys, 3: Ind. Jeffreys).
- 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 \((\epsilon_l)\) for set observations (default value: 0.5).
- eps_r
Upper imprecision \((\epsilon_r)\) for set observations (default value: 0.5)
Examples
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])
#> Sampling initial betas from a Normal(0, 1) distribution
#> Initial beta 1 : 0.9
#> Initial beta 2 : -1.12
#> Initial beta 3 : -2.53
#> Initial beta 4 : -0.92
#> Initial beta 5 : 1.87
#> Initial beta 6 : 0.97
#> Initial beta 7 : -0.33
#> Initial beta 8 : 0.04
#> Initial beta 9 : -0.47
#>
#> Sampling initial sigma^2 from a Gamma(2, 2) distribution
#> Initial sigma^2 : 1.48
#>
#> Sampling initial nu from a Gamma(2, 2) distribution
#> Initial nu : 0.53
#>
#> AR nu : 0.35
LST.LML <- LML_LST(thin = 20, Time = cancer[, 1], Cens = cancer[, 2],
X = cancer[, 3:11], chain = LST)
#> AR nu : 0.42
#> Likelihood ordinate ready!
#> Prior ordinate ready!
#> AR nu : 0
#> Reduced chain.sigma2 ready!
#> Posterior ordinate nu ready!
#> Posterior ordinate sigma2 ready!
#> AR nu : 0
#> Reduced chain.beta ready!
#> Posterior ordinate beta ready!
