Skip to contents

The methods are parametrised by "mu" and takes additional arguments that are needed for the calculation through the ... argument

Usage

log_density(family, mu, Y, ...)

Arguments

family

a description of the error distribution and link function to be used in the model. This can be a character string 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 vector with values of the "main" parameter of the distribution specified by the family argument

Y

a numeric vector of the response variable in which to evaluate the density

...

arguments passed on to relevant methods

Value

numeric vector of log_density values

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