log_lik: Calculate the log-likelihood
Description
The log-likelihood is calculated with taking into account
the type of data ('gaussian', 'binomial', ... etc) and
the link function.
Usage
log_lik(y, n, mu, wt, family, nparam, disp_mod)
Arguments
n
Vector of '1's and same length as y.
nparam
Number of parameters of the model.
disp_mod
Dispersion of the 'glm' model.
Value
The log-likelihood of an individual (trajectory).
Details
This function calculates the log-likelihood for the
exponential family
, it uses the 'AIC'
function to realise this operatin.