BF_lambda_obs_LLAP: Outlier detection for observation for the log-Laplace model

View source: R/LogLaplace.R

BF_lambda_obs_LLAPR Documentation

Outlier detection for observation for the log-Laplace model

Description

This returns a unique number corresponding to the Bayes Factor associated to the test M_0: Λ_{obs} = λ_{ref} versus M_1: Λ_{obs}\neq λ_{ref} (with all other Λ_j,\neq obs free). The value of λ_{ref} is required as input. The user should expect long running times for the log-Student’s t model, in which case a reduced chain given Λ_{obs} = λ_{ref} needs to be generated

Usage

BF_lambda_obs_LLAP(obs, ref, X, chain)

Arguments

obs

Indicates the number of the observation under analysis

ref

Reference value λ_{ref} or u_{ref}

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 updates

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.

LLAP <- MCMC_LLAP(N = 1000, thin = 20, burn = 40, Time = cancer[, 1],
                  Cens = cancer[, 2], X = cancer[, 3:11])
LLAP.outlier <- BF_lambda_obs_LLAP(1,1, X = cancer[, 3:11], chain = LLAP)


nathansam/SMLN documentation built on May 14, 2022, 9:07 p.m.