Dear Statalisters:
I have the following file #1:
clear
input byte(firmid ownerid) float own byte level
1 4 10 1
1 3 53.8 1
2 5 100 2
3 6 50 2
3 7 50 2
6 8 20 3
8 9 20 4
end
that I need to merge with fie #2:
clear
input byte(ownerid ownerid2) float own2 byte level2
1 4 10 1
1 3 53.8 1
2 5 100 2
3 6 50 2
3 7 50 2
6 8 20 3
8 9 20 4
end
using the variable "ownerid"
the "ownerid" variable can appear more than once both in the master and using data files. Considering prior posts saying that it is not a good idea to use the merge m:m command, I am wondering on how to merge these to files that have an "m:m" structure, but without using the merge m:m.
thank you all for your help and stay safe,
LR
Related Posts with Avoiding merge m:m problem...
Comparing age adjusted mortality ratesHello everyone. I am trying to compare age-adjusted mortality rate for two population. Rural age ad…
Logit & conformability error in inteff I am using a survey data to run a logit regression, and currently I am testing the interactions of …
Drop variables based on nameHi, I have a dataset with 100 variables, 50 of which are called Xi_ante and 50 of which are called X…
Stata dropping interacting Time Period Covariates. Can't figure out why.Good Morning. I am trying to run a simple descriptive regression on a year-district (1964-2002, ~40…
Instrumental variable analysis with multiple imputationHello all, I will please like to find out if IV analysis works with imputed data (i.e using multipl…
Subscribe to:
Post Comments (Atom)
0 Response to Avoiding merge m:m problem...
Post a Comment