"gapfill"(x, groups, base = c("original", "reconstructed"), method = c("sequential", "simultaneous"), alpha = 0.5, ..., drop = TRUE, drop.attributes = FALSE, cache = TRUE)
"gapfill"(x, groups, base = c("original", "reconstructed"), alpha = 0.5, ..., drop = TRUE, drop.attributes = FALSE, cache = TRUE)
"gapfill"(x, groups, base = c("original", "reconstructed"), method = c("sequential", "simultaneous"), alpha = 0.5, ..., drop = TRUE, drop.attributes = FALSE, cache = TRUE)
"gapfill"(x, groups, base = c("original", "reconstructed"), method = c("sequential", "simultaneous"), alpha = 0.5, ..., drop = TRUE, drop.attributes = FALSE, cache = TRUE)
groups
argumentreconstruct
routinesgroups
. If group is unnamed,
corresponding component gets name `Fn', where `n' is its index in
groups
list.Or, the forecasted object itself, if length of groups is one and 'drop = TRUE'.
Rssa
for an overview of the package, as well as,
rforecast
,
igapfill
,
# Produce series with gaps
F <- co2; F[100:200] <- NA
# Perform shaped SSA
s <- ssa(F, L = 72)
# Fill in gaps using the trend and 2 periodicty components
g <- gapfill(s, groups = list(1:6))
# Compare the result
plot(g)
lines(co2, col = "red")
Run the code above in your browser using DataLab