dev_calc {JOPS} | R Documentation |
Deviance calculation for GLM P-spline fitting.
Description
Calculates the deviance and returns the ML estimated dispersion parameter for a variety of response distributions for P-spline fitting within the GLM framework.
Usage
dev_calc(
family = "gaussian",
y,
mu,
m_binomial = 0 * y + 1,
r_gamma = 0 * y + 1
)
Arguments
family |
the response distribution, e.g. |
y |
the glm response vector of length |
mu |
the P-spline estimated mean for the glm response vector of length |
m_binomial |
a vector of binomial trials having |
r_gamma |
a vector of gamma shape parameters, when |
Value
A list with two fields:
dev |
the estimated deviance. |
dispersion_parm |
the ML estimated dispersion parameter. |
[Package JOPS version 0.1.19 Index]