logLik.GNARfit function

Log-likelihood method for GNARfit objects

Log-likelihood method for GNARfit objects

Returns the log-likelihood for a GNARfit object.

## S3 method for class 'GNARfit' logLik(object,...)

Arguments

  • object: A GNARfit object generated by a GNARfit call.
  • ...: Optional additional arguments, not used here.

Details

S3 method for the GNARfit class. The function returns the value of

TN/2log(2π)T/2log(Σ)1/2trace(EΣ1E), -TN/2 \log(2 \pi) - T/2 \log(| \Sigma |) - 1/2 trace(E \Sigma^{-1} E'),

where TT is the time length of the observations, NN is the number of nodes, Σ=EE/T\Sigma = E E' /T is the estimated covariance matrix and EE is the matrix of residuals.

Returns

A logLik object.

Examples

#calculate log-likelihood for fiveNode data #global alphas logLik(GNARfit()) #individual alphas logLik(GNARfit(globalalpha=FALSE))
  • Maintainer: Matt Nunes
  • License: GPL-2
  • Last published: 2024-10-02

Useful links