Description Usage Arguments Value Examples
Out-of-sample prediction for whole period
| 1 2 3 4 5 6 7 8 9 10 11 12 | 
| n.lag | the number of lags to be used as regressor in Stage 2 of PRISM (by default = 1:52 for weekly data) | 
| s.window | seasonality span in seasonal decomposition (by default = 52 for weekly data) | 
| n.history | length of training period (e.g. in weeks) for seasonal decomposition. | 
| stl | if TRUE, use STL seasonal decomposition; if FALSE, use classic additive seasonal decomposition. | 
| n.training | length of training period in Stage 2, penalized linear regression (by default = 156) | 
| UseGoogle | boolean variable indicating whether to use Google Trend data. | 
| alpha | penalty between lasso and ridge. alpha=1 represents lasso, alpha=0 represents ridge, alpha=NA represents no penalty (by default alpha = 1). | 
| nPred | the number of periods ahead for forecast. nPred = 0,1,2,3. | 
| discount | exponential weighting: (1-discount)^lag. | 
| sepL1 | if TRUE, use separate L1 regularization parameters for time series components and exogenous variables (Goolgle Trend data) | 
prediction nPred week ahead prediction of the whole periods (07 - 20).
| 1 2 3 4 5 6 | claim_data = load_claim_data()
# It may take a few minutes.
prism_prediction = back_test()
# evaluate the out-of-sample prediction error as a ratio to naive method
evaluation_table(claim_data, prism_prediction)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.