Learn R Programming

kmlcov (version 1.0.1)

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

y
Observed values.
n
Vector of '1's and same length as y.
mu
Predicted values.
wt
Weights.
family
An object of class family.
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.