Calls glmmPQL in the MASS library, with the model being specified in the same manner as writeBugsModel
glmmPQLstrings(effects, covariates, observations, data = NULL,
family=c("bernoulli", "binomial", "poisson", "gaussian"), ...)
A vector of character strings containing the grouping levels, from most general to most specific
A list with names corresponding to effects and each element being a vector of covariates applicable at that level
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.
A data frame containing the response, covariates, and group membership.
The distribution to use. Either using glmmPQL
's specifications or writeBugsModel
further arguments to glmmPQL
In addition to the output from glmmPQL, the following are returned
As input
This function is useful for generating starting values for an MCMC chain.
# 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