qmle_linear_state_space_model: Calculate Quasi-Likelihood and Maximum Likelihood Estimator...

qmle.linear_state_space_modelR Documentation

Calculate Quasi-Likelihood and Maximum Likelihood Estimator for Linear State Space Model

Description

A function for the quasi-maximum likelihood estimation of linear state space models, extending the qmle function.

Usage

qmle.linear_state_space_model(
  yuima, start, lower, upper, method = "L-BFGS-B", fixed = list(),
  envir = globalenv(), filter_mean_init, explicit = FALSE, drop_terms = 0,
  ...
)

Arguments

yuima

A yuima object. The class of yuima@model must be yuima.linear_state_space_model.

start

Initial values for the parameters to be passed to the optimizer.

lower

A named list specifying the lower bounds of the parameters.

upper

A named list specifying the upper bounds of the parameters.

method

The optimization method to be used. See optim.

fixed

A named list of parameters to be held fixed during optimization.

envir

An environment in which the model coefficients are evaluated.

filter_mean_init

Initial values of unobserved variables for the filter calculation.

explicit

A logical value. If TRUE, use the explicit formula to solve the filitering equation.

drop_terms

A numeric value. The specified number of initial terms in the filtering result will be excluded from the quasi-likelihood function calculation.

...

Additional arguments to be passed to the optim method. See Examples.

Value

A yuima.linear_state_space_qmle-class object, extending the yuima.qmle-class class.

model

A yuima.linear_state_space_model object.

drop_terms

A numeric value representing the number of terms ignored during optimization.

explicit

A logical value provided as an argument.

mean_init

A numeric value provided as the argument filter_mean_init.

...

Additional slots inherited from the yuima.qmle class.

Author(s)

YUIMA TEAM

References

Kurisaki, M. (2023). Parameter estimation for ergodic linear SDEs from partial and discrete observations. Stat Inference Stoch Process, 26, 279-330.

Bini, D., Iannazzo, B., & Meini, B. (2012). Numerical Solution of Algebraic Riccati Equations. Society for Industrial and Applied Mathematics.

Examples

### Set model
drift <- c("a*X", "X")
diffusion <- matrix(c("b", "0", "0", "sigma"), nrow = 2)
# Use `model.class="linearStateSpaceModel"` implicitly.
ymodel <- setModel(
    drift = drift, 
    diffusion = diffusion, 
    solve.variable = c("X", "Y"),
    state.variable = c("X", "Y"),
    observed.variable = "Y"
)

### Set data
T <- 100
N <- 50000
n <- N
h <- T / N

true.par <- list(
    a = -1.5,
    b = 0.3,
    sigma = 0.053
)
tmp.yuima <- simulate(
  ymodel, true.parameter = true.par, sampling = setSampling(n = N, Terminal = T)
)
ydata <- tmp.yuima@data
rm(tmp.yuima)

### Set yuima
variable_data_mapping <- list(
    #"X" = NA,
    "Y" = 2
)
yuima <- setYuima(model = ymodel, data = ydata, variable_data_mapping = variable_data_mapping)

# Estimate
upper.par <- list(
    a = 1,
    b = 5,
    sigma = 1
)

lower.par <- list(
    a = -10,
    b = 0.01,
    sigma = 0.001
)

start.par <- list(
    a = 0.5,
    b = 4,
    sigma = 0.9
)

filter_mean_init <- 0

res <- qmle.linear_state_space_model(
  yuima, start = start.par, upper = upper.par, lower = lower.par, 
  filter_mean_init = filter_mean_init
)

yuima documentation built on April 16, 2025, 5:12 p.m.