predcurves: Predict hospitalization curves based on observed seasons

predict_curvesR Documentation

Predict hospitalization curves based on observed seasons

Description

Predict hospitalization curves based on observed seasons

Usage

predict_curves(
  hosp_obs,
  tf_list,
  cv_list,
  lambda_type = c("lambda.min", "lambda.1se")
)

Arguments

hosp_obs

A list containing the hospitalization rate data frames. One dataset per list item.

tf_list

A list containing trend filter fits to observed seasons. One fit per list item.

cv_list

List. containing cross-validation output for each season's trendfilter fit.

lambda_type

Character. One of "lambda.min" or "lambda.1se", each corresponding to different criteria used to select the lambda penalty for each trendfilter fit. Per the genlasso package documentation, "lambda.min" is the lambda that minimizes the cross-validated error (average error across folds), while "lambda.1se" selects the largest lambda value that produces a cross-validated error within one standard deviation of the minimum cross-validated error.

Value

Trend filter weekly hospitalization rate predictions for each observed season.


jrgant/FluHospPrediction documentation built on May 7, 2023, 10:40 a.m.