tsnarmimp | R Documentation |
This function imputes missing values in a stationary multivariate time series using various methods, and removes cases with too many missing values.
tsnarmimp(
X,
max.missing = 0.8,
na.rm.method = c("LE", "all"),
na.impute = c("median.ma.spline", "median.ma", "median", "rnorm"),
ma.terms = 3L
)
X |
a | |||||||||||||||||
max.missing |
numeric. Proportion of series missing for a case to be considered missing. | |||||||||||||||||
na.rm.method |
character. Method to apply concerning missing cases selected through | |||||||||||||||||
na.impute |
character. Method to impute missing values for the PCA estimates used to initialize the EM algorithm. Note that data are standardized (scaled and centered) beforehand. Available options are:
| |||||||||||||||||
ma.terms |
the order of the (2-sided) moving average applied in |
The imputed matrix X_imp
, with attributes:
"missing" |
a missingness matrix |
"rm.rows" |
and a vector of indices of rows (cases) with too many missing values that were removed. |
library(xts)
str(tsnarmimp(BM14_M))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.