When working with reshape_msd(direction = "quarters"), I noticed that gophr is creating results_cumulative based on the snapshot_ind object. Because TX_CURR_Lag1& TX_CURR_Lag2are new to the MSD, these are not included in the snapshot_indobject and the results_cumulative column generated is summing the indicator values rather than keeping most recent.
Hopefully, a quick fix is to fold them into the snapshot_ind object.
When working with
reshape_msd(direction = "quarters")
, I noticed that gophr is creatingresults_cumulative
based on thesnapshot_ind
object. BecauseTX_CURR_Lag1
&TX_CURR_Lag2
are new to the MSD, these are not included in thesnapshot_ind
object and theresults_cumulative
column generated is summing the indicator values rather than keeping most recent.Hopefully, a quick fix is to fold them into the
snapshot_ind
object.https://github.com/USAID-OHA-SI/gophr/blob/main/R/reshape_msd.R#L132-133 - relevant lines in
reshape_msd()