Relative Content

Tag Archive for stata

Create joint state for overlapping states

I have a dataset in the long format where there are multiple rows per individual. I have variables start date, end date and state. The state variable has values such as A, B, C etc. ID 1 has state A from Jan 2020 to August 2021. ID 1 has State B from June 2020 to Jan 2021. Now, create a joint where there is overlapping state. The output for instance can look like, Jan 2020 to May 2020, joint state A, June 2020 to Jan 2021, joint state A+B and From Feb 2021 to August 2021 the joint State is A. Show me how to do this STATA.

did_multiplegt_dyn – base comparison time

I am using did_multiplegt_dyn in Stata to estimate the effect of a treatment. When using an earlier version of this package (did_multiplegt), the event study plot produced used t= -1 as the baseline year for comparisons – As the package explains, “accordingly, the first placebo is shown at period -2 on the graph.”

Date data in STATA

I have a date variable doi which is in %td format, I want drop specific dates but the command i am using either not deleting the cases of showing “type mismatch”. I changed the format to %tdNN/DD/CCYY still the outcome is same. (using STAT MP 17.0)