Skip to content

Commit

Permalink
include Jingmin's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SaranjeetKaur committed Aug 28, 2024
1 parent 2b9d736 commit 38ee782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/data-process.R
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ gen_data_weighted_burden_spline <- function(data_weighted_burden) {
spline_fit_max <- splines::interpSpline(data_weighted_burden_max$time, data_weighted_burden_max$cumdiff_daly_max)
data_weighted_burden_spline$cumdiff_daly_max <- stats::predict(spline_fit_max, data_weighted_burden_spline$time)$y

## Keep 0 values in the first two years
## Keep 0 values in the first two years, before policy implementation
data_weighted_burden_spline$cumdiff_daly_mean <- ifelse(data_weighted_burden_spline$time<2024, 0, data_weighted_burden_spline$cumdiff_daly_mean)
data_weighted_burden_spline$cumdiff_daly_min <- ifelse(data_weighted_burden_spline$time<2024, 0, data_weighted_burden_spline$cumdiff_daly_min)
data_weighted_burden_spline$cumdiff_daly_max <- ifelse(data_weighted_burden_spline$time<2024, 0, data_weighted_burden_spline$cumdiff_daly_max)
Expand Down

0 comments on commit 38ee782

Please sign in to comment.