View source: R/lme4_functions.R
mcml_glmer | R Documentation |
A wrapper for Model stochastic maximum likelihood model fitting replicating lme4's syntax
mcml_glmer(
formula,
data,
family,
start = NULL,
offset = NULL,
verbose = 1L,
iter.warmup = 100,
iter.sampling = 50,
weights = NULL,
...
)
formula |
A two-sided linear formula object including both the fixed and random effects specifications, see Details. |
data |
A data frame containing the variables named in 'formula'. |
family |
A family object expressing the distribution and link function of the model, see family. |
start |
Optional. A vector of starting values for the fixed effects. |
offset |
Optional. A vector of offset values. |
verbose |
Integer, controls the level of detail printed to the console, either 0 (no output), 1 (main output), or 2 (detailed output) |
iter.warmup |
The number of warmup iterations for the MCMC sampling step of each iteration. |
iter.sampling |
The number of sampling iterations for the MCMC sampling step of each iteration. |
weights |
Optional. A vector of observation level weights to apply to the model fit. |
... |
additional arguments passed to 'Model$MCML()' |
This function aims to replicate the syntax of lme4's 'lmer' command. The specified formula can be the standard lme4 syntax, or alternatively a glmmrBase style formula can also be used to allow for the wider range of covariance function specifications. For example both 'y~x+(1|cl/t)' and 'y~x+(1|gr(cl))+(1|gr(cl)*ar1(t))' would be valid formulae.
A 'mcml' model fit object.
#create a data frame describing a cross-sectional parallel cluster
data(Salamanders, package = "glmmrBase")
## Not run:
glm0 <- mcml_glmer(mating~fpop:mpop-1+(1|mnum)+(1|fnum),
data=Salamanders,family=binomial(),reml=FALSE)
glm1 <- mcml_glmer(mating~fpop:mpop-1+(1|mnum)+(1|fnum),
data =Salamanders, family=binomial(),reml=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.