You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to highlight two issues I found, however, with the seasonal package for your kind consideration – that is, in relation to the rarely used argument na.action.
If one uses na.action = na.exclude or na.action = na.x13 and update() is invoked, either directly, or through running predict() with the newdata argument or e.g., calling out(), na.action defaults back to na.omit. You can see this in the attached code in line 21, where there are no NA in the final series and, even worse, in lines 28 and 29, where the updated adjustment no longer handles NA by substituting them with -99999.
If one uses na.action = na.exclude and returns output with series(), there is no NA action handled, unlike in predict() or final() with extract_w_na_action() – see line 20. I have to admit, though, that it is not clear to me either what actually should be reported back here for instance when seats.appendfcst = "yes" is applied. In fact, doing so leads to predict() and final() crashing. Note that series() and output after update() do not crash only because of 1. Maybe this combination of options should be disallowed?
I hope this helps.
library(seasonal)
AirPassengersNA<- window(AirPassengers, end=1962, extend=TRUE)
seas.omit<- seas(AirPassengersNA, na.action=na.omit)
seas.exclude<- seas(AirPassengersNA, na.action=na.exclude) # seats.appendfcst = "yes"# AirPassengersNA[20] <- NA # not run for comparabilityseas.x13<- seas(AirPassengersNA, na.action=na.x13)
# na.omit
final(seas.omit) # NA omitted
predict(seas.omit) # calls final()
series(seas.omit, 's11') # no NA handler - not needed
predict(seas.omit, AirPassengersNA) # newdata to invoke update()
out(seas.omit) # invokes update()# na.exclude
final(seas.exclude) # with NA handler: extract_w_na_action()
predict(seas.exclude) # calls final()
series(seas.exclude, 's11') # no NA handler - inconsistent
predict(seas.exclude, AirPassengersNA) # newdata to invoke update()
out(seas.exclude) # invokes update()# na.x13
final(seas.x13) # no NA
predict(seas.x13) # calls final()
series(seas.x13, 's11') # no NA handler - not needed
predict(seas.x13, AirPassengersNA) # newdata to invoke update()
out(seas.x13) # invokes update()
The text was updated successfully, but these errors were encountered:
Via email from Jens:
I wanted to highlight two issues I found, however, with the seasonal package for your kind consideration – that is, in relation to the rarely used argument na.action.
If one uses na.action = na.exclude or na.action = na.x13 and update() is invoked, either directly, or through running predict() with the newdata argument or e.g., calling out(), na.action defaults back to na.omit. You can see this in the attached code in line 21, where there are no NA in the final series and, even worse, in lines 28 and 29, where the updated adjustment no longer handles NA by substituting them with -99999.
If one uses na.action = na.exclude and returns output with series(), there is no NA action handled, unlike in predict() or final() with extract_w_na_action() – see line 20. I have to admit, though, that it is not clear to me either what actually should be reported back here for instance when seats.appendfcst = "yes" is applied. In fact, doing so leads to predict() and final() crashing. Note that series() and output after update() do not crash only because of 1. Maybe this combination of options should be disallowed?
I hope this helps.
The text was updated successfully, but these errors were encountered: