glmm {GLMMGibbs}R Documentation

GLMMs By Gibbs Sampling

Description

glmm estimates the posterior distribution of the fixed effects of a Generalised Linear Mixed Model. It also estimates the hyperparameter related to each random effect, and the effect values of each random effect declared to be ``of interest'' by function Ra.

Usage

 glmm(formula, family, data, weights, offset, icm = 50,
      burnin = 1000, keep = 1000, model.show = FALSE,
      progress.info = 0, store.results = FALSE,  thin = 1,
      bugsfile, seed1 = 6762, seed2 = 92928, seed3 = 19729)

Arguments

formula The model formula for the model to be fitted.
family A description of the error distribution and link function to be used. At present the available options are "binomial" and "poisson". The canonical link must always be used, so there is no link argument.
data The name of a data frame in which the data is stored. (at present, the function can only be used with the data in a data frame)
weights A vector of weights.
icm The number of steps of deterministic maximisation of the posterior distribution by the Iterative Conditional Mode algorithm before sampling begins. All hyperparameters are fixed to 1.0 .
burnin The number of steps of Gibbs sampling taken before storage of the parameter values begins.
keep The number of steps of Gibbs sampling taken once storage of the parameter values has begun.
thin An integer t specifying that one storage of the parameter values has begun every (t) th iteration is saved
model.show A debugging argument used by he developers which will be deleted at the final release.
progress.info If an integer, n say, the functions reports when every n iterations have been carried out
bugsfile A character string. If not missing, the function creates two files, with this string their primary filenames and .ind and .out their secondary filenames (extensions) .These contain the output in {tt BUGS } format.
store.results if TRUE, returns the sampled values of the parameters (see ``Value'' below)
seed1 The first of three seeds supplied to the Random Number Generator used by the underlying C code
seed2 The second seed.
seed3 The third seed.

Details

Generalised Linear Mixed Models (GLMMs) are an extension of GLMs with the addition of ``random effects'' given whose values the response values are conditionally independent. The function glmm fits these models in a Bayesian paradigm by Gibbs sampling.

Full details are given in the document "GLMMGibbs: An R Package for Estimating Bayesian Generalised Linear Mixed Models by Gibbs Sampling", supplied with this package.

Value

an object of class glmmfit, which contains the sample statistics of the sampled values and, if the store.results argument is set to TRUE, the sampled values themselves.

Note

GLMMgibbs (the package from which glmm comes) is a beta release and we strongly recommend the use of save.image() before glmm() is used

Author(s)

Jonathan Myles, Imperial Cancer Research Fund, and David Clayton, Wellcome Trust mylesj@icrf.icnet.uk

References

Clayton, D.G. (1996) Generalized Linear Mixed Models in Markov chain Monte Carlo in Practice, ed. Gilks, W. R. and Richardson, S. and Spiegelhalter, D. J., Chapman & Hall.