BayesCslogistic: Perform a Bayesian Analysis of a conditionally specified... In cslogistic: Conditionally Specified Logistic Regression

Description

This function generates a posterior density sample from a conditionally specified logistic regression model for multivariate binary data using a random walk Metropolis algorithm. The user supplies data and priors, and a sample from the posterior density is returned as a object, which can be subsequently analyzed with functions provided in the coda package.

Usage

 1 2 3 BayesCslogistic(formula, type = TRUE, intercept = TRUE, burnin = 1000, mcmc = 10000, thin=1, tune=1.1, beta.start = NA, b0 = 0, B0 = 0, ...)

Arguments

 formula Model formula. type logical variable indicating if covariates have the same effect 'TRUE' or different effect 'FALSE' for each variable. intercept logical variable indicating if only the intercept 'TRUE' or all the covariates have different effect 'FALSE' for each variable. The option 'type' must be 'FALSE'. burnin The number of burn-in iterations for the sampler. mcmc The number of Metropolis iterations for the sampler. thin The thinning interval used in the simulation. The number of mcmc iterations must be divisible by this value. tune Metropolis tuning parameter. Make sure that the acceptance rate is satisfactory (typically between 0.20 and 0.5) before using the posterior density sample for inference. beta.start The starting value for the beta vector. This can either be a scalar or a column vector with dimension equal to the number of betas. If this takes a scalar value, then that value will serve as the starting value for all of the betas. The default value of NA will use the maximum likelihood estimate of beta as the starting value. Those are obtained using the function Cslogistic b0 The prior mean of beta. This can either be a scalar or a column vector with dimension equal to the number of betas. If this takes a scalar value, then that value will serve as the prior mean for all of the betas. B0 The prior precision of beta. This can either be a scalar or a square matrix with dimensions equal to the number of betas. If this takes a scalar value, then that value times an identity matrix serves as the prior precision of beta. Default value of 0 is equivalent to an improper uniform prior for beta. ... further arguments to be passed.

Value

An mcmc object that contains the posterior density sample. This object can be summarized by functions provided by the coda package.

Author(s)

Alejandro Jara atjara@uc.cl

Maria Jose Garcia-Zattera mjgarcia@uc.cl

References

Garcia-Zattera, M. J., Jara, A., Lesaffre, E. and Declerck, D. (2007). Conditional independence of multivariate binary data with an application in caries research. Computational Statistics and Data Analysis, 51(6): 3223-3232.

Joe, H. and Liu, Y. (1996). A model for multivariate response with covariates based on compatible conditionally specified logistic regressions. Satistics & Probability Letters 31: 113-120.