llcmp-compute: Negative of the log-likelihood function from the...

Description Usage Arguments Details Value Author(s)

Description

Compute the negative of the logarithm of the likelihood function for a set of observations y from the reparametrized COM-Poisson model given the μ and ν parameters (see Details).

Usage

1
2
3
llcmp_fixed(beta, gama, X, Z, y)

llcmp(params, X, Z, y)

Arguments

beta

A vector of β parameter.

gama

A vector of γ parameter.

X

Design matrix related to the (approximate) mean parameter μ = \exp(X β).

Z

Design matrix related to the dispersion parameter ν = \exp(Z γ).

y

Vector of observed count data.

params

A vector of the model parameters params = c(beta, gama).

Details

The log-likelihood function is given by

\ell(β,ν) = ∑ y \logλ - ν\log y! - \log[Z(λ,ν)],

where

\logλ = ν \log≤ft(μ - \frac{ν-1}{2ν}\right),

and \log[Z(λ, ν)] is a normalizing constant computed in log space to avoid numerical issues (see compute_logz).

Value

The computed log-likelihood function.

Author(s)

Eduardo Jr <edujrrib@gmail.com>


JrEduardo/cmpreg documentation built on May 8, 2019, 4:41 p.m.