@@ -111,22 +111,37 @@ two_week_ahead <- arx_forecaster(
111
111
two_week_ahead
112
112
```
113
113
114
- #>
115
114
#> ══ A basic forecaster of type ARX Forecaster ═══════════════════════════════════
115
+
116
116
#>
117
- #> This forecaster was fit on 2023-10-20 08:59:57
117
+
118
+ #> This forecaster was fit on 2023-12-23 08:50:59.
119
+
118
120
#>
119
- #> Training data was an `epi_df` with
121
+
122
+ #> Training data was an <epi_df> with:
123
+
120
124
#> • Geography: state,
125
+
121
126
#> • Time type: day,
127
+
122
128
#> • Using data up-to-date as of: 2022-05-31 12:08:25.
129
+
123
130
#>
131
+
124
132
#> ── Predictions ─────────────────────────────────────────────────────────────────
133
+
125
134
#>
135
+
126
136
#> A total of 56 predictions are available for
137
+
127
138
#> • 56 unique geographic regions,
128
- #> • At forecast dates: 2021-12-31,
129
- #> • For target dates: 2022-01-14.
139
+
140
+ #> • At forecast date: 2021-12-31,
141
+
142
+ #> • For target date: 2022-01-14.
143
+
144
+ #>
130
145
131
146
In this case, we have used a number of different lags for the case rate,
132
147
while only using 3 weekly lags for the death rate (as predictors). The
@@ -139,13 +154,23 @@ last available time value in the data.
139
154
two_week_ahead $ epi_workflow
140
155
```
141
156
157
+ #>
158
+
142
159
#> ══ Epi Workflow [trained] ══════════════════════════════════════════════════════
160
+
143
161
#> Preprocessor: Recipe
162
+
144
163
#> Model: linear_reg()
164
+
145
165
#> Postprocessor: Frosting
166
+
146
167
#>
168
+
147
169
#> ── Preprocessor ────────────────────────────────────────────────────────────────
148
- #> 6 Recipe Steps
170
+
171
+ #>
172
+
173
+ #> 6 Recipe steps.
149
174
150
175
#> 1. step_epi_lag()
151
176
@@ -160,7 +185,9 @@ two_week_ahead$epi_workflow
160
185
#> 6. step_training_window()
161
186
162
187
#>
188
+
163
189
#> ── Model ───────────────────────────────────────────────────────────────────────
190
+
164
191
#>
165
192
#> Call:
166
193
#> stats::lm(formula = ..y ~ ., data = data)
@@ -171,10 +198,15 @@ two_week_ahead$epi_workflow
171
198
#> lag_3_case_rate lag_7_case_rate lag_14_case_rate lag_0_death_rate
172
199
#> 0.0011425 0.0012481 0.0003041 0.1351769
173
200
#> lag_7_death_rate lag_14_death_rate
174
- #> 0.1471127 0.1062473
201
+ #> 0.1471127 0.1062473
202
+
175
203
#>
204
+
176
205
#> ── Postprocessor ───────────────────────────────────────────────────────────────
177
- #> 5 Frosting Layers
206
+
207
+ #>
208
+
209
+ #> 5 Frosting layers.
178
210
179
211
#> 1. layer_predict()
180
212
@@ -186,6 +218,8 @@ two_week_ahead$epi_workflow
186
218
187
219
#> 5. layer_threshold()
188
220
221
+ #>
222
+
189
223
The fitted model here involved preprocessing the data to appropriately
190
224
generate lagged predictors, estimating a linear model with ` stats::lm() `
191
225
and then postprocessing the results to be meaningful for epidemiological
0 commit comments