Title: | Bayesian Analysis of Censored Regression Models Under Scale Mixture of Skew Normal Distributions |
---|---|
Description: | Propose a parametric fit for censored linear regression models based on SMSN distributions, from a Bayesian perspective. Also, generates SMSN random variables. |
Authors: | Aldo M. Garay <[email protected]>, Monique B. Massuia <[email protected]>, Victor H. Lachos <[email protected]>, Eraldo B. Anjos Filho <[email protected]> |
Maintainer: | Aldo M. Garay <[email protected]> |
License: | GPL-3 |
Version: | 2.1 |
Built: | 2024-10-31 06:22:43 UTC |
Source: | CRAN |
Bayes.CR
Propose a parametric fit for censored linear regression models based on
SMSN distributions, from a Bayesian perspective.
Bayes.CR(cc, x, y, cens = "left", dist = "Normal", criteria = "FALSE", influence = "FALSE", spacing = "NULL", prior = NULL, hyper = NULL, n.thin = 10, burnin = 100, n.iter = 2000, n.chains = 2, chain = "TRUE")
Bayes.CR(cc, x, y, cens = "left", dist = "Normal", criteria = "FALSE", influence = "FALSE", spacing = "NULL", prior = NULL, hyper = NULL, n.thin = 10, burnin = 100, n.iter = 2000, n.chains = 2, chain = "TRUE")
cc |
Vector of censoring indicators. For each observation: 0 if non-censored, 1 if censored. |
x |
Matrix or vector of covariates. |
y |
Vector of responses in case of right/left censoring. |
cens |
"left" for left censoring, "right" for right censoring. |
dist |
Distribution to be used: "Normal" for Normal model, "T" for Student-t model, "Slash" for slash model, "NormalC" for contaminated Normal model, "SN" for Skew-Normal model, "ST" for Skew-t model and "SSL" for Skew-Slash model. |
criteria |
"TRUE" or "FALSE". Indicates if model selection criteria (LPML, DIC, EAIC, EBIC and WAIC) should be computed. |
influence |
"TRUE" or "FALSE". Indicates if the divergence measures (KL divergence, J, L and Chi Distance) should be computed. |
spacing |
Should only be specified if at least one of "influence" or "criteria" is TRUE. This is the lag between observations of the final chain (after burn-in and thinning) used to compute these measures. If spacing=1, all the chain is used. |
prior |
Prior distribution to be used for the degrees of freedom under Student-t model: "Exp" for exponential distribution, "Jeffreys" for Jeffreys prior, "Unif" for Uniforme distribution and "Hierar" for Hierarchical prior (exponential with a parameter that follows a uniform distribution). Must be "NULL" for other models. |
hyper |
Value of hyperparameter for the exponential prior. Must not be provided in case of others prior distributions. |
n.thin |
Lag for posterior sample. |
burnin |
Burn-in for posterior sample. |
n.iter |
The number of iterations to be considered (before burnin and thinning). |
n.chains |
The number of chains to be considered. It must be less than 5. |
chain |
If "TRUE", all the posterior chains are stored for posterior analysis. |
Specification of the priors distributions is given in reference papers (Garay et. al 2013 and Cancho et. al 2010). See Gelman et. al for the difference between the two versions of WAIC criterion. Calculations under the Skew-slash model may take a while, as it involves numerical integrations - you may want to specify big values to "spacing" under this model. For the Contaminated Normal model, a observation y comes from a normal distribution with mean "x beta" and variance "sigma2/rho" with probabilty "nu" and comes from a normal distribution with mean "x beta" and variance "sigma2" with probability 1-"nu".
Posterior mean for the parameters.
Standard deviations for the parameters.
HPD(95%) interval for the parameters.
Log-marginal pseudo likelihood for model selection.
DIC criterion for model selection.
EAIC criterion for model selection.
EBIC criterion for model selection.
First version of Watanabe-Akaike information criterion.
Second version of Watanabe-Akaike information criterion.
##Load the data
data(motorettes)
attach(motorettes)
##Set design matrix
x <- cbind(1,x)
##Fits a right censored normal model
Normal <- Bayes.CR(cc,x,y,cens="right",dist="Normal",n.thin=10,burnin=200,n.iter=800, n.chains=1,chain="TRUE")
Propose a parametric fit for censored linear regression models based on SMSN distributions, from a Bayesian perspective. Also, generates SMSN random variables.
Aldo M. Garay [email protected], Monique B. Massuia [email protected], Victor H. Lachos [email protected] and Eraldo B. Anjos Filho [email protected]
Maintainer: Aldo M. Garay [email protected]
Monique B. Massuia, Aldo M. Garay, Celso R. Cabral and Victor H. Lachos. "Bayesian analysis of censored linear regression models with scale mixtures of skew-normal distributions". Statistics and Its Interface, 2017, vol. 10, pages 425-439
Accelerated life tests on electrical insulation in motorettes with censoring times.
motorettes
motorettes
A data frame with 40 observed times of life tests on electrical insulation in motorettes at four different temperatures (150C, 170c, 190c and 200c). y corresponds to log10 of the failure time (or end of study time, in case of right censored observations), x corresponds to (100/(temperature + 273.2)) and cc is a indicator of censoring (1 if censored, 0 if not).
Tan, M., Tian, G. L. and Ng, K. W. (2009). Bayesian Missing Data Problems: EM, Data Augmentation and Noniterative Computation.
rSMSN
Generate random variables with one of the following distributions:
Normal, Student-t, Contaminated Normal, Slash, Skew-Normal, Skew-t and Skew-Slash.
rSMSN(n, mu, sigma2, lambda, nu, dist)
rSMSN(n, mu, sigma2, lambda, nu, dist)
n |
Number of observations to be generated. |
mu |
Location parameter. |
sigma2 |
Scale parameter. |
lambda |
Shape parameter (control skewness). Only must be provided for Skew-Normal, Skew-t and Skew-Slash distributions. |
nu |
Degree of freedom. Must not be provided for Normal and Skew-Normal distribution. Must be a vector of length 2 for Contaminated-Normal distribution. |
dist |
Distribution to be used: "Normal" for Normal model, "T" for Student-t model, "Slash" for slash model, "NormalC" for contaminated Normal model, "SN" for Skew-Normal model, "ST" for Skew-t model and "SSL" for Skew-Slash model. |
If Y follows a Contaminated Normal model, than a observation y comes from a normal distribution with mean "mu"" and variance "sigma2/rho" with probabilty "nu" and comes from a normal distribution with mean "mu" and variace "sigma2" with probability "1-nu".
# Generate a sample with 100 observations of a symmetric Student-t distribution sample <- rSMSN(n=100,mu=5,sigma2=2,lambda=0,nu=3,dist="T")
# Generate a sample with 100 observations of a symmetric Student-t distribution sample <- rSMSN(n=100,mu=5,sigma2=2,lambda=0,nu=3,dist="T")