Hi,
I'm trying to merge two dates variables from the same dataset, but I would like to prioritize one on the other:
considering date1 and date2
I would like to generate date3 = date1, except if date1 is missing, then replacing by date2
I tried :
gen date3 = date1
replace date3 = date2 if date 1 == "."
but I got a type mismatch message, even if my variables are all in numeric daily date (float)
I hope I'm clear and someone can help me,
Many thanks
El
Ps: Merry Christmas!
Related Posts with Merging dates
Generating a Count Variable using the 90 percentile centered on a five day window Hi I am working with a panel data set for 300 districts from 1959 to 1999 using Stata 13. I have go…
panel data regression Hey, I'm running panel data regressions, but I want to find out the coefficients for each country …
Problem (omitted because of collinearity Code: probit checking_account lending_interest i.size c.firm_age i.Legal_Status i.sector i.gender …
Cem (coarsened exact matching) create identifier for matched pairsDear Statalist Users, My data is on the district-year level and I am looking at the effect of mine …
Descriptive Data Table (Socio-demographic data)Hi there, I was wondering whether I could get a table like this on STATA? Array Thanks, Aslan …
Subscribe to:
Post Comments (Atom)
0 Response to Merging dates
Post a Comment