jglmm | R Documentation |
Fitting Generalized Linear Mixed-Effects Models in Julia
jglmm( formula, data, family = "normal", link = NULL, weights = NULL, contrasts = NULL, REML = FALSE ) ## S3 method for class 'jglmm' print(x, ...) ## S3 method for class 'jglmm' summary(object, ...)
formula |
A two-sided linear formula object describing both the fixed-effects and random-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right. Random-effects terms are distinguished by vertical bars ("|") separating expressions for design matrices from grouping factors. |
data |
A data frame containing the variables named in formula. |
family |
(optional) The distribution family for the response variable (defaults to "normal"). |
link |
(optional) The model link function (defaults to "identity"). |
weights |
(optional) A vector of prior case weights. |
contrasts |
(optional) A named list mapping column names of categorical variables in data to coding schemes (defaults to dummy coding all categorical variables). |
REML |
(optional) A logical indicating whether REML should be used
instead of maximum likelihood (defaults to |
x |
An object of class 'jglmm', as returned by 'jglmm()'. |
... |
Optional additional arguments, currently none are used. |
object |
An object of class 'jglmm', as returned by 'jglmm()'. |
An object of class 'jglmm'.
## Not run: jglmm_setup() # linear model lm1 <- jglmm(Reaction ~ Days + (Days | Subject), lme4::sleepstudy) # logistic model cbpp <- dplyr::mutate(lme4::cbpp, prop = incidence / size) gm1 <- jglmm(prop ~ period + (1 | herd), data = cbpp, family = "binomial", weights = cbpp$size) gm2 <- jglmm(prop ~ period + (1 | herd), data = cbpp, family = "binomial", weights = cbpp$size, contrasts = list(period = "effects")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.