Description Usage Arguments Value Author(s) References See Also Examples
View source: R/estimate_impute_AR1_Gaussian.R
Estimate the parameters of a univariate Gaussian AR(1) model to fit the given time series with missing values and/or outliers. For multivariate time series, the function will perform a number of individual univariate fittings without attempting to model the correlations among the time series. If the time series does not contain missing values, the maximum likelihood (ML) estimation is done in one shot. With missing values, the iterative EM algorithm is employed for the estimation until converge is achieved.
1 2 3 4 5 6 7 8 9 10 11 12 |
y |
Time series object coercible to either a numeric vector or numeric matrix
(e.g., |
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 |
verbose |
Logical value indicating whether to output messages (default is |
return_iterates |
Logical value indicating if the iterates are to be returned (default is |
return_condMeanCov |
Logical value indicating if the conditional mean and covariance matrix of the
time series (excluding the leading and trailing missing values) given the observed data 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 |
If the argument y
is a univariate time series (i.e., coercible to a numeric vector), then this
function will return a list with the following elements:
|
The estimate for |
|
The estimate for |
|
The estimate for |
|
Numeric vector with the estimates for |
|
Numeric vector with the estimates for |
|
Numeric vector with the estimates for |
|
Numeric vector with the objective values at each iteration
(returned only when |
|
Numeric vector (of same length as argument |
|
Numeric matrix (with number of columns/rows equal to the length of the argument |
|
Indices of missing values imputed. |
|
Indices of outliers detected/corrected. |
If the argument y
is a multivariate time series (i.e., with multiple columns and coercible to a numeric matrix),
then this function will return a list with each element as in the case of univariate y
corresponding to each
of the columns (i.e., one list element per column of y
), with the following additional elements that combine the
estimated values in a convenient vector form:
|
Numeric vector (with length equal to the number of columns of |
|
Numeric vector (with length equal to the number of columns of |
|
Numeric vector (with length equal to the number of columns of |
Junyan Liu and Daniel P. Palomar
R. J. Little and D. B. Rubin, Statistical Analysis with Missing Data, 2nd ed. Hoboken, N.J.: John Wiley & Sons, 2002.
J. Liu, S. Kumar, and D. P. Palomar, "Parameter estimation of heavy-tailed AR model with missing data via stochastic EM," IEEE Trans. on Signal Processing, vol. 67, no. 8, pp. 2159-2172, 15 April, 2019.
impute_AR1_Gaussian
, fit_AR1_t
1 2 3 4 | library(imputeFin)
data(ts_AR1_Gaussian)
y_missing <- ts_AR1_Gaussian$y_missing
fitted <- fit_AR1_Gaussian(y_missing)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.