R语言fable包未生成调和层次模型的Bootstrap预测区间问题
关于fable包调和模型bootstrap预测仅生成点估计的疑问
我正在使用R语言的fable包,测试将forecast(bootstrap = TRUE)用于调和层次单变量模型,代码如下:
tourism_hts <- tourism |> aggregate_key(State / Region, Trips = sum(Trips)) tourism_forecast <- tourism_hts |> model(arima_model = ARIMA(Trips)) |> reconcile(arima_td = top_down(arima_model)) |> forecast(h=20, bootstrap = TRUE) tourism_forecast |> filter(.model == "arima_td")
执行后生成的Trips(dist类型)列仅为点估计,而非分布:
# A fable: 1,700 x 6 [1Q] # Key: State, Region, .model [85] State Region .model Quarter Trips .mean <chr*> <chr*> <chr> <qtr> <dist> <dbl> 1 ACT Canberra arima_td 2018 Q1 666.0948 666. 2 ACT Canberra arima_td 2018 Q2 666.6314 677. ...(省略部分行)
相比之下,基础模型arima_model的Trips列是有效的采样分布:
tourism_forecast # A fable: 3,400 x 6 [1Q] # Key: State, Region, .model [170] State Region .model Quarter Trips .mean <chr*> <chr*> <chr> <qtr> <dist> <dbl> 1 ACT Canberra arima_model 2018 Q1 sample[5000] 661. ...(省略部分行)
请问fable是否应该为调和模型生成有效的预测区间,而非仅给出点估计?
附sessionInfo()信息:
sessionInfo() R version 4.3.1 (2023-06-16) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Sonoma 14.7.2 ...(省略部分内容)
内容的提问来源于stack exchange,提问作者LauraDR
相关产品推荐
相关产品推荐

