datacarpentry / stata-economics

Economics Lesson with Stata
https://datacarpentry.org/stata-economics/
Other
27 stars 20 forks source link

Never do a many-to-many, m:m merge. Address comments on E05 #86

Open andrasvereckei opened 4 years ago

andrasvereckei commented 4 years ago

I would suggest to qualify the 'Never do a many-to-many, m:m merge.' statement by writing that many-to-many relationships are hardly encountered and that the student should be well aware of its applicability in their particular use-case.

sergiocorreia commented 4 years ago

TBH, for many-to-many relationships (cartesian products) then joinby is the way to go. I've never seen a piece of code where m:m merges are the way to go, and I've seen several where it was used by mistake.