arguments.loglik {BTSR}R Documentation

Shared documentation for log-likelihood

Description

This is the common documentation for arguments related the log-likelihood functions, score vector and information matrix for BTSR models.

Arguments

m

a non-negative integer indicating the starting time for the sum of the partial log-likelihood, given by \ell = \sum_{t = m+1}^n \ell_t (extract and fit only). Default is m = 0. For details, see the Section The log-likelihood.

llk

logical; indicates whether the value of the log-likelihood function should be returned (extract and fit only). Default is llk = TRUE.

sco

logical; indicates whether the score vector should be returned (extract and fit only). Default is sco = FALSE.

info

logical; indicates whether the information matrix should be returned (extract and fit only). Default is info = FALSE. For the fitting function, info is automatically set to TRUE when report = TRUE.

extra

logical, if TRUE the matrices and vectors used to calculate the score vector and the information matrix are returned (extract and fit only). Default is extra = FALSE. Ignored by BARC models.

The log-likelihood

Let \boldsymbol\gamma = (\boldsymbol \rho', \boldsymbol \lambda')' be the vector of unknown parameters in the model where

The log-likelihood function, conditioned on a set of initial conditions \mathcal{F}_m is given by

\ell(\boldsymbol\gamma) = \sum_{t = m+1}^n \ell_t = \displaystyle\sum_{t=m+1}^n\log\!\big(f(Y_t \mid \mathcal{F}_{t-1}, \boldsymbol{\gamma})\big).

For simplicity of notation assume m = 0. The score vector U(\boldsymbol\gamma) = \big(U_{\boldsymbol\rho}(\boldsymbol\gamma)', U_{\boldsymbol\lambda}(\boldsymbol\gamma)'\big)' can be written as

U_{\boldsymbol\rho}(\boldsymbol\gamma) = D_{\boldsymbol\rho}' T_1\boldsymbol h_1 + M_{\boldsymbol\rho}' T_2\boldsymbol h_2 \qquad \mbox{and} \qquad U_{\boldsymbol\lambda}(\boldsymbol\gamma) = D_{\boldsymbol\lambda}' T_2\boldsymbol h_2,

where

For the models implemented so far, \partial\eta_{1t}/\partial\lambda_j = 0 so that we don't need a matrix for these derivatives.

The conditional Fisher information matrix for \boldsymbol\gamma is given by

K_n(\boldsymbol\gamma) = \begin{pmatrix} K_{\boldsymbol\rho,\boldsymbol\rho} & K_{\boldsymbol\rho,\boldsymbol\lambda}\\ K_{\boldsymbol\lambda,\boldsymbol\rho}& K_{\boldsymbol\lambda,\boldsymbol\lambda} \end{pmatrix}

with

\begin{aligned} K_{\boldsymbol\rho,\boldsymbol\rho} &= D'_{\boldsymbol \rho}T_1E_\mu T_1 D_{\boldsymbol \rho} + M'_{\boldsymbol \rho}T_2E_{\mu\nu}T_1 D_{\boldsymbol \rho} + D'_{\boldsymbol \rho}T_1E_{\mu\nu} T_2 M_{\boldsymbol \rho} + M'_{\boldsymbol \rho}T_2 E_\nu T_2 M_{\boldsymbol \rho}\\ K_{\boldsymbol\rho,\boldsymbol\lambda} &= K_{\boldsymbol\lambda,\boldsymbol\rho}'= D_{\boldsymbol \rho}' T_1E_{\mu\nu}T_2D_{\boldsymbol \lambda} + M_{\boldsymbol \rho}' T_2 E_\nu T_2 D_{\boldsymbol \lambda},\\ K_{\boldsymbol\lambda,\boldsymbol\lambda} &= D_{\boldsymbol \lambda}' T_2E_\nu T_2D_{\boldsymbol \lambda} \end{aligned}

where E_\mu, E_{\mu\nu} and E_\nu are diagonal matrices for which the (t,t)th element is given by

[E_\mu ]_{t,t} = -\mathbb{E}\bigg(\dfrac{\partial^2 \ell_t}{\partial \mu_t^2} \bigg| \mathcal{F} _{t-1} \bigg), \quad [E_{\mu\nu}]_{t,t} = -\mathbb{E}\bigg(\dfrac{\partial^2 \ell_t}{\partial\mu_t\partial \nu_t} \bigg| \mathcal{F} _{t-1} \bigg) \quad \mbox{and} \quad [E_\nu]_{t,t} = - \mathbb{E}\bigg(\dfrac{\partial^2 \ell_t}{ \partial \nu_t^2} \bigg| \mathcal{F} _{t-1} \bigg).


[Package BTSR version 1.0.0 Index]