
Last chance! 50% off unlimited learning
Sale ends in
Returns the number of parameters in a fitted model object.
nparam(object, …)
nparam.vlm(object, dpar = TRUE, …)
nparam.vgam(object, dpar = TRUE, linear.only = FALSE, …)
nparam.rrvglm(object, dpar = TRUE, …)
nparam.qrrvglm(object, dpar = TRUE, …)
nparam.rrvgam(object, dpar = TRUE, …)
Some VGAM object, for example, having
class vglmff-class
.
Other possible arguments fed into the function.
Logical, include any (estimated) dispersion parameters as a parameter?
Logical, include only the number of linear (parametric) parameters?
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.
This code has not been double-checked.
The code was copied from the AIC()
methods functions.
VGLMs are described in vglm-class
;
VGAMs are described in vgam-class
;
RR-VGLMs are described in rrvglm-class
;
AICvlm
.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab