You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depending on how bad the input data is, this piece of code:
# If a child has overlapping episodes, shorten the earlier one decom_next = combined.groupby("CHILD")["DECOM"].shift(-1) change_ix = combined["DEC"].isna() | combined["DEC"].gt(decom_next) combined.loc[change_ix, "DEC"] = decom_next[change_ix]
lines 180-183 in datacontainer.py
can create a DEC which is smaller than the first date of the earliest return. This happens prior to the derivation of datacontainer.data_start_date so it could push this date earlier than it should be. This will have the knock-on effect of the historic graph starting too early and the default transition rates being skewed.
Possible fixes could be:
calculate datacontainer.data_start_date before this fix is put in plac
remove episodes that are impacted by code above that have DEC older than oldest return
Probably the second?
The text was updated successfully, but these errors were encountered:
Depending on how bad the input data is, this piece of code:
# If a child has overlapping episodes, shorten the earlier one decom_next = combined.groupby("CHILD")["DECOM"].shift(-1) change_ix = combined["DEC"].isna() | combined["DEC"].gt(decom_next) combined.loc[change_ix, "DEC"] = decom_next[change_ix]
lines 180-183 in datacontainer.py
can create a DEC which is smaller than the first date of the earliest return. This happens prior to the derivation of datacontainer.data_start_date so it could push this date earlier than it should be. This will have the knock-on effect of the historic graph starting too early and the default transition rates being skewed.
Possible fixes could be:
Probably the second?
The text was updated successfully, but these errors were encountered: