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!