Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

logLik.GNARfit

Log-likelihood method for GNARfit objects


Description

Returns the log-likelihood for a GNARfit object.

Usage

## 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/2 \log(2 π) - T/2 \log(| Σ |) - 1/2 trace(E Σ^{-1} E'),

where T is the time length of the observations, N is the number of nodes, Σ = E E' /T is the estimated covariance matrix and E is the matrix of residuals.

Value

A logLik object.

Examples

#calculate log-likelihood for fiveNode data
#global alphas
logLik(GNARfit())
#individual alphas
logLik(GNARfit(globalalpha=FALSE))

GNAR

Methods for Fitting Network Time Series Models

v1.1.1
GPL-2
Authors
Kathryn Leeming [aut], Guy Nason [aut], Matt Nunes [aut, cre], Marina Knight [ctb]
Initial release
2020-11-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.