View source: R/WNV_models_lags.r
models_lags | R Documentation |
Fits the models to training data and generates the predictions
models_lags( allmods, allLagsT, allLagsO, fillzeros, allunits, nsim, predict_from = c("best", "all") )
allmods |
List of models |
allLagsT |
Training data |
allLagsO |
Out-of-sample data |
fillzeros |
Logical. If TRUE fill in with zeros counties that have no cases ever. |
allunits |
Character. Vector of county names in complete data set. Used when fillzeros == TRUE |
nsim |
Integer. Number of samples to draw from posterior distribution. Defaults to zero, which has the expected value of cases in predcases. |
predict_from |
Character. predict from AIC best model only, or from all models? |
Returns predictions for the out-of-sample year, a list of fitted models, AIC scores, and the model with the lowest AIC score. The predictions object could be a vector (nsim = 0 and predict_from == "best"), a matrix (nsim > 0 and predict_from == "best"), or a list of vectors or matrices (predict_from == "all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.