Hello STATAListers,
I'm a new user and having trouble working on a simple dataset with just 5 variables but only 3 are subject to this inquiry: "subject" (integers 1-100), the outcome "retired" (binary 0 or 1), and "date _born" (formatted as %tdnn/dd/CCYY).
I am having trouble summarizing "retired" by "date_born."
Using "List" I can confirm the subject data is all there and formatted consistently
The error I have been receiving is "date: operator invalid"
The commands I have been trying is:
. summarize retired if date_born<=01/01/2001
I've also tried a number of combinations where the date_born<2001 or date_born==[a specific mm/dd/YYY matching a subject's birthdate] but to no avail.
I'd appreciate any help regarding how to format my date_born variable to execute the command properly
Thanks!
Related Posts with Problem analyzing outcome by date
mestreg - Incorporating Variance covariance structureGreetings!! I'm John, currently working on multilevel survival analysis using mestreg command.. I wa…
95% confidence intervals around proportions on line graph – usefulness?Hi all, I’m using Stata 15. I’m doing an analysis of applicants for grants. I have a graph showing,…
Why homogeneous treatment assumption leads to "spurious identification of long-run treatment" in staggered DiD?Borusyak, 2021 has a sentence Third, in dynamic specifications, implicit assumptions about trea…
What does "unrestricted treatment effect heterogeneity" mean?Borusyak, 2021 has a sentence We show that this estimator takes a particularly transparent form…
How to perform CS-ARDL?Hello all, I want to apply CS-ARDL to my model but as I am new to the field and STATA I could not f…
Subscribe to:
Post Comments (Atom)
0 Response to Problem analyzing outcome by date
Post a Comment