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
Cloud computing Stata/BEDear all, I have a very big geocoded panel dataset of about 21 million observations or 4 million if…
Fixed Effects High Prob F and low RsqHello everyone, After performing xtoverid and interpreting its results, I decided to run a fe robust…
How do you combine categorical and numerical variables?How can I combine variables? These variables all refer to use of prescription benzodiazepines: val…
Consecutive observations by mofdHello everyone, I am working with panel data and I would like to kindly ask you for some guidance. T…
Strate graphHi everyone, I would like to create a survival graph: a strate graph. I ask you if it is possible to…
Subscribe to:
Post Comments (Atom)
0 Response to Problem analyzing outcome by date
Post a Comment