## Rows: 92378 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): air_store_id, visit_datetime, reserve_datetime
## dbl (1): reserve_visitors
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 92,378
## Columns: 4
## $ air_store_id <chr> "air_877f79706adbfb06", "air_db4b38ebe7a7ceff", "air_…
## $ visit_datetime <chr> "1/1/16 19:00", "1/1/16 19:00", "1/1/16 19:00", "1/1/…
## $ reserve_datetime <chr> "1/1/16 16:00", "1/1/16 19:00", "1/1/16 19:00", "1/1/…
## $ reserve_visitors <dbl> 1, 3, 6, 2, 5, 2, 4, 2, 2, 2, 3, 3, 2, 6, 7, 41, 13, …
## Rows: 252108 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): air_store_id
## dbl (1): visitors
## date (1): visit_date
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 252,108
## Columns: 3
## $ air_store_id <chr> "air_ba937bf13d40fb24", "air_ba937bf13d40fb24", "air_ba93…
## $ visit_date <date> 2016-01-13, 2016-01-14, 2016-01-15, 2016-01-16, 2016-01-…
## $ visitors <dbl> 25, 32, 29, 22, 6, 9, 31, 21, 18, 26, 21, 11, 24, 21, 26,…
## Rows: 829 Columns: 5
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): air_store_id, air_genre_name, air_area_name
## dbl (2): latitude, longitude
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 829
## Columns: 5
## $ air_store_id <chr> "air_0f0cdeee6c9bf3d7", "air_7cc17a324ae5c7dc", "air_fe…
## $ air_genre_name <chr> "Italian/French", "Italian/French", "Italian/French", "…
## $ air_area_name <chr> "Hyōgo-ken Kōbe-shi Kumoidōri", "Hyōgo-ken Kōbe-shi Kum…
## $ latitude <dbl> 34.69512, 34.69512, 34.69512, 34.69512, 35.65807, 35.65…
## $ longitude <dbl> 135.1979, 135.1979, 135.1979, 135.1979, 139.7516, 139.7…
## Rows: 2000320 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): hpg_store_id
## dbl (1): reserve_visitors
## dttm (2): visit_datetime, reserve_datetime
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 2,000,320
## Columns: 4
## $ hpg_store_id <chr> "hpg_c63f6f42e088e50f", "hpg_dac72789163a3f47", "hpg_…
## $ visit_datetime <dttm> 2016-01-01 11:00:00, 2016-01-01 13:00:00, 2016-01-01…
## $ reserve_datetime <dttm> 2016-01-01 09:00:00, 2016-01-01 06:00:00, 2016-01-01…
## $ reserve_visitors <dbl> 1, 3, 2, 5, 13, 2, 2, 2, 2, 6, 2, 2, 2, 2, 5, 4, 2, 4…
## Rows: 2000320 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): hpg_store_id
## dbl (1): reserve_visitors
## dttm (2): visit_datetime, reserve_datetime
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## # A tibble: 6 × 5
## hpg_store_id visit_datetime reserve_datetime reserve_visitors
## <chr> <dttm> <dttm> <dbl>
## 1 hpg_c63f6f42e088e50f 2016-01-01 11:00:00 2016-01-01 09:00:00 1
## 2 hpg_dac72789163a3f47 2016-01-01 13:00:00 2016-01-01 06:00:00 3
## 3 hpg_c8e24dcf51ca1eb5 2016-01-01 16:00:00 2016-01-01 14:00:00 2
## 4 hpg_24bb207e5fd49d4a 2016-01-01 17:00:00 2016-01-01 11:00:00 5
## 5 hpg_25291c542ebb3bc2 2016-01-01 17:00:00 2016-01-01 03:00:00 13
## 6 hpg_28bdf7a336ec6a7b 2016-01-01 17:00:00 2016-01-01 15:00:00 2
## # … with 1 more variable: visit_date <date>
## # A tibble: 2,000,320 × 3
## hpg_store_id reserve_visitors visit_date
## <chr> <dbl> <date>
## 1 hpg_c63f6f42e088e50f 1 2016-01-01
## 2 hpg_dac72789163a3f47 3 2016-01-01
## 3 hpg_c8e24dcf51ca1eb5 2 2016-01-01
## 4 hpg_24bb207e5fd49d4a 5 2016-01-01
## 5 hpg_25291c542ebb3bc2 13 2016-01-01
## 6 hpg_28bdf7a336ec6a7b 2 2016-01-01
## 7 hpg_2a01a042bca04ad9 2 2016-01-01
## 8 hpg_2a84dd9f4c140b82 2 2016-01-01
## 9 hpg_2ad179871696901f 2 2016-01-01
## 10 hpg_2c1d989eedb0ff83 6 2016-01-01
## # … with 2,000,310 more rows
## # A tibble: 6 × 2
## visit_date all_visitors
## <date> <dbl>
## 1 2016-01-01 493
## 2 2016-01-02 3089
## 3 2016-01-03 3223
## 4 2016-01-04 2834
## 5 2016-01-05 2796
## 6 2016-01-06 3590
## Rows: 4690 Columns: 5
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): hpg_store_id, hpg_genre_name, hpg_area_name
## dbl (2): latitude, longitude
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 4,690
## Columns: 5
## $ hpg_store_id <chr> "hpg_6622b62385aec8bf", "hpg_e9e068dd49c5fa00", "hpg_29…
## $ hpg_genre_name <chr> "Japanese style", "Japanese style", "Japanese style", "…
## $ hpg_area_name <chr> "Tōkyō-to Setagaya-ku Taishidō", "Tōkyō-to Setagaya-ku …
## $ latitude <dbl> 35.64367, 35.64367, 35.64367, 35.64367, 35.64367, 35.64…
## $ longitude <dbl> 139.6682, 139.6682, 139.6682, 139.6682, 139.6682, 139.6…
## Rows: 517 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): day_of_week
## dbl (1): holiday_flg
## date (1): calendar_date
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 517
## Columns: 3
## $ calendar_date <date> 2016-01-01, 2016-01-02, 2016-01-03, 2016-01-04, 2016-01…
## $ day_of_week <chr> "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "We…
## $ holiday_flg <dbl> 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## # A tibble: 2 × 2
## holiday_flg n
## <dbl> <int>
## 1 0 447
## 2 1 31
## [1] 0.06485356
## Rows: 150 Columns: 2
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): air_store_id, hpg_store_id
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Rows: 150
## Columns: 2
## $ air_store_id <chr> "air_63b13c56b7201bd9", "air_a24bf50c3e90d583", "air_c7f7…
## $ hpg_store_id <chr> "hpg_4bc649e72e2a239a", "hpg_c34b496d0305a809", "hpg_cd8a…
## [1] 829
## [1] 13325






## # A tibble: 6 × 7
## air_store_id visit_date visitors air_genre_name air_area_name latitude
## <chr> <date> <dbl> <chr> <chr> <dbl>
## 1 air_ba937bf13d40fb24 2016-01-13 25 Dining bar Tōkyō-to Min… 35.7
## 2 air_ba937bf13d40fb24 2016-01-14 32 Dining bar Tōkyō-to Min… 35.7
## 3 air_ba937bf13d40fb24 2016-01-15 29 Dining bar Tōkyō-to Min… 35.7
## 4 air_ba937bf13d40fb24 2016-01-16 22 Dining bar Tōkyō-to Min… 35.7
## 5 air_ba937bf13d40fb24 2016-01-18 6 Dining bar Tōkyō-to Min… 35.7
## 6 air_ba937bf13d40fb24 2016-01-19 9 Dining bar Tōkyō-to Min… 35.7
## # … with 1 more variable: longitude <dbl>
## `summarise()` has grouped output by 'visit_date'. You can override using the
## `.groups` argument.







##
## Call:
## tslm(formula = visitors ~ month + wday, data = airNewts)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.34 -11.99 -3.97 8.01 856.18
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 17.476729 0.096070 181.917 <2e-16 ***
## month -0.002310 0.009024 -0.256 0.798
## wday 0.838647 0.016874 49.700 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.68 on 252105 degrees of freedom
## Multiple R-squared: 0.009703, Adjusted R-squared: 0.009695
## F-statistic: 1235 on 2 and 252105 DF, p-value: < 2.2e-16
## 2016-01-01 2016-01-02 2016-01-03 2016-01-04 2016-01-05 2016-01-06 2016-01-07
## 25 32 29 22 6 9 31
## 2016-01-08 2016-01-09 2016-01-10 2016-01-11 2016-01-12 2016-01-13 2016-01-14
## 21 18 26 21 11 24 21
## 2016-01-15 2016-01-16 2016-01-17 2016-01-18 2016-01-19 2016-01-20 2016-01-21
## 26 6 18 12 45 15 19
## 2016-01-22 2016-01-23 2016-01-24 2016-01-25 2016-01-26 2016-01-27 2016-01-28
## 15 32 3 26 8 14 15
## 2016-01-29 2016-01-30 2016-01-31 2016-02-01 2016-02-02 2016-02-03 2016-02-04
## 17 22 43 20 7 16 21
## 2016-02-05 2016-02-06 2016-02-07 2016-02-08 2016-02-09 2016-02-10 2016-02-11
## 21 32 23 22 19 21 20
## 2016-02-12 2016-02-13 2016-02-14 2016-02-15 2016-02-16 2016-02-17 2016-02-18
## 37 13 11 8 23 31 37
## 2016-02-19 2016-02-20 2016-02-21 2016-02-22 2016-02-23 2016-02-24 2016-02-25
## 25 10 20 25 27 39 32
## 2016-02-26 2016-02-27 2016-02-28 2016-02-29 2016-03-01 2016-03-02 2016-03-03
## 17 29 25 30 41 1 7
## 2016-03-04 2016-03-05 2016-03-06 2016-03-07 2016-03-08 2016-03-09 2016-03-10
## 19 25 44 36 16 20 22
## 2016-03-11 2016-03-12 2016-03-13 2016-03-14 2016-03-15 2016-03-16 2016-03-17
## 13 12 49 19 10 22 30
## 2016-03-18 2016-03-19 2016-03-20 2016-03-21 2016-03-22 2016-03-23 2016-03-24
## 24 51 35 21 23 33 11
## 2016-03-25 2016-03-26 2016-03-27 2016-03-28 2016-03-29 2016-03-30 2016-03-31
## 40 28 29 19 9 26 12
## 2016-04-01 2016-04-02 2016-04-03 2016-04-04 2016-04-05 2016-04-06 2016-04-07
## 34 17 46 12 14 24 30
## 2016-04-08 2016-04-09 2016-04-10 2016-04-11 2016-04-12 2016-04-13 2016-04-14
## 45 48 11 20 37 23 54
## 2016-04-15 2016-04-16 2016-04-17 2016-04-18 2016-04-19 2016-04-20 2016-04-21
## 43 11 28 33 26 30 27
## 2016-04-22 2016-04-23 2016-04-24 2016-04-25 2016-04-26 2016-04-27 2016-04-28
## 17 25 27 27 50 33 10
## 2016-04-29 2016-04-30 2016-05-01 2016-05-02 2016-05-03 2016-05-04 2016-05-05
## 20 35 27 43 53 16 25
## 2016-05-06 2016-05-07 2016-05-08 2016-05-09 2016-05-10 2016-05-11 2016-05-12
## 32 24 46 34 11 22 14
## 2016-05-13 2016-05-14 2016-05-15 2016-05-16 2016-05-17 2016-05-18 2016-05-19
## 45 39 44 32 26 33 33
## 2016-05-20 2016-05-21 2016-05-22 2016-05-23 2016-05-24 2016-05-25 2016-05-26
## 61 25 21 24 19 22 29
## 2016-05-27 2016-05-28 2016-05-29 2016-05-30 2016-05-31 2016-06-01 2016-06-02
## 33 20 28 25 22 51 28
## 2016-06-03 2016-06-04 2016-06-05 2016-06-06 2016-06-07 2016-06-08 2016-06-09
## 16 45 26 47 24 9 23
## 2016-06-10 2016-06-11 2016-06-12 2016-06-13 2016-06-14 2016-06-15 2016-06-16
## 26 26 33 21 13 12 27
## 2016-06-17 2016-06-18 2016-06-19 2016-06-20 2016-06-21 2016-06-22 2016-06-23
## 24 38 27 23 22 57 2
## 2016-06-24 2016-06-25 2016-06-26 2016-06-27 2016-06-28 2016-06-29 2016-06-30
## 18 21 35 18 15 34 27
## 2016-07-01 2016-07-02 2016-07-03 2016-07-04 2016-07-05 2016-07-06 2016-07-07
## 31 31 28 10 21 36 20
## 2016-07-08 2016-07-09 2016-07-10 2016-07-11 2016-07-12 2016-07-13 2016-07-14
## 30 39 4 32 20 15 29
## 2016-07-15 2016-07-16 2016-07-17 2016-07-18 2016-07-19 2016-07-20 2016-07-21
## 40 23 18 40 14 46 46
## 2016-07-22 2016-07-23 2016-07-24 2016-07-25 2016-07-26 2016-07-27 2016-07-28
## 13 37 21 27 32 24 28
## 2016-07-29 2016-07-30 2016-07-31 2016-08-01 2016-08-02 2016-08-03 2016-08-04
## 25 14 29 48 6 15 20
## 2016-08-05 2016-08-06 2016-08-07 2016-08-08 2016-08-09 2016-08-10 2016-08-11
## 13 11 36 26 19 26 27
## 2016-08-12 2016-08-13 2016-08-14 2016-08-15 2016-08-16 2016-08-17 2016-08-18
## 22 14 20 18 29 26 37
## 2016-08-19 2016-08-20 2016-08-21 2016-08-22 2016-08-23 2016-08-24 2016-08-25
## 41 18 16 15 21 25 34
## 2016-08-26 2016-08-27 2016-08-28 2016-08-29 2016-08-30 2016-08-31 2016-09-01
## 24 18 16 12 18 20 3
## 2016-09-02 2016-09-03 2016-09-04 2016-09-05 2016-09-06 2016-09-07 2016-09-08
## 7 24 27 7 33 34 2
## 2016-09-09 2016-09-10 2016-09-11 2016-09-12 2016-09-13 2016-09-14 2016-09-15
## 24 8 14 46 38 10 35
## 2016-09-16 2016-09-17 2016-09-18 2016-09-19 2016-09-20 2016-09-21 2016-09-22
## 8 8 26 32 12 19 15
## 2016-09-23 2016-09-24 2016-09-25 2016-09-26 2016-09-27 2016-09-28 2016-09-29
## 22 28 36 8 16 5 26
## 2016-09-30 2016-10-01 2016-10-02 2016-10-03 2016-10-04 2016-10-05 2016-10-06
## 19 40 11 12 31 22 11
## 2016-10-07 2016-10-08 2016-10-09 2016-10-10 2016-10-11 2016-10-12 2016-10-13
## 46 31 7 23 27 32 4
## 2016-10-14 2016-10-15 2016-10-16 2016-10-17 2016-10-18 2016-10-19 2016-10-20
## 11 15 16 26 54 11 21
## 2016-10-21 2016-10-22 2016-10-23 2016-10-24 2016-10-25 2016-10-26 2016-10-27
## 16 16 12 10 25 28 5
## 2016-10-28 2016-10-29 2016-10-30 2016-10-31 2016-11-01 2016-11-02 2016-11-03
## 21 24 17 24 38 2 11
## 2016-11-04 2016-11-05 2016-11-06 2016-11-07 2016-11-08 2016-11-09 2016-11-10
## 8 25 15 37 23 1 4
## 2016-11-11 2016-11-12 2016-11-13 2016-11-14 2016-11-15 2016-11-16 2016-11-17
## 12 10 19 54 30 3 11
## 2016-11-18 2016-11-19 2016-11-20 2016-11-21 2016-11-22 2016-11-23 2016-11-24
## 8 22 23 25 23 20 17
## 2016-11-25 2016-11-26 2016-11-27 2016-11-28 2016-11-29 2016-11-30 2016-12-01
## 15 16 39 22 3 7 14
## 2016-12-02 2016-12-03 2016-12-04 2016-12-05 2016-12-06 2016-12-07 2016-12-08
## 25 11 40 27 8 11 18
## 2016-12-09 2016-12-10 2016-12-11 2016-12-12 2016-12-13 2016-12-14 2016-12-15
## 8 19 42 17 5 17 10
## 2016-12-16 2016-12-17 2016-12-18 2016-12-19 2016-12-20 2016-12-21 2016-12-22
## 41 26 11 7 7 21 12
## 2016-12-23 2016-12-24 2016-12-25 2016-12-26 2016-12-27 2016-12-28 2016-12-29
## 35 7 1 9 27 16 27
## 2016-12-30 2016-12-31 2017-01-01 2017-01-02 2017-01-03 2017-01-04 2017-01-05
## 20 6 18 20 20 31 32
## 2017-01-06 2017-01-07 2017-01-08 2017-01-09 2017-01-10 2017-01-11 2017-01-12
## 4 4 32 19 12 46 25
## 2017-01-13 2017-01-14 2017-01-15 2017-01-16 2017-01-17 2017-01-18 2017-01-19
## 3 9 7 17 27 16 1
## 2017-01-20 2017-01-21 2017-01-22 2017-01-23 2017-01-24 2017-01-25 2017-01-26
## 10 11 11 14 40 23 12
## 2017-01-27 2017-01-28 2017-01-29 2017-01-30 2017-01-31 2017-02-01 2017-02-02
## 28 6 8 13 14 2 21
## 2017-02-03 2017-02-04 2017-02-05 2017-02-06 2017-02-07 2017-02-08 2017-02-09
## 8 21 17 1 15 11 25
## 2017-02-10 2017-02-11 2017-02-12 2017-02-13 2017-02-14 2017-02-15 2017-02-16
## 45 16 4 3 10 11 50
## 2017-02-17 2017-02-18 2017-02-19 2017-02-20 2017-02-21 2017-02-22 2017-02-23
## 12 6 10 3 13 5 2
## 2017-02-24 2017-02-25 2017-02-26 2017-02-27 2017-02-28 2017-03-01 2017-03-02
## 6 21 6 15 3 19 8
## 2017-03-03 2017-03-04 2017-03-05 2017-03-06 2017-03-07 2017-03-08 2017-03-09
## 8 22 27 22 3 18 8
## 2017-03-10 2017-03-11 2017-03-12 2017-03-13 2017-03-14 2017-03-15 2017-03-16
## 10 33 16 21 1 32 27
## 2017-03-17 2017-03-18 2017-03-19 2017-03-20 2017-03-21 2017-03-22 2017-03-23
## 2 22 14 9 9 19 3
## 2017-03-24 2017-03-25 2017-03-26 2017-03-27 2017-03-28 2017-03-29 2017-03-30
## 1 8 20 9 22 2 14
## 2017-03-31 2017-04-01 2017-04-02 2017-04-03 2017-04-04 2017-04-05 2017-04-06
## 1 1 5 1 13 3 29
## 2017-04-07 2017-04-08 2017-04-09 2017-04-10 2017-04-11 2017-04-12 2017-04-13
## 6 5 16 17 17 5 16
## 2017-04-14 2017-04-15 2017-04-16 2017-04-17 2017-04-18 2017-04-19 2017-04-20
## 3 9 26 1 6 12 5
## 2017-04-21 2017-04-22
## 6 6


## ETS(A,A,N)
##
## Call:
## ets(y = airts)
##
## Smoothing parameters:
## alpha = 0.0018
## beta = 0.0018
##
## Initial states:
## l = 15.308
## b = -0.0041
##
## sigma: 11.0998
##
## AIC AICc BIC
## 5256.083 5256.210 5276.931

## ME RMSE MAE MPE MAPE MASE
## Training set -0.1320267 11.0533 8.865076 -78.62835 104.4266 0.7297051
## ACF1
## Training set 0.01790717


## ndiffs
## 1


## Series: airts
## ARIMA(4,1,3)
##
## Coefficients:
## ar1 ar2 ar3 ar4 ma1 ma2 ma3
## 0.4961 -0.8305 -0.0191 -0.3137 -1.5191 1.2559 -0.6577
## s.e. 0.1082 0.0752 0.0504 0.0560 0.1107 0.1645 0.0721
##
## sigma^2 estimated as 108: log likelihood=-1791.68
## AIC=3599.36 AICc=3599.67 BIC=3632.7

## ME RMSE MAE MPE MAPE MASE
## Training set -0.5176378 10.30316 8.303773 -76.88912 100.4152 0.683503
## ACF1
## Training set 0.001849778
## 2016-01-01 2016-01-02 2016-01-03 2016-01-04 2016-01-05 2016-01-06 2016-01-07
## 493 3089 3223 2834 2796 3590 4223
## 2016-01-08 2016-01-09 2016-01-10 2016-01-11 2016-01-12 2016-01-13 2016-01-14
## 11645 12628 10497 6024 5298 7050 7774
## 2016-01-15 2016-01-16 2016-01-17 2016-01-18 2016-01-19 2016-01-20 2016-01-21
## 20924 18457 7579 5788 6825 9495 8533
## 2016-01-22 2016-01-23 2016-01-24 2016-01-25 2016-01-26 2016-01-27 2016-01-28
## 24748 23005 8358 6795 8228 10830 9999
## 2016-01-29 2016-01-30 2016-01-31 2016-02-01 2016-02-02 2016-02-03 2016-02-04
## 28134 25193 9125 5298 5563 6442 7282
## 2016-02-05 2016-02-06 2016-02-07 2016-02-08 2016-02-09 2016-02-10 2016-02-11
## 19515 20473 8031 6167 7357 21229 8440
## 2016-02-12 2016-02-13 2016-02-14 2016-02-15 2016-02-16 2016-02-17 2016-02-18
## 18072 20528 7781 6623 7722 9806 8982
## 2016-02-19 2016-02-20 2016-02-21 2016-02-22 2016-02-23 2016-02-24 2016-02-25
## 22992 22629 9600 7021 8127 10545 10482
## 2016-02-26 2016-02-27 2016-02-28 2016-02-29 2016-03-01 2016-03-02 2016-03-03
## 27395 26749 10302 8444 6561 7952 7819
## 2016-03-04 2016-03-05 2016-03-06 2016-03-07 2016-03-08 2016-03-09 2016-03-10
## 20894 21775 9353 6964 8907 10468 10107
## 2016-03-11 2016-03-12 2016-03-13 2016-03-14 2016-03-15 2016-03-16 2016-03-17
## 28411 26517 11263 8785 12034 14345 13625
## 2016-03-18 2016-03-19 2016-03-20 2016-03-21 2016-03-22 2016-03-23 2016-03-24
## 36640 31029 21030 11183 13095 19208 19251
## 2016-03-25 2016-03-26 2016-03-27 2016-03-28 2016-03-29 2016-03-30 2016-03-31
## 50588 31711 14900 15645 17632 22811 15930
## 2016-04-01 2016-04-02 2016-04-03 2016-04-04 2016-04-05 2016-04-06 2016-04-07
## 23707 18905 8985 7420 8969 10323 10218
## 2016-04-08 2016-04-09 2016-04-10 2016-04-11 2016-04-12 2016-04-13 2016-04-14
## 28277 20803 8256 7225 8631 11827 11636
## 2016-04-15 2016-04-16 2016-04-17 2016-04-18 2016-04-19 2016-04-20 2016-04-21
## 35787 24822 9300 8519 9939 13676 12097
## 2016-04-22 2016-04-23 2016-04-24 2016-04-25 2016-04-26 2016-04-27 2016-04-28
## 37515 25419 9754 10664 12711 16783 31656
## 2016-04-29 2016-04-30 2016-05-01 2016-05-02 2016-05-03 2016-05-04 2016-05-05
## 18831 21336 10573 14177 17405 15823 9068
## 2016-05-06 2016-05-07 2016-05-08 2016-05-09 2016-05-10 2016-05-11 2016-05-12
## 13364 16440 8600 6387 7022 8808 9363
## 2016-05-13 2016-05-14 2016-05-15 2016-05-16 2016-05-17 2016-05-18 2016-05-19
## 27085 22807 9145 6923 7936 11247 11120
## 2016-05-20 2016-05-21 2016-05-22 2016-05-23 2016-05-24 2016-05-25 2016-05-26
## 27869 23472 9734 6808 8032 12402 12056
## 2016-05-27 2016-05-28 2016-05-29 2016-05-30 2016-05-31 2016-06-01 2016-06-02
## 30791 26541 10968 8479 8948 8119 7849
## 2016-06-03 2016-06-04 2016-06-05 2016-06-06 2016-06-07 2016-06-08 2016-06-09
## 22829 21432 9441 6436 7399 10347 9505
## 2016-06-10 2016-06-11 2016-06-12 2016-06-13 2016-06-14 2016-06-15 2016-06-16
## 27284 25195 10386 6662 7729 11100 11274
## 2016-06-17 2016-06-18 2016-06-19 2016-06-20 2016-06-21 2016-06-22 2016-06-23
## 29537 27685 13031 7725 9356 12243 12818
## 2016-06-24 2016-06-25 2016-06-26 2016-06-27 2016-06-28 2016-06-29 2016-06-30
## 38338 30363 12620 9866 11605 15276 13247
## 2016-07-01 2016-07-02 2016-07-03 2016-07-04 2016-07-05 2016-07-06 2016-07-07
## 25711 23064 8997 6622 7493 10433 9515
## 2016-07-08 2016-07-09 2016-07-10 2016-07-11 2016-07-12 2016-07-13 2016-07-14
## 28589 26568 9756 7866 8187 12043 12196
## 2016-07-15 2016-07-16 2016-07-17 2016-07-18 2016-07-19 2016-07-20 2016-07-21
## 30154 25522 17575 8560 9151 12996 12967
## 2016-07-22 2016-07-23 2016-07-24 2016-07-25 2016-07-26 2016-07-27 2016-07-28
## 33377 25502 10455 9499 11314 14607 14163
## 2016-07-29 2016-07-30 2016-07-31 2016-08-01 2016-08-02 2016-08-03 2016-08-04
## 35176 25887 11212 7528 8477 12052 12077
## 2016-08-05 2016-08-06 2016-08-07 2016-08-08 2016-08-09 2016-08-10 2016-08-11
## 28042 20678 9782 9752 11592 25329 14596
## 2016-08-12 2016-08-13 2016-08-14 2016-08-15 2016-08-16 2016-08-17 2016-08-18
## 20144 20675 15983 12723 10242 11689 11411
## 2016-08-19 2016-08-20 2016-08-21 2016-08-22 2016-08-23 2016-08-24 2016-08-25
## 23855 23433 11055 8463 10406 12924 12886
## 2016-08-26 2016-08-27 2016-08-28 2016-08-29 2016-08-30 2016-08-31 2016-09-01
## 29816 27114 12288 9766 10021 13092 8068
## 2016-09-02 2016-09-03 2016-09-04 2016-09-05 2016-09-06 2016-09-07 2016-09-08
## 22278 21565 9629 6992 8103 10852 11236
## 2016-09-09 2016-09-10 2016-09-11 2016-09-12 2016-09-13 2016-09-14 2016-09-15
## 26369 24483 10544 8159 9627 12552 12662
## 2016-09-16 2016-09-17 2016-09-18 2016-09-19 2016-09-20 2016-09-21 2016-09-22
## 27179 23762 19356 10181 9945 23602 11241
## 2016-09-23 2016-09-24 2016-09-25 2016-09-26 2016-09-27 2016-09-28 2016-09-29
## 23653 28149 11890 10962 12589 16972 15416
## 2016-09-30 2016-10-01 2016-10-02 2016-10-03 2016-10-04 2016-10-05 2016-10-06
## 37707 22081 10609 8530 8625 11320 11615
## 2016-10-07 2016-10-08 2016-10-09 2016-10-10 2016-10-11 2016-10-12 2016-10-13
## 27871 23499 19516 10191 10135 12599 11969
## 2016-10-14 2016-10-15 2016-10-16 2016-10-17 2016-10-18 2016-10-19 2016-10-20
## 29876 25360 12459 8869 10533 13943 12807
## 2016-10-21 2016-10-22 2016-10-23 2016-10-24 2016-10-25 2016-10-26 2016-10-27
## 32500 30498 13710 9319 12060 15732 14999
## 2016-10-28 2016-10-29 2016-10-30 2016-10-31 2016-11-01 2016-11-02 2016-11-03
## 37288 34955 15827 11070 8272 22366 11719
## 2016-11-04 2016-11-05 2016-11-06 2016-11-07 2016-11-08 2016-11-09 2016-11-10
## 21531 27216 12391 8223 10144 12836 12083
## 2016-11-11 2016-11-12 2016-11-13 2016-11-14 2016-11-15 2016-11-16 2016-11-17
## 29674 31062 15005 9140 10783 14595 14451
## 2016-11-18 2016-11-19 2016-11-20 2016-11-21 2016-11-22 2016-11-23 2016-11-24
## 34876 36963 15725 11196 31332 15279 15597
## 2016-11-25 2016-11-26 2016-11-27 2016-11-28 2016-11-29 2016-11-30 2016-12-01
## 40865 47919 18235 11938 15605 18035 13706
## 2016-12-02 2016-12-03 2016-12-04 2016-12-05 2016-12-06 2016-12-07 2016-12-08
## 50732 59429 18230 13395 16639 24827 23705
## 2016-12-09 2016-12-10 2016-12-11 2016-12-12 2016-12-13 2016-12-14 2016-12-15
## 103699 92887 24196 19372 26945 41193 38754
## 2016-12-16 2016-12-17 2016-12-18 2016-12-19 2016-12-20 2016-12-21 2016-12-22
## 163573 121897 30800 32693 43970 60372 152252
## 2016-12-23 2016-12-24 2016-12-25 2016-12-26 2016-12-27 2016-12-28 2016-12-29
## 53030 50161 29693 44832 50820 71339 75430
## 2016-12-30 2016-12-31 2017-01-01 2017-01-02 2017-01-03 2017-01-04 2017-01-05
## 68730 15482 12985 30478 23008 15607 14270
## 2017-01-06 2017-01-07 2017-01-08 2017-01-09 2017-01-10 2017-01-11 2017-01-12
## 26611 30248 26226 14595 12014 15039 16447
## 2017-01-13 2017-01-14 2017-01-15 2017-01-16 2017-01-17 2017-01-18 2017-01-19
## 41204 40049 15905 12059 13932 18326 17572
## 2017-01-20 2017-01-21 2017-01-22 2017-01-23 2017-01-24 2017-01-25 2017-01-26
## 47102 46463 15875 11954 14492 20308 19582
## 2017-01-27 2017-01-28 2017-01-29 2017-01-30 2017-01-31 2017-02-01 2017-02-02
## 56591 51767 19474 13945 16394 14291 13108
## 2017-02-03 2017-02-04 2017-02-05 2017-02-06 2017-02-07 2017-02-08 2017-02-09
## 34005 38957 15597 11089 14128 17330 17477
## 2017-02-10 2017-02-11 2017-02-12 2017-02-13 2017-02-14 2017-02-15 2017-02-16
## 44503 40875 17055 12033 12481 19002 18571
## 2017-02-17 2017-02-18 2017-02-19 2017-02-20 2017-02-21 2017-02-22 2017-02-23
## 44446 46064 19935 14255 16595 21151 20992
## 2017-02-24 2017-02-25 2017-02-26 2017-02-27 2017-02-28 2017-03-01 2017-03-02
## 52211 49049 22054 15899 19110 15083 15892
## 2017-03-03 2017-03-04 2017-03-05 2017-03-06 2017-03-07 2017-03-08 2017-03-09
## 35384 40347 17698 12607 16006 19625 20358
## 2017-03-10 2017-03-11 2017-03-12 2017-03-13 2017-03-14 2017-03-15 2017-03-16
## 51690 50066 22508 17724 19660 27825 27684
## 2017-03-17 2017-03-18 2017-03-19 2017-03-20 2017-03-21 2017-03-22 2017-03-23
## 62959 54871 41264 23767 25020 34970 32716
## 2017-03-24 2017-03-25 2017-03-26 2017-03-27 2017-03-28 2017-03-29 2017-03-30
## 88906 62222 28850 28773 32733 42686 36937
## 2017-03-31 2017-04-01 2017-04-02 2017-04-03 2017-04-04 2017-04-05 2017-04-06
## 72719 37549 17121 20794 15985 20216 19675
## 2017-04-07 2017-04-08 2017-04-09 2017-04-10 2017-04-11 2017-04-12 2017-04-13
## 52568 39385 17704 15321 16481 22615 21938
## 2017-04-14 2017-04-15 2017-04-16 2017-04-17 2017-04-18 2017-04-19 2017-04-20
## 63404 45598 18735 15826 19081 26060 24304
## 2017-04-21 2017-04-22
## 70066 50554


## # A tibble: 517 × 4
## visit_date all_visitors month wday
## <date> <dbl> <dbl> <dbl>
## 1 2016-01-01 493 1 6
## 2 2016-01-02 3089 1 7
## 3 2016-01-03 3223 1 1
## 4 2016-01-04 2834 1 2
## 5 2016-01-05 2796 1 3
## 6 2016-01-06 3590 1 4
## 7 2016-01-07 4223 1 5
## 8 2016-01-08 11645 1 6
## 9 2016-01-09 12628 1 7
## 10 2016-01-10 10497 1 1
## # … with 507 more rows
##
## Call:
## tslm(formula = all_visitors ~ month + wday, data = hpgNewts)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27867 -8616 -2810 4193 130547
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -336.7 1858.2 -0.181 0.856
## month 903.6 199.4 4.532 7.27e-06 ***
## wday 3753.3 338.7 11.083 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15410 on 514 degrees of freedom
## Multiple R-squared: 0.2197, Adjusted R-squared: 0.2166
## F-statistic: 72.35 on 2 and 514 DF, p-value: < 2.2e-16
## ETS(M,A,N)
##
## Call:
## ets(y = hpgts)
##
## Smoothing parameters:
## alpha = 0.1242
## beta = 0.0025
##
## Initial states:
## l = 455.3759
## b = 507.3136
##
## sigma: 0.6147
##
## AIC AICc BIC
## 11906.67 11906.79 11927.51

## ME RMSE MAE MPE MAPE MASE ACF1
## Training set -355.2655 15149.46 10142.28 -31.0684 55.82447 1.116884 0.3588388


## ndiffs
## 1


## Series: hpgts
## ARIMA(5,1,3)
##
## Coefficients:
## ar1 ar2 ar3 ar4 ar5 ma1 ma2 ma3
## 0.2294 -0.5901 -0.3282 -0.3606 -0.3417 -0.9460 0.4045 0.1930
## s.e. 0.1340 0.0856 0.0959 0.0442 0.0708 0.1354 0.1655 0.1053
##
## sigma^2 estimated as 115782978: log likelihood=-5103.23
## AIC=10224.46 AICc=10224.85 BIC=10261.97

## ME RMSE MAE MPE MAPE MASE ACF1
## Training set 245.9129 10658.47 6097.27 -8.123753 30.33909 0.6714411 0.008618694