powered by
Converts all factors and interactions to indicator variables, suitable for passing to WinBUGS.
getDesignMatrix(formula, data, effects = NULL)
A formula object specifying the fixed effects for the model
formula
A data frame containing the covariates and factors for random effects
A vector of character strings containing the grouping levels, from most general to most specific
A matrix containing the covariates, the response(s), and the random effect factors. Also attributes
A list giving the covariates which apply at each level, suitable for passing to winBugsRaggedArray
winBugsRaggedArray
A vector of character strings giving the responses
The most populous level of a factor is made the baseline.
winBugsRaggedArray, glmmBUGS
glmmBUGS
# NOT RUN { library(nlme) data(Muscle) muscleDesign = getDesignMatrix(conc ~ length, data=Muscle, effects="Strip" ) attributes(muscleDesign)$covariates attributes(muscleDesign)$response # }
Run the code above in your browser using DataLab