Closed ld-archer closed 1 year ago
Drastic changes!!
Appears this was a bit of a cock up. Top is original, bottom is new:
. tab kcntm, m
Monthly or |
more |
contact |
with |
children | Freq. Percent Cum.
------------+-----------------------------------
0 | 40,690 40.88 40.88
1 | 32,833 32.99 73.86
. | 26,014 26.14 100.00
------------+-----------------------------------
Total | 99,537 100.00
. tab kcntm2, m
kcntm2 | Freq. Percent Cum.
------------+-----------------------------------
0 | 12,884 12.94 12.94
1 | 60,639 60.92 73.86
. | 26,014 26.14 100.00
------------+-----------------------------------
Total | 99,537 100.00
Can't do anything about the missing information unfortunately but definite improvement. Now to see what this does for the transition models.
Components of the social isolation index are created in the wave_specific_data.do file. These are:
Other components come directly from ELSA questions so don't need to be fixed.
The problem I think is that, because the definitions of these variables are complex (separate variables for different types of contact: text, phone call, face to face etc.) I originally had a series of replace == 1 if ... ; replace == 0 if ...
I think this means that the last replace command for each component decides the entire thing. Because of this I need to refactor this to account for all factors in one statement, i.e. replace == 1 if x & if y & if z & ... OR take the previous assigned values into account in the chain. i.e. replace kcntm = 1 if scchdg > 0 & scchdg < 4 & !missing(scchdg) | kcntm == 1 (from previous).