I have three date variables corresponding to the beginning of three surveys for different individuals in the %td format (01jan2020 for instance) (so the beginning of survey 1 can vary across observations, etc.).
To generate the earliest date, I would just go for egen earliest = rowmin(date1 date2 date3), but what if I'm interested in finding the earliest date an individual has been surveyed between, say, February 2020 and November 2020?
Thanks a lot for the help. I would love to show you some data example but I don't know how to shuffle my dataset because the first observations only have one date available. I'd be grateful if someone helped me figure that little problem out!
Related Posts with Finding the earliest date within two boundaries
How to perform an interrupted time series analysis with multiple treatment groups?Hi all, I'm do a controlled interrupted time series analysis on Stata 15.1. I have five years of p…
Problem with calculating functions over subgroupsHi, I am having some troubles in computing functions over subgroups. Basically, I have some financ…
Compustat-Calculating a firms age (not based on IPO-data)Hello! For my masterthesis I am using the Gfunda as well as the Northamerica Database in Compustat.…
Is quantile regression with clustered standard errors a good option?I'm working with panel data with evidence of heteroskedasticity. I am looking at returns to college …
Stata triple interaction and base categoryI have four variables: panid (id variable), period (categorical going from 0 to 2), size (categorica…
Subscribe to:
Post Comments (Atom)
0 Response to Finding the earliest date within two boundaries
Post a Comment