hello
i'm trying to merge two datasets but I'm not sure if what I'm trying to do (which is not working out) is even correct or possible.
I have a dataset measuring sexual violence in conflict and one which measures female combatants in conflict. I now want to add the variable that measures female combatants in conflict to the dataset of sexual violence.
i tried merging them by the common variables country, and conflict duration but stata tells me that " variables conflictdur country do not uniquely identify observations in the master data
r(459)"
this is what i did so far:
use wood_thomasJPR_replication12.dta, clear
rename duration conflictdur
sort conflictdur country
save wood_thomasJPR_replication12.dta, replace
clear
***********
use Repl2_Cohen_Nordas_JCR.dta
sort conflictdur country
save Repl2_Cohen_Nordas_JCR.dta, replace
clear
***********
use Repl2_Cohen_Nordas_JCR.dta, clear
merge 1:1 conflictdur country using wood_thomasJPR_replication12.dta, keepusing(female_combat_binary) keep(match master)
drop _merge
I'm actually just interested in adding the variable "female_combat_binary" to the "Repl2_Cohen_Nordas_JCR.dta" dataset.
Thanks for your help!!
Related Posts with Merging datasets
different results with rhausman codeDear All,
I get different results each time when I run the code "rhausman FE RE, cluster " for the …
ppml: e(converged) equals neither 0 nor 1When I run the following command
Code:
ppml value ExporterFE* ImporterFE* ${bilaterals}
and then ty…
Changing the contents in a variableI wanted to change the contents in a variable. The variable, termed "outcome" contains integer numbe…
Logistic Delta Method Standard ErrorsHi all,
I have a few basic questions regarding the output associated with logistic command.
Code:…
Bonferroni Correction with Dunn TestWhat exactly does the Bonferroni correction in the Dunn Test code do:
Code:
dunntest rating, by(o…
Subscribe to:
Post Comments (Atom)
0 Response to Merging datasets
Post a Comment