Open paddy-r opened 5 months ago
Moving this to separate comment to track all places that median is called...
Motivated by method of median income calculation given in ONS spreadsheet of UK hh income here (see note 27): "Mean and median income is calculated by assigning the equivalised household disposable income to all individuals within that household."
Places median hh income calculated in Minos below. Must all be checked and corrected, and possibly moved to a single method.
US_utils.get_equivalised_income_internal
(was wrong)aggregate_subset_functions.who_below_poverty_line
and who_relative_poverty
(already correct in the former, but edited to call common method)generate_composite_vars.update_poverty_vars_hh
(was wrong)income.lmmYJIncome.on_time_step
(correct, but replaced with common method)intervention
(multiple places, all of which were correct, but now use common method)Correct process, as implemented in US_utils.get_median
with default arguments, and to be called from everywhere above, is:
Rough to do list for immediate things to do on child poverty modelling, following PHS/SG meeting, 30/01/24.
283-moving-poverty-metrics
before merging into283_child_uplift_generalised
. -> done in cbe89c61407eff5571f685cad4990c116f9e47c8modules.binary_plotter
, which was a workaround and not a good solution). -> done in f5b649fd5f9374b211548c49b37aed94b62c73a4, just movedbinary_plotter
for now without trying to integrate intoaggregate_lineplot
, can check if any useful functionality next time we're plotting stuff in earnestget_equivalised_income_internal
) to UK data (get_equivalised_income_uk
) inUS_utils
if required; see 9f00e5b9abaadabb86f29f7c0ca5023c5649cc22 and adjacent commitsnkids
calculations in SUSTAIN and RANDOM; currently summed across individuals rather than households -> done in 834d13b39e9807cc0dec8b72b69b85d7724abe49283
when pulling285
in (see 140d323838985fb77fcd1860d541ca37c8a51bbe), so should check the following files to make sure no useful functionality missed:validation/handovers.Rmd
(paths in header);transitions/model_definitions_default.txt
(all models changed; which are correct?) -> leaving as fine, only a couple of lines, might be useful in futuremodules/replenishment
(all poverty vars now grabbed from columns of input pop, must check all poverty vars okay throughout sim) -> no issues since then, also deleted some junk in 2bff226c9a5c858e901270c90583b254df59af80data_generation/US_complete_case
(checkcomplete_case_vars
and block after that inmain
are okay) -> no additional type issues have arisen (cf. #352), so marking as done in 9be61f5a1de6469c29bb706ed0cdff25c2585eb7data_generation/generate_repl_pop
(check typecasting okay; cf. #352). -> presumably this relates to the block ingenerate_replenishing
where poverty vars are cast toint
; marking as done as no issues since then283_child_uplift_generalised
into283-moving-poverty-metrics
.