analytic_filter {kDGLM}R Documentation

analytic_filter

Description

Fit a model given the observed value and the model parameters.

Usage

analytic_filter(
  outcomes,
  a1 = 0,
  R1 = 1,
  FF,
  FF.labs,
  G,
  G.labs,
  D,
  h,
  H,
  p.monit = NA,
  monitoring = FALSE
)

Arguments

outcomes

list: The observed data. It should contain objects of the class dlm_distr.

a1

numeric: The prior mean at the latent vector.

R1

matrix: The prior covariance matrix at the latent vector.

FF

array: A 3D-array containing the planning matrix at each time. Its dimension should be n x k x t, where n is the number of latent states, k is the number of linear predictors in the model and t is the time series length.

FF.labs

matrix: A character matrix containing the label associated with each value in FF.

G

array: A 3D-array containing the evolution matrix at each time. Its dimension should be n x n x t, where n is the number of latent states and t is the time series length.

G.labs

matrix: A character matrix containing the label associated with each value in G.

D

array: A 3D-array containing the discount factor matrix at each time. Its dimension should be n x n x t, where n is the number of latent states and t is the time series length.

h

matrix: A drift to be added after the temporal evolution (can be interpreted as the mean of the random noise at each time). Its dimension should be n x t, where t is the length of the series and n is the number of latent states.

H

array: A 3D-array containing the covariance matrix of the noise at each time. Its dimension should be the same as D.

p.monit

numeric (optional): The prior probability of changes in the latent space variables that are not part of its dynamic.

monitoring

numeric: A vector of flags indicating which latent states should be monitored.

Details

For the models covered in this package, we always use the approach described in Alves et al. (2024), including, in particular, the filtering algorithm presented in that work.

For the details about the implementation see dos Santos et al. (2024).

For the details about the algorithm implemented see Alves et al. (2024), Petris et al. (2009), chapter 2, West and Harrison (1997), chapter 4, and Kalman (1960).

Value

A list containing the following values:

References

Mariane Branco Alves, Helio S. Migon, RaĆ­ra Marotta, Junior, Silvaneo Vieira dos Santos (2024). “k-parametric Dynamic Generalized Linear Models: a sequential approach via Information Geometry.” 2201.05387.

Rudolph Emil Kalman (1960). “A New Approach to Linear Filtering and Prediction Problems.” Transactions of the ASME–Journal of Basic Engineering, 82(Series D), 35–45.

Giovanni Petris, Sonia Petrone, Patrizia Campagnoli (2009). Dynamic Linear Models with R, useR! Springer-Verlag, New York.

Mike West, Jeff Harrison (1997). Bayesian Forecasting and Dynamic Models (Springer Series in Statistics). Springer-Verlag. ISBN 0387947256.

Junior, Silvaneo Vieira dos Santos, Mariane Branco Alves, Helio S. Migon (2024). “kDGLM: an R package for Bayesian analysis of Dynamic Generialized Linear Models.”

See Also

fit_model

generic_smoother


[Package kDGLM version 1.2.0 Index]