S3 generic for calculating the log density of a distribution dispatched via a family
Source:R/glm_utils.R
log_density.RdThe methods are parametrised by "mu" and takes additional arguments that are
needed for the calculation through the ... argument
Arguments
- family
a description of the error distribution and link function to be used in the model. This can be a
characterstring naming a family function, a family function or the result of a call to a family function. (See family for details of family functions.)- mu
a
numeric vectorwith values of the "main" parameter of the distribution specified by thefamilyargument- Y
a
numeric vectorof the response variable in which to evaluate the density- ...
arguments passed on to relevant methods
Details
Supported families are gaussian, binomial, poisson and negative.binomial.
Implement your own S3 method to add support for a new family.
In mcmcglm when this function is called, the mu is the modelled
mean in the glm model (meaning it's the inverse link of the linear predictor). Reference
methods to see the parametrisation