UBICenter / uk

Simulations of UBI in the UK
MIT License
3 stars 6 forks source link

Change child/working-age/pension-age to 0-17/18-64/65+ #30

Closed MaxGhenis closed 3 years ago

MaxGhenis commented 3 years ago

Currently these are set from the is_child flag in the FRS and the union of 65+ and state pension receipt. A tiny number of 18-year-olds and 64-year-olds have the is_child and state pension receipt, respectively. Let's make this purely age-based.

MaxGhenis commented 3 years ago

Actually is_child is calculated based on age, not from the FRS flag:

https://github.com/PSLmodels/openfisca-uk/blob/fef3bb58b3d74f0f035f7a7b0c49a40eb35935f1/openfisca_uk/variables/person/attributes.py#L60-L67

nikhilwoodruff commented 3 years ago

@MaxGhenis actually I think it is I'm afraid- formulas are secondary to inputs, when an input is provided it overrides the formula, but it's still useful to have the formula in case we haven't provided a child flag, e.g. in a test case. When loading the FRS we use the child flag.

MaxGhenis commented 3 years ago

That makes sense. Could there be a metadata field designating that a formula aligns with a field in the raw data, rather than being something new?

MaxGhenis commented 3 years ago

Fixed