strucGlmer: Generalized linear mixed model with structured (co)variance...

Description Usage Arguments Examples

Description

Fits a generalized linear mixed model with structured (co)variance terms by the following fully modularized steps:

strucParseFormula

parses the mixed model formula with structured terms

mkGeneralGlmerDevfun

constructs a generalized linear mixed model deviance function

bobyqa

optimizer the deviance function

mkStrucGlmer

constructs an object of strucGlmer-class

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
strucGlmer(formula, ...)

## Default S3 method:
strucGlmer(formula, ...)

## S3 method for class 'formula'
strucGlmer(formula, data, family, addArgs = list(),
  modularVerb = FALSE, optVerb = 0L, optMaxit = 10000, weights = NULL,
  offset = NULL, etastart = NULL, devfunOnly = FALSE,
  numModularSteps = 4L, parList = NULL, ...)

## S3 method for class 'strucParseFormula'
strucGlmer(formula, family, optVerb = 0L,
  optMaxit = 10000, weights = NULL, offset = NULL, etastart = NULL, ...)

## S3 method for class 'function'
strucGlmer(formula, optVerb = 0L, optMaxit = 10000,
  parsedForm, initPars, lower, upper, ...)

## S3 method for class 'strucGlmer'
update(object, formula, parList, data = NULL,
  addArgs = list(), optVerb = 0L, optMaxit = 10000, weights = NULL,
  offset = NULL, etastart = NULL, ...)

Arguments

formula

extended mixed model formula or strucParseFormula object

data,family,weights,offset,etastart,devfunOnly

see glmer

addArgs

list of additional arguments to pass to

modularVerb

should the modular steps be announced during the fitting process?

optVerb

verbose

optMaxit

maximum number of iterations for the nonlinear optimizers

numModularSteps

number of modular steps to perform (defaults to 4, which is all of them). 1 returns the strucParseFormula object, 2 the deviance function, 3 the optimizer output, and 4 a strucGlmer object.

parList

potential named list of initial parameters

parsedForm

strucParseFormula object

initPars

initial parameter values (required for strucGlmer.function method if missing parsedForm)

lower,upper

lower and upper bounds of parameter values (only useful for strucGlmer.function method)

...

further arguments to mkGeneralGlmerDevfun

object

strucGlmer object

Examples

1
2
3
4
cbpp$incidenceBySize <- with(cbpp, incidence/size)
gm <- strucGlmer(incidenceBySize ~ factAnal(0 + herd | period, nAxes = 1),
                 data = cbpp, family = binomial, weights = cbpp$size,
                 penLoads = mkPenLpNorm())

stevencarlislewalker/lme4ord documentation built on May 30, 2019, 4:43 p.m.