logpoissonRE {glmmAK} | R Documentation

## Poisson log-linear regression with random effects

### Description

This function implements MCMC sampling for the Poisson log-linear model. Details are given in Komárek and Lesaffre (2007). On as many places as possible, the same notation as in this paper is used also in this manual page.

In general, the following log-linear model for response Y is assumed:

log(Y) = eta,

where the form of the linear predictor eta depends on whether a hierarchical centering is used or not. In the following, beta denotes fixed effects and b random effects.

No hierarchical centering (DEFAULT)
The linear predictor has the following form

eta= beta'(x', x(b)') + b'x(b),

where b is a vector of random effects with zero location.

Hierarchical centering
The linear predictor has the following form

eta= beta'x + b'x(b),

b is a vector of random effects with location alpha.

For description of the rest of the model, see `cumlogitRE`.

### Usage

    logpoissonRE(y, x, xb, offset=0, cluster,
          intcpt.random=FALSE,
          hierar.center=FALSE,
          drandom=c("normal", "gspline"),
          prior.fixed,
          prior.random,
          prior.gspline,
          init.fixed,
          init.random,
          init.gspline,
          nsimul = list(niter=10, nthin=1, nburn=0, nwrite=10),
          store = list(ecount=FALSE, b=FALSE, alloc=FALSE, acoef=FALSE),
          dir=getwd(),
          precision=8)

### Arguments

`y` | response vector taking integer values or zero.
`x` | vector, matrix or data.frame with covariates for fixed effects.
`xb` | vector, matrix or data.frame with covariates for random effects. If you want to include random intercept, do it by setting the argument `intcpt.random` to `TRUE`. The intercept column should not be included in `xb`.
`offset` | optional vector of the offset term.
`cluster` | see `cumlogitRE`.
`intcpt.random` | see `cumlogitRE`.
`hierar.center` | see `cumlogitRE`.
`drandom` | see `cumlogitRE`.
`prior.fixed` | see `cumlogitRE`.
`prior.random` | see `cumlogitRE`.
`prior.gspline` | see `cumlogitRE`.
`init.fixed` | see `cumlogitRE`.
`init.random` | see `cumlogitRE`.
`init.gspline` | see `cumlogitRE`.
`nsimul` | see `cumlogitRE`.
`store` | list indicating which chains (out of these not stored by default) should be compulsory stored. The list has the logical components with the following names. ecount if `TRUE` values of individual predictive (expected) counts are stored. b if `TRUE` values of cluster specific random effects are stored. alloc if `TRUE` values of allocation indicators are stored. acoef if `TRUE` and distribution of random effects is given as a bivariate G-spline values of log-G-spline weights (a coefficients) are stored for all components.
`dir` | see `cumlogitRE`.
`precision` | see `cumlogitRE`.

### Value

See `cumlogitRE.`

### Files created

iteration.sim
  see `cumlogitRE`.
betaF.sim
  sampled values of the fixed effects beta.

  Note that in models with G-spline distributed random effects which are not hierarchically centered, the average effect of the covariates involved in the random effects (needed for inference) is obtained as a sum of the corresponding beta coefficient and a scaled mean of the G-spline. beta coefficients adjusted in this way are stored in the file ‘betaRadj.sim’ (see below).

betaR.sim
  sampled values of the location parameters alpha of the random effects when the hierarchical centering was used.

  Note that in models with G-spline distributed random effects which are hierarchically centered, the average effect of the covariates involved in the random effects (needed for inference) is obtained as a sum of the corresponding alpha coefficient and a mean of the G-spline. alpha coefficients adjusted in this way are stored in the file ‘betaRadj.sim’ (see below).

varR.sim
  see `cumlogitRE`.
loglik.sim
  see `cumlogitRE`.
expectcount.sim
  sampled values of predictive (expected) counts for each observations.

  Created only if `store$ecount` is `TRUE`.

b.sim
  see `cumlogitRE`.

### Files created for models with G-spline distributed random effects

See `cumlogitRE`.

### Author(s)

Arnošt Komárek arnost.komarek[AT]mff.cuni.cz

### References

Agresti, A. (2002). Categorical Data Analysis. Second edition. Hoboken: John Wiley & Sons.

Gelfand, A. E., Sahu, S. K., and Carlin, B. P. (1995). Efficient parametrisations for normal linear mixed models. Biometrika, 82, 479–488.

Gilks, W. R. and Wild, P. (1992). Adaptive rejection sampling for Gibbs sampling. Applied Statistics, 41, 337–348.

Neal, R. M. (2003). Slice sampling (with Discussion). The Annals of Statistics, 31, 705–767.

Komárek, A. and Lesaffre, E. (2008). Generalized linear mixed model with a penalized Gaussian mixture as a random-effects distribution. Computational Statistics and Data Analysis, 52, 3441–3458.

Molenberghs, G. and Verbeke, G. (2005). Models for Discrete Longitudinal Data. New York: Springer Science+Business Media.

### See Also

`logpoisson`, `cumlogitRE`, `poisson`, `glm`.

### Examples

    ### See ex-Epileptic.pdf and ex-Epileptic.R
    ### available in the documentation
    ### to the package

[Package glmmAK version 1.3-1 Index]