fit_VAR_t: Fit Student's t VAR model to time series with missing values...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/fit_VAR_t.R

Description

Estimate the parameters of a Student's t vector autoregressive model

y_t = φ_0 + ∑_{i=1}^p Φ_i * y_{t-i} + ε_t

to fit the given time series with missing values. If the time series does not contain missing values, the maximum likelihood (ML) estimation is done via the iterative EM algorithm until converge is achieved. With missing values, the stochastic EM algorithm is employed for the estimation (currently the maximum number of iterations will be executed without attempting to check early converge).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
fit_VAR_t(
  Y,
  p = 1,
  omit_missing = FALSE,
  parallel_max_cores = max(1, parallel::detectCores() - 1),
  verbose = FALSE,
  return_iterates = FALSE,
  initial = NULL,
  L = 10,
  maxiter = 50,
  ptol = 0.001,
  partition_groups = TRUE,
  K = round(maxiter/3)
)

Arguments

Y

Time series object coercible to either a numeric matrix (e.g., zoo or xts) with missing values denoted by NA.

p

Positive integer indicating the order of the VAR model.

omit_missing

Logical value indicating whether to use the omit-variable method, i.e., excluding the variables with missing data from the analysis (default is FALSE).

parallel_max_cores

Positive integer indicating the maximum numer of cores used in the parallel computing, only valid when partition_groups = TRUE (default is 1).

verbose

Logical value indicating whether to report in console the information of each iteration.

return_iterates

Logical value indicating whether to return the parameter estimates at each iteration (default is FALSE).

initial

List with the initial values of the parameters of the VAR model, which may contain some or all of the following elements:

  • nu (ν) - a positive number as the degrees of freedom,

  • phi0 (φ_0) - a numerical vector of length ncol(Y) as the interception of VAR model,

  • Phii (Φ_i) - a list of p matrices of dimension ncol(Y) as the autoregressive coefficient matrices,

  • scatter (Σ) - a positive definite of dimension ncol(Y) as the scatter matrix.

L

Positive integer with the number of Markov chains (default is 10).

maxiter

Positive integer with the number of maximum iterations (default is 100).

ptol

Non-negative number with the tolerance to determine the convergence of the (stochastic) EM method.

partition_groups

Logical value indicating whether to partition Y into groups (default is TRUE).

K

Positive integer indicating the values of the step sizes in the stochastic EM method.

Value

A list with the following elements:

nu

The estimate for ν.

phi0

The estimate for φ_0.

Phii

The estimate for Φ_i.

scatter

The estimate for scatter matrix, i.e., Σ.

converged

A logical value indicating whether the method has converged.

iter_usage

A number indicating how many iteration has been used.

elapsed_times

A numerical vector indicating how much is comsumed in each iteration.

elapsed_time

A number indicating how much time is comsumed overall.

elapsed_time_per_iter

A number indicating how much time is comsumed for each iteration in average.

iterates_record

A list as the records of parameter estimates of each iteration, only returned when return_iterates = TRUE.

Author(s)

Rui Zhou and Daniel P. Palomar

References

R. Zhou, J. Liu, S. Kumar, and D. P. Palomar, "Student’s t VAR Modeling with Missing Data via Stochastic EM and Gibbs Sampling," IEEE Trans. on Signal Processing, vol. 68, pp. 6198-6211, Oct. 2020.

See Also

fit_AR1_t

Examples

1
2
3
library(imputeFin)
data(ts_VAR_t)
fitted <- fit_VAR_t(Y = ts_VAR_t$Y, p = 2, parallel_max_cores = 2)

imputeFin documentation built on Feb. 20, 2021, 9:07 a.m.