Data Processing
DataProcessing.RdThis file contains a set of functions designed to work together for processing the data. Below is a description of how to use these functions in sequence.
Details
Step-by-Step Usage:
Read the data: This function reads the data from the location specified
data <- readRDS("data.rds").gen_data_weighted: Calculates weighted mean values for various metrics over yearsdata_weighted <- gen_data_weighted(data).gen_data_weighted_rf: Calculates the differences between intervention and baseline values for risk factorsdata_weighted_rf_wide_collapse <- gen_data_weighted_rf(data_weighted).gen_data_weighted_ds: Calculates the differences between intervention and baseline values for incidencesdata_weighted_ds_wide_collapse <- gen_data_weighted_ds(data_weighted).gen_data_weighted_burden: Calculates the differences between intervention and baseline values for burden of diseasedata_weighted_bd_wide_collapse <- gen_data_weighted_burden(data_weighted).gen_data_weighted_bd_spline: Performs data smoothing for burden of disease, when necessary. For instance, with only a few simulations, there can be positive values in difference in burden of diseasedata_weighted_burden_spline <- gen_data_weighted_bd_spline(data_weighted_bd_wide_collapse).
Examples
# Example of using all functions together
data <- readRDS("data.rds")
data_weighted <- gen_data_weighted(data)
data_weighted_rf_wide_collapse <- gen_data_weighted_rf(data_weighted)
data_weighted_ds_wide_collapse <- gen_data_weighted_ds(data_weighted)
data_weighted_bd_wide_collapse <- gen_data_weighted_burden(data_weighted)
data_weighted_burden_spline <- gen_data_weighted_bd_spline(
sdata_weighted_bd_wide_collapse)