Description Usage Arguments Value Author(s) References See Also Examples
View source: R/estimate_impute_AR1_t.R
Impute inner missing values (excluding leading and trailing ones)
of time series by drawing samples from the conditional distribution
of the missing values given the observed data based on a Student's t
AR(1) model as estimated with the function fit_AR1_t
.
Outliers can be detected and removed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 
y 
Time series object coercible to either a numeric vector or numeric matrix
(e.g., 
n_samples 
Positive integer indicating the number of imputations (default is 
random_walk 
Logical value indicating if the time series is assumed to be a random walk so that 
zero_mean 
Logical value indicating if the time series is assumed zeromean so that 
fast_and_heuristic 
Logical value indicating whether a heuristic but fast method is to be used to
estimate the parameters of the Student's t AR(1) model (default is 
remove_outliers 
Logical value indicating whether to detect and remove outliers. 
outlier_prob_th 
Threshold of probability of observation to declare an outlier (default is 
verbose 
Logical value indicating whether to output messages (default is 
return_estimates 
Logical value indicating if the estimates of the model parameters
are to be returned (default is 
tol 
Positive number denoting the relative tolerance used as stopping criterion (default is 
maxiter 
Positive integer indicating the maximum number of iterations allowed (default is 
K 
Positive number controlling the values of the step sizes in the stochastic EM method
(default is 
n_burn 
Positive integer controlling the length of the burnin period of the Gibb sampling
(default is 
n_thin 
Positive integer indicating the sampling period of the Gibbs sampling in the stochastic
EM method (default is 
By default (i.e., for n_samples = 1
and return_estimates = FALSE
),
the function will return an imputed time series of the same class and dimensions
as the argument y
with one new attribute recording the locations of missing
values (the function plot_imputed
will make use of such information
to indicate the imputed values), as well as locations of outliers removed.
If n_samples > 1
, the function will return a list consisting of n_sample
imputed time series with names: y_imputed.1, y_imputed.2, etc.
If return_estimates = TRUE
, in addition to the imputed time series y_imputed
,
the function will return the estimated model parameters:

The estimate for 

The estimate for 

The estimate for 

The estimate for 
Junyan Liu and Daniel P. Palomar
J. Liu, S. Kumar, and D. P. Palomar, "Parameter estimation of heavytailed AR model with missing data via stochastic EM," IEEE Trans. on Signal Processing, vol. 67, no. 8, pp. 21592172, 15 April, 2019.
plot_imputed
, fit_AR1_t
, impute_AR1_Gaussian
1 2 3 4 5  library(imputeFin)
data(ts_AR1_t)
y_missing < ts_AR1_t$y_missing
y_imputed < impute_AR1_t(y_missing)
plot_imputed(y_imputed)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.