ld-archer / E_FEM

This is the repository for the English version of the Future Elderly Model, originally developed at the Leonard D. Schaeffer Center for Health Policy and Microsimulation.
MIT License
3 stars 1 forks source link

Married Status #54

Closed ld-archer closed 3 years ago

ld-archer commented 3 years ago

Have included variables for single, married and widowed, but so far haven't tied them together, so they could transition independently. I need to relate these variables to the original married status var that I derived them from, and transition this also.

There are already some variables set up for this in Vars.cpp/.h, I will need to re-purpose some of these variables. Need to ask Bryan about it tonight as there are some weird related variables that have something to do with the random number generation.

ld-archer commented 3 years ago
ld-archer commented 3 years ago

There are already some variable in Vars.cpp/.h for marriage status (including single, married l2married, widowed l2widowed, mstat_new).

None of these have a pvar version for probability of var, and single has no lag var. This is confusing, how do these variables transition if they don't have a probability of transitioning? Maybe other variables inform this one, and the other get transitioned separately? Need to ask Bryan tonight.

Update: Just found vars called exitsingle_f and exitsingle_m, as well as similar vars for married and cohab. Still need to ask Bryan why this is the case.

Anyway, adding in l2single as well as renaming some vars for ELSA. Will leave the pvars until later.

ld-archer commented 3 years ago

Didn't think about accounting in the CPP side of things. Had to remove and replace the logic around marriage for the US FEM. HealthModule is done (but not tested), I tried to keep it simple, and just say that anyone could transition from any marital state to any other marital state, even from single to widowed. 2 years is a relatively long gap, and I don't think it will be common but I added the logic just in case. Now having to remove traces of the mstat_new var (US version) from the PSIDInitialisationModule, as it was causing compiling errors. Will I have to replace all of the accounting for setting dummies in the GlobalPreInitialisationModule?

ld-archer commented 3 years ago

Accounting finished. There is 1 or 2 things I don't understand about how the US mstat and related dummy variables are coded, can ask Bryan tonight. Apart from that, finished and working, all work done on the feature/53-smoke-drink-intensity branch.