R script to analyze data and generate tables/plots used in the manuscript from Improved forecasts of influenza-associated hospitalization rates with Google Search Trends Sasikiran Kandula Sen Pei Jeffrey Shaman 10.6084/m9.figshare.8152793.v1 https://rs.figshare.com/articles/dataset/R_script_to_analyze_data_and_generate_tables_plots_used_in_the_manuscript_from_Improved_forecasts_of_influenza-associated_hospitalization_rates_with_Google_Search_Trends/8152793 Reliable forecasts of influenza-associated hospitalizations during seasonal outbreaks can help health systems better prepare for patient surges. Within the USA, public health surveillance systems collect and distribute near real-time weekly hospitalization rates, a key observational metric that makes real-time forecast of this outcome possible. In this paper, we describe a method to forecast hospitalization rates using a population level transmission model in combination with a data assimilation technique. Using this method, we generated retrospective forecasts of hospitalization rates for 5 age groups and the overall population during 5 seasons in the USA and quantified forecast accuracy for both near-term and seasonal targets. Additionally, we describe methods to correct for under-reporting of hospitalization rates (backcast) and to estimate hospitalization rates from publicly available online search trends data (nowcast). Forecasts based on surveillance rates alone were reasonably accurate in predicting peak hospitalization rates (within ± 25% of the actual peak rate, three weeks before peak). The error in predicting rates one to four weeks ahead, remained constant for the duration of the seasons, even during periods of increased influenza incidence. An improvement in forecast quality across all age groups, seasons and targets was observed when backcasts and nowcasts supplemented surveillance data. These results suggest that the model-inference framework can provide reasonably accurate real-time forecasts of influenza hospitalizations; backcasts and nowcasts offer a way to improve system tolerance to observational errors. 2019-05-20 09:11:09 influenza-like illness hospitalization search trends forecasting supervised learning