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
Creating one year lagged variable for law ( state by year panel data)Hello stata community, I have a panel set of law effective data for state by year , and I need to c…
ResultsHi, I am dealing w/ panel data and am running 3 regressions based on a dummy variable that indicate…
GSEM identify latent classesI am trying to learn latent class models. I don't know much about them. I'm trying to figure out how…
Marginsplot: logit regression, IV is continous and moderator is a dummyDear Statalist, I run a logit regression and my IV is a continuous variable (average: -1.5, min: -2…
Checking Parallel Trends assumptionGood Afternon everyone, I am writing this post in order to receive some help with the verification o…
Subscribe to:
Post Comments (Atom)
0 Response to Problem analyzing outcome by date
Post a Comment