fit_VAR_t {imputeFin} | R Documentation |
Fit Student's t VAR model to time series with missing values and/or outliers
Description
Estimate the parameters of a Student's t vector autoregressive model
y_t = \phi_0 + \sum_{i=1}^p \Phi_i * y_{t-i} + \epsilon_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
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., |
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 |
parallel_max_cores |
Positive integer indicating the maximum numer of cores used in the parallel computing,
only valid when |
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 |
initial |
List with the initial values of the parameters of the VAR model, which may contain some or all of the following elements:
|
L |
Positive integer with the number of Markov chains (default is |
maxiter |
Positive integer with the number of maximum iterations (default is |
ptol |
Non-negative number with the tolerance to determine the convergence of the (stochastic) EM method. |
partition_groups |
Logical value indicating whether to partition |
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 |
Phii |
The estimate for |
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 |
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
Examples
library(imputeFin)
data(ts_VAR_t)
fitted <- fit_VAR_t(Y = ts_VAR_t$Y, p = 2, parallel_max_cores = 2)