[R] ssa gapfill of series with large window and sparse gaps with Rssa

Ateljevich, Eli@DWR Eli.Ateljevich at water.ca.gov
Mon Apr 17 19:38:40 CEST 2017


I have several years of univariate wind speed data to which I would like to apply singular spectrum analysis. The data are sampled every 15min and a year is a fundamental periodicity, which suggests L=35,040 values.


I would like to fill the gaps. The missing values are scattered at low density throughout the series.  I doubt there is a block of even one month that doesn't have at least a couple pieces of missing data, but I'd surprised to learn the total number are prohibitive.


The filling routines in Rssa like igapfill assume a shaped ssa object, so it seems I need to run ssa successfully first before I can fill. When I try this with L=35,040 or anything above about 2,000 I get an error message
Nothing to decompose: the given field shape is empty
and warnings like
Some field elements were not covered by shaped window. 42646 elements will be ommited.


This is frustrating, because if I manually fill missing data with the series mean, which I understand as being the first step of igapfill, the decomposition succeeds with L=35040. The operation seems efficient and the spectral components look as expected. But since I have manually created a series with no missing data,  this doesn't help me with gap filling.


To concoct a shaped ssa object with the original missing pattern, I invoked force.decompose=FALSE. At that point I can bring my task to completion, but I don't know what I'm doing.  The only examples I see in the docs are not explained and are in 2D.


Can someone familiar with this kind of use case explain what the purpose of force.decompose and explain the best practice given my missing data situation? Are there consequences to my workaround? Thanks.


	[[alternative HTML version deleted]]



More information about the R-help mailing list