impute_rolling_AR1_Gaussian {imputeFin} | R Documentation |
Impute missing values of time series on a rolling window basis based on a Gaussian AR(1) model
Description
Impute inner missing values (excluding leading and trailing ones)
of time series on a rolling window basis. This is a wrapper of the
function impute_AR1_Gaussian
.
Usage
impute_rolling_AR1_Gaussian(
y,
rolling_window = 252,
random_walk = FALSE,
zero_mean = FALSE,
remove_outliers = FALSE,
outlier_prob_th = 0.001,
tol = 1e-10,
maxiter = 100
)
Arguments
y |
Time series object coercible to either a numeric vector or numeric matrix
(e.g., |
rolling_window |
Rolling window length (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 zero-mean so that |
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 |
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 |
Value
Same as impute_AR1_Gaussian
for the case n_samples = 1
and return_estimates = FALSE
.
Author(s)
Daniel P. Palomar
See Also
plot_imputed
, impute_AR1_Gaussian
Examples
library(imputeFin)
data(ts_AR1_Gaussian)
y_missing <- ts_AR1_Gaussian$y_missing
y_imputed <- impute_rolling_AR1_Gaussian(y_missing)
plot_imputed(y_imputed)