Learn R Programming

tfarima (version 0.4.1)

logLik.ssm: Log-likelihood of a SS model

Description

logLik.ssm computes the exact or conditional log-likelihood of a state space model.

Usage

# S3 method for ssm
logLik(object, method = c("exact", "cond"), ...)

Value

The log-likelihood value.

Arguments

object

an object of class ssm.

method

character. Either "exact" or "conditional" maximum likelihood.

...

additional parameters.

Examples

Run this code

# Local level model
b <- 1
C <- as.matrix(1)
ssm1 <- ssm(Nile, b, C, S = diag(c(irr = 15127.7, lvl = 1453.2)))
logLik(ssm1)
 

Run the code above in your browser using DataLab