Package glmmAK
This package implements several generalized linear (mixed) models (GLMM) where for random effects either
a conventional normal distribution is assumed or a flexible model based on penalized smoothing
is used for the random effect distribution. We call the second class of models as penalized Gaussian mixture (PGM)
or shortly G-spline.
Models with random effects are estimated in a Bayesian way using the MCMC. The package implements also some models
without random effects and these can be estimated also using maximum-likelihood.
Additional information can be found in the references mentioned below and
at personal webpage of Arnošt Komárek.
This overview provides a sorted list of the functions of the package and links to few more involved examples.
1. Generalized linear models (GLM)
Two functions of the package implements few instances of the GLM and their equivalents can be found also in other (standard) R packages, namely
- cumlogit
fits
- a logit model for binomial response
(see also glm from package stats);
- a cumulative logit model for multinomial response under the assumption of the proportional odds
(see also polr from package MASS)
and also without assuming proportionality of the odds.
- logpoisson
fits a log-linear model for Poisson response
(see also glm from package stats).
2. Generalized linear mixed models (GLMM)
The core functions related to the GLMM's with normally distributed random effects and with random effects which distribution is specified in a flexible way
using the penalized Gaussian mixture (PGM) or shortly G-spline. Methodology has been described in
Main functions from the package related to this methodology
- cumlogitRE
implements MCMC sampling for the random effects logit model
for binary response and the cumulative logit model for multinomial response.
- cumlogitRE.predict
implements computation of the posterior predictive
category probabilities in models fitted using cumlogitRE.
- logpoissonRE
implements MCMC sampling for the random effects log linear model for Poisson response.
- logpoissonRE.predict
implements computation of the posterior predictive counts in models fitted using logpoissonRE.
- summaryGspline1
provides computation of the pointwise posterior summaries
(mean, quantiles) of a univariate penalized Gaussian mixture fitted as a random effect distribution
using cumlogitRE or logpoissonRE. In other words, this function provides an estimate of the random
effect distribution in PGM GLMM's with univariate random effects (e.g., models with random intercept).
- summaryGspline2
provides computation of the pointwise posterior summaries
(mean, quantiles) of a bivariate penalized Gaussian mixture fitted as a random effect distribution
using cumlogitRE or logpoissonRE. In other words, this function provides an estimate of the random
effect distribution in PGM GLMM's with bivariate random effects (e.g., models with random intercept and slope).
Secondary functions from the package related to this methodology
Examples
3. Posterior computation
There are few functions in the package for general posterior computation which either supplement
the coda package or slightly modify its functions:
4. Miscellaneous
The package also contains some functions which are either simple utilities or are related to some of my secondary interests
and were written mainly for testing purposes.
5. Datasets
Finally, there are some datasets, mostly taken from the literature, available in the package: