Dear Stata Users,
I have a panel dataset and I would like to identify marital changes (var marital).
Suppose that 1 represents single, 2 marriage and 4 divorce, I would like to create a unique indicator that
considers that the individual 1002352* had a transition from single to marriage AND, then, to divorce.
So far, I used the lagged operator because I was interested in just one transition and not in the subsequent one.
But I am not so sure on how to add the second change, Do you have any suggestion?
ID t marital
1002352* 1 1
1002352* 2 2
1002352* 3 4
1002352* 5 4
1002352* 6 4
1002352* 7 4
Thank you, Lydia
Related Posts with Indicator for more than one marital change
Question (Omitted for multicollinearity)Dear all, I am running some regressions in which I want to investigate the role of foreign technolo…
Trouble Exporting a Table 1 Into a PDF Directly From Stata CommandsHi all, I am currently doing research, so I will use a sample example from this link to ask my quest…
Spatial Panel Data and Spatial Weight MatrixHi all, I use Stata 17 to create a spatial panel dataset of more than 3000 US counties and 5 time p…
Getting selected variables from cvlassoMy read of "help cvlasso" is that e(varXmodel) should contain only variables chosen by cvlasso. Howe…
Creating Annual/Yearly VariableHello Statalisters, I need to generate an annual variable from 2014 to 2020 in my data set. Current…
Subscribe to:
Post Comments (Atom)
0 Response to Indicator for more than one marital change
Post a Comment