nauf_glmer: Fit a mixed effects regression using 'nauf' contrasts.

Description Usage Arguments Details Value See Also Examples

View source: R/nauf_freq_regs.R

Description

The mixed effects regression functions nauf_lmer, nauf_glmer.nb, and nauf_glmer fit linear, negative binomial, and other generalized linear mixed effects models, respectively, impelementing nauf_contrasts.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
nauf_glmer(formula, data = NULL, family = gaussian,
  control = lme4::glmerControl(), start = NULL, verbose = 0L, nAGQ = 1L,
  subset, weights, na.action = na.pass, offset, contrasts = NULL, mustart,
  etastart, devFunOnly = FALSE, ncs_scale = attr(formula,
  "standardized.scale"), ...)

nauf_lmer(formula, data = NULL, REML = TRUE,
  control = lme4::lmerControl(), start = NULL, verbose = 0L, subset,
  weights, na.action = na.pass, offset, contrasts = NULL,
  devFunOnly = FALSE, ncs_scale = attr(formula, "standardized.scale"), ...)

nauf_glmer.nb(..., interval = log(th) + c(-3, 3), tol = 5e-05,
  verbose = FALSE, nb.control = NULL, initCtrl = list(limit = 20, eps = 2
  * tol, trace = verbose))

Arguments

formula, data, subset, weights, offset, control, start, devFunOnly, verbose, REML, family, etastart, mustart, nAGQ, interval, tol, nb.control, initCtrl, ...

See lmer, glmer, and glmer.nb. Note that many arguments that are passed to nauf_glmer are passed to nauf_glmer.nb through ..., including ncs_scale.

na.action, contrasts

Changes to the default values for these arguments are ignored with a warning. See nauf_model.frame.

ncs_scale

A positive number to be passed as the scale argument to named_contr_sum for all unordered factors. See nauf_model.frame. For nauf_glmer.nb, ncs_scale is passed through ....

Details

nauf_lmer, nauf_glmer, and nauf_glmer.nb are based on the lme4 functions lmer, glmer, and glmer.nb, respectively, but implement nauf_contrasts. The nauf functions have all the same arguments as the functions they are based on, but additionally ncs_scale, which is passed to nauf_model.frame. Other than ncs_scale, the arguments have the same functions as they do in the functions they are based on. The default values for na.action and contrasts cannot be changed (see nauf_model.frame).

Value

A fitted model of class nauf.lmerMod (nauf_lmer) or nauf.glmerMod (nauf_glmer and nauf_glmer.nb).

See Also

nauf_contrasts for a description of the contrasts applied to unordered factors; and lmer, glmer, and glmer.nb for argument definitions.

Examples

1
2
3
4
5
6
7
8
## Not run: 
dat <- plosives
dat$spont[dat$dialect == "Valladolid"] <- NA
sobj <- standardize(intdiff ~ voicing * dialect * spont +
  (1 + voicing * spont | speaker) + (1 + dialect | item), dat)
mod <- nauf_lmer(sobj$formula, sobj$data)

## End(Not run)

CDEager/nauf documentation built on May 6, 2019, 9:24 a.m.