Usage
GLMM_MCMC(y, dist = "gaussian", id, x, z, random.intercept,
prior.alpha, init.alpha, init2.alpha,
scale.b, prior.b, init.b, init2.b,
prior.eps, init.eps, init2.eps,
nMCMC = c(burn = 10, keep = 10, thin = 1, info = 10),
tuneMCMC = list(alpha = 1, b = 1),
store = c(b = FALSE), PED = TRUE, keep.chains = TRUE,
dens.zero = 1e-300, parallel = FALSE, cltype, silent = FALSE)## S3 method for class 'GLMM_MCMC':
print(x, \dots)
## S3 method for class 'GLMM_MCMClist':
print(x, \dots)
Arguments
y
vector, matrix or data frame with responses. If y is vector then
there is only one response in the model. If y is matrix or data frame then
each column gives values of one response. Missing values are allowed. If
dist
character (vector) which determines distribution (and a link function)
for each response variable. Possible values are:
gaussian for gaussian (normal) distribution (with identity link),
binomial(logit) for
id
vector which determines longitudinally or otherwise dependent observations. If not given then it is assumed
that there are no clusters and all observations of one response are
independent.
x
matrix or a list of matrices with covariates (intercept not included) for fixed effects.
If there is more than one response, this must always be a list. Note that intercept in included
in all models. Use a character value empty as
z
matrix or a list of matrices with covariates (intercept not included) for random effects.
If there is more than one response, this must always be a list. Note that random intercept
is specified using the argument random.intercept.
random.intercept
logical (vector) which determines for which responses random intercept
should be included.
prior.alpha
a list which specifies prior distribution for fixed
effects (not the means of random effects). The prior distribution is
normal and the user can specify the mean and variances.
The list prior.alpha can have the components listed b
init.alpha
a numeric vector with initial values of fixed effects
(not the means of random effects) for the first chain. A sensible value is determined using the
maximum-likelihood fits (using lmer functions)
init2.alpha
a numeric vector with initial values of fixed
effects for the second chain.
scale.b
a list specifying how to scale the random effects during
the MCMC. A sensible value is determined using the
maximum-likelihood fits (using lmer functions)
and does not have to be given by the u prior.b
a list which specifies prior distribution for (shifted
and scaled) random effects. The prior is in principle a normal
mixture (being a simple normal distribution if we restrict the
number of mixture components to be equal to one).
The
init.b
a list with initial values of the first chain for parameters related to the
distribution of random effects and random effects
themselves. Sensible initial values are determined by the function
itself and do not have to be given by the user.
init2.b
a list with initial values of the second chain for parameters related to the
distribution of random effects and random effects
themselves.
prior.eps
a list specifying prior distributions for
error terms for continuous responses. The list prior.eps can
have the components listed below. For all components, a sensible
value leading to weakly informative prior distribution can
init.eps
a list with initial values of the first chain for parameters related to the
distribution of error terms of continuous responses. The list
init.eps can have the components listed below. For all
components, a sensible value can be d
init2.eps
a list with initial values of the second chain for parameters related to the
distribution of error terms of continuous responses.
nMCMC
numeric vector of length 4 giving parameters of the MCMC
simulation. Its components may be named (ordering is then unimportant) as:
[object Object],[object Object],[object Object],[object Object]
In total $(M_{burn} + M_{keep}) \cdot M_{thin}$
tuneMCMC
a list with tuning scale parameters for proposal
distribution of fixed and random effects. It is used only when there
are some discrete response profiles. The components of the list have
the following meaning:
[object Object],[object Objec
store
logical vector indicating whether the chains of
parameters should be stored. Its components may be named (ordering
is then unimportant) as:
[object Object]
PED
a logical value which indicates whether the penalized
expected deviance (see Plummer, 2008 for more details)
is to be computed (which requires two parallel
chains).
keep.chains
logical. If FALSE, only summary statistics
are returned in the resulting object. This might be useful in the
model searching step to save some memory.
dens.zero
a small value used instead of zero when computing
deviance related quantities.
parallel
a logical value which indicates whether parallel
computation (based on a package parallel)
should be used when running two chains for the purpose of PED
calculation.
cltype
optional argument applicable if parallel is
TRUE. If cltype is given, it is passed as the
type argument into the call to makeCluster. silent
a logical value indicating whether the information on
the MCMC progress is to be supressed.
...
additional arguments passed to the default print method.