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.
How the deal with the max(A) error in Sata
I use the following code to calculate maximum eigenvalue in stata
Number missing in dtable baseline table
How can I add a row of number missing into a baseline table created with dtable
in Stata 18?
Reshaping/transposing data in Stata
Apologies in advance for a basic question, but I’m fairly new to Stata and have been stuck on this for a little while now!
Getting the quantile of a variable based on the percentiles of another variable
I have two variables, x
and y
.
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.”
Stata: Sort legend to match sorting in bar graph
I want to plot the variable “change” across “sector” in Stata as a bar chart, using
Plot multiple graphs over sector and occupations in Stata
I tried with Sector looks nice.
catplot Sector sex, percent(sex) bar(1, bfcolor(none)) blabel(bar, pos(base) format(%3.2f))
Dropping observations by date
I have a date variable in Stata MP 17.0 doi
which is in %td
format.
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)