Learn R Programming

glmmBUGS (version 2.4.2)

glmmPQLstrings: An alternat interface to glmmPQL

Description

Calls glmmPQL in the MASS library, with the model being specified in the same manner as writeBugsModel

Usage

glmmPQLstrings(effects, covariates, observations, data = NULL, 
family=c("bernoulli", "binomial", "poisson", "gaussian"), ...)

Arguments

effects

A vector of character strings containing the grouping levels, from most general to most specific

covariates

A list with names corresponding to effects and each element being a vector of covariates applicable at that level

observations

A character string giving the column of observations, or a vector where the first element is the observations and the remaning are offsets. For binomial responses, the first element is the counts (of successes), and the second element is the total number of trials. Note this differs from glmmPQL and glm's notation, but is consistent with WinBUGS.

data

A data frame containing the response, covariates, and group membership.

family

The distribution to use. Either using glmmPQL's specifications or writeBugsModel

further arguments to glmmPQL

Value

In addition to the output from glmmPQL, the following are returned

effects,covariates,observations

As input

Details

This function is useful for generating starting values for an MCMC chain.

See Also

getStartingValues,glmmPQL

Examples

Run this code
# NOT RUN {
library(nlme)
data(Muscle)
glmmPQLstrings(effects="Strip",  observations="conc",
  covariates=list(observations="length") ,
  data=Muscle, family="gaussian")
# }

Run the code above in your browser using DataLab