helske / KFAS

KFAS: R Package for Exponential Family State Space Models
64 stars 17 forks source link

Corrections to diffuse likelihood? #2

Closed helske closed 9 years ago

helske commented 10 years ago

After reading the paper "Likelihood functions for state space models with diffuse initial conditions" (http://onlinelibrary.wiley.com/doi/10.1111/j.1467-9892.2010.00673.x/abstract) I think careful consideration of likelihood computations in KFAS is in place. Adding proposed correction terms should be pretty easy according to the paper.

For some reason I could not reproduce the last illustration in article, need to study the whole paper in more detail.

helske commented 9 years ago

This issue is now solved, I added the option marginal to logLik method which adds the additional term of likelihood also. Default is FALSE as the term is usually not needed and with that term the likelihood comparison to other functions such as lmer fail.