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
export entire dataset to latexI have used `esttab` before to export regression results to Stata. However I have build a small tabl…
GMM without lagged dependent variable using xtdpdgmmHello, I have a panel of large N and small T. Unbalanced and with time gaps. I hope to instrument th…
Effect of time on culture positivityI have a data set of sample results (positive or negative) and want to look at the effect of collect…
Different results for meta-analysis with built-in meta and older package 'metan'Hello, I have difficulties with performing a meta-analysis. I have run a meta-analysis with risk ra…
Change the size and spacing between the boxes in a boxplotDear Statalisters, I have made a boxplot containing 4 boxes within it. However, the boxes are very …
Subscribe to:
Post Comments (Atom)
0 Response to Merging dates
Post a Comment