sigma.glmmTMB {glmmTMB}R Documentation

Extract residual standard deviation or dispersion parameter

Description

For Gaussian models, sigma returns the value of the residual standard deviation; for other families, it returns the dispersion parameter, however it is defined for that particular family. See details for each family below.

Usage

## S3 method for class 'glmmTMB'
sigma(object, ...)

Arguments

object

a “glmmTMB” fitted object

...

(ignored; for method compatibility)

Details

The value returned varies by family:

gaussian

returns the maximum likelihood estimate of the standard deviation (i.e., smaller than the results of sigma(lm(...)) by a factor of (n-1)/n)

nbinom1

returns a dispersion parameter (usually denoted \alpha as in Hardin and Hilbe (2007)): such that the variance equals \mu(1+\alpha).

nbinom2

returns a dispersion parameter (usually denoted \theta or k); in contrast to most other families, larger \theta corresponds to a lower variance which is \mu(1+\mu/\theta).

Gamma

Internally, glmmTMB fits Gamma responses by fitting a mean and a shape parameter; sigma is estimated as (1/sqrt(shape)), which will typically be close (but not identical to) that estimated by stats:::sigma.default, which uses sqrt(deviance/df.residual)

beta

returns the value of \phi, where the conditional variance is \mu(1-\mu)/(1+\phi) (i.e., increasing \phi decreases the variance.) This parameterization follows Ferrari and Cribari-Neto (2004) (and the betareg package):

betabinomial

This family uses the same parameterization (governing the Beta distribution that underlies the binomial probabilities) as beta.

genpois

returns the index of dispersion \phi^2, where the variance is \mu\phi^2 (Consul & Famoye 1992)

compois

returns the value of 1/\nu; when \nu=1, compois is equivalent to the Poisson distribution. There is no closed form equation for the variance, but it is approximately underdispersed when 1/\nu <1 and approximately overdispersed when 1/\nu >1. In this implementation, \mu is exactly equal to the mean (Huang 2017), which differs from the COMPoissonReg package (Sellers & Lotze 2015).

tweedie

returns the value of \phi, where the variance is \phi\mu^p. The value of p can be extracted using family_params

The most commonly used GLM families (binomial, poisson) have fixed dispersion parameters which are internally ignored.

References


[Package glmmTMB version 1.1.9 Index]