Delta_l_x: Delta_l_x, computes the approximate change in observed...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Delta_l_x.R

Description

computes the approximate change in observed likelihood via the kalman filter

Usage

1
Delta_l_x(xxx, para, para_old, order)

Arguments

xxx

a matrix of simulated data, reused from the E-step to calc change in l_x

para

updated parameter

para_old

parameters from previous iteration

order

a vector of p, q

Details

To compute xxx, you should run the Q_function, xxx is a by-product assigned as a global variable because Q_function must return a scalar to be optimised via the optim() function

Value

a numeric value of the change in the observed-data log likelihood

Author(s)

Hannah Lennon

References

Brockwell and Davis (1987)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(polynom)
para      <- c(0.9, -0.5)
para.star <- c(0.8, -0.5)
low  <- c(rep(-1, 10))
up   <- c(rep( 1, 10))
p    <- 1
q    <- 1
Q_function(para, para.star, m=10, low, up, p, q)  
## output is xxx 
# The evaluation of the Q_function (above) is to compute xxx, 
#     it is a by-product assigned as a global variable

Delta_l_x(xxx, c(0.9, -0.5), c(0.89, -0.48), c(1,1))
Delta_l_x(xxx, c(0.9, -0.5), c(0.9, -0.5), c(1,1))

hlennon/copulaIVTS documentation built on Dec. 20, 2021, 4:45 p.m.