- data
A data frame containing the variables in the model. If not found in data, the variables are taken from the environment (formula).
- formula
An object of class "formula". A symbolic description of the model to be fitted.
- reg.q
Logical flag. If TRUE, the model includes a dependency of q on the predictors x, as explained in 'logit' argument.
- reg.b
Logical flag. If TRUE, the model includes a dependency of beta on the predictors x, given by:
$$log(\beta)= \gamma_0+\gamma_1X_1+\ldots+\gamma_pX_p.$$
If FALSE, beta(x) is constant.
- logit
Logical flag. If TRUE, the model includes a dependency of q on predictors via a logit transformation as explained below.
The conditional distribution of Y (response) given x (predictors) is assumed a DW(q(x),beta(x)).
If logit=TRUE & (reg.q=TRUE)
$$log(q/(1-q))=\theta_0+\theta_1 X_1+\ldots+\theta_pX_p.$$
If logit=FALSE & (reg.q=TRUE)
$$log(-log(q))=\theta_0+\theta_1 X_1+\ldots+\theta_pX_p.$$
- initial
Vector of initial values for parameters. In all cases DW(q,B), DW(regQ,B), DW(q,rebB) and DW(regQ,regB) the first parameters correspond to q or corresponding regression coefficients and next is beta or corresponding regression coefficients. If penalized=TRUE then an extra value must be added for tuning parameter.
- iteration
Number of MCMC iterations.
- v.scale
The scale of the proposal function. Setting to lower values results in an increase in the acceptance rate of the sampler.
- RJ
Logical flag. If TRUE, Reversible-Jump sampling is used to draw samples from the posterior. Otherwise, a Metropolis-Hastings sampler applies.
- dist.q
Density function. Prior density for theta. If not set, an improper prior applies. Any two parameter density function is allowed, e.g. dnorm, dlaplace, dunif etc. Any customized density function must support log=TRUE flag.
- dist.b
Density function. Prior density for gamma. If not set, an improper prior applies. Any two parameter density function is allowed, e.g. dnorm, dlaplace, dunif etc. Any customized density function must support log=TRUE flag.
- q.par
A vector of length two corresponding to the parameters of 'dist.q'. The default is set to c(0,0).
- b.par
A vector of length two corresponding to the parameters of 'dist.b'. The default is set to c(0,0).
- penalized
logical flag. If TRUE, an hyper-parameter inducing shrinkage is considered. In this case, prior must be set to an informative prior, e.g. Gaussian, Laplace. See also 'l.par' and 'dist.l' below.
- dist.l
Density function. Hyper prior for penalty term. If not set, an improper prior is used. Any non-negative two parameter density function is allowed, e.g. dgamma, dbeta,... Any customized density function must support log=TRUE flag.
- l.par
A vector of length two corresponding to the parameters of the hyper-prior 'dist.l'. The default is set to c(0,0).
- bi.period
A numeric value in (0,1) indicating the burn-in period of the MCMC chain. The default is set to 0.25 meaning that 25% of values remove from the beginning of the output chain. See 'sampling'.
- cov
A value in {1,2,3,4}. If set to 1 then the adaptive-MH is performed; 2: an independent uniform proposal; 3: an independent Laplace proposal and 4: an independent Gaussian proposal. The default is 1. If cov=1 then the scale of the proposal is adapted from the data.
- sampling
Choose between independent (indp), systematic (syst) and burn-in (bin). If set to indp then the chain is not ordered! The default is 'bin'. Sampling interval for Systematic sampling is calculated from iteration(1-bi.period). Similarly for indp the number of samples is computed from iteration(1-bi.period).
- est
Statistic. The statistic that is used to estimate the parameters from marginal densities. Possible values are: mode, mean, median or any customized univariate measure of location. The default is 'mode'.
- fixed.l
A positive number. Set to a positive value corresponding to a parameter that does not need estimation. Set to any negative value to disable this option.
- jeffrey
A logical flag. Set to a TRUE to use Jeffrey prior. Notice that MCMC based on Jeffrey can take considerably long time and the results in the most cases are worse than using an improper flat (=1) prior.