nparamvglm: Number of Parameters

nparam.vlmR Documentation

Number of Parameters

Description

Returns the number of parameters in a fitted model object.

Usage

        nparam(object, ...)
    nparam.vlm(object, dpar = TRUE, ...)
   nparam.vgam(object, dpar = TRUE, linear.only = FALSE, ...)
 nparam.rrvglm(object, dpar = TRUE, ...)
nparam.drrvglm(object, dpar = TRUE, ...)
nparam.qrrvglm(object, dpar = TRUE, ...)
 nparam.rrvgam(object, dpar = TRUE, ...)

Arguments

object

Some VGAM object, for example, having class vglmff-class.

...

Other possible arguments fed into the function.

dpar

Logical, include any (estimated) dispersion parameters as a parameter?

linear.only

Logical, include only the number of linear (parametric) parameters?

Details

The code was copied from the AIC() methods functions.

Value

Returns a numeric value with the corresponding number of parameters. For vgam objects, this may be real rather than integer, because the nonlinear degrees of freedom is real-valued.

Warning

This code has not been double-checked.

Author(s)

T. W. Yee.

See Also

VGLMs are described in vglm-class; VGAMs are described in vgam-class; RR-VGLMs are described in rrvglm-class; AICvlm.

Examples

pneumo <- transform(pneumo, let = log(exposure.time))
(fit1 <- vglm(cbind(normal, mild, severe) ~ let, propodds, data = pneumo))
coef(fit1)
coef(fit1, matrix = TRUE)
nparam(fit1)
(fit2 <- vglm(hits ~ 1, poissonff, weights = ofreq, data = V1))
coef(fit2)
coef(fit2, matrix = TRUE)
nparam(fit2)
nparam(fit2, dpar = FALSE)

VGAM documentation built on Sept. 18, 2024, 9:09 a.m.