I have two datasets that wish to merge but cannot find a way to do so. The data set are asss followws with my command to mrge them, but the command didn't wrk:
First data set:
p:\Data\Data\ivscum.dta
oneway ancestry country,tab
.
. collapse proudnationality - trustothernationality bornhere respetlaws-immigrantskeepcustoms justifiableillegal justifiableimmoral,by(country)
. fsum *
Variable | N Mean SD Min Max
--------------------------+---------------------------------------------
country | 49 433.41 273.20 8.00 915.00
proudnationality | 49 1.67 0.23 1.13 2.12
trustpeople | 31 2.27 0.29 1.82 3.04
trustneighborhood | 36 2.04 0.21 1.56 2.53
trustknowotherpersonally | 36 1.83 0.25 1.21 2.23
trustfirsttime | 36 2.81 0.33 2.09 3.50
trustotherreligion | 36 2.46 0.30 1.85 3.05
trustothernationality | 36 2.44 0.31 1.78 3.07
bornhere | 47 0.92 0.09 0.55 1.00
respetlaws | 49 -0.53 1.57 -4.00 1.94
ancestry | 49 -0.25 1.55 -4.00 2.73
lang | 49 -0.55 1.52 -4.00 1.93
immigrantstakejobs | 47 5.32 0.95 3.36 7.46
immigrantscrime | 47 4.59 0.77 2.87 6.37
immigrantsstrainwelfare | 47 4.53 0.92 1.87 6.41
immigrantskeepcustoms | 47 5.58 0.69 3.88 7.07
justifiableillegal | 13 0.06 0.29 -0.24 0.77
justifiableimmoral | 13 -0.02 0.28 -0.47 0.35
. save "p:\Data\Data\ivscum.dta", replace
file p:\Data\Data\ivscum.dta saved
second dataset:
-> oneway immigrantstakejobs country,tab
my command that didn't work:
. collapse proudnationality - trustothernationality bornhere respetlaws-immigrantskeepcustoms justifiableillegal justifiableimmoral,by(country)
. fsum *
Variable | N Mean SD Min Max
--------------------------+---------------------------------------------
country | 49 433.41 273.20 8.00 915.00
proudnationality | 49 1.67 0.23 1.13 2.12
trustpeople | 31 2.27 0.29 1.82 3.04
trustneighborhood | 36 2.04 0.21 1.56 2.53
trustknowotherpersonally | 36 1.83 0.25 1.21 2.23
trustfirsttime | 36 2.81 0.33 2.09 3.50
trustotherreligion | 36 2.46 0.30 1.85 3.05
trustothernationality | 36 2.44 0.31 1.78 3.07
bornhere | 47 0.92 0.09 0.55 1.00
respetlaws | 49 -0.53 1.57 -4.00 1.94
ancestry | 49 -0.25 1.55 -4.00 2.73
lang | 49 -0.55 1.52 -4.00 1.93
immigrantstakejobs | 47 5.32 0.95 3.36 7.46
immigrantscrime | 47 4.59 0.77 2.87 6.37
immigrantsstrainwelfare | 47 4.53 0.92 1.87 6.41
immigrantskeepcustoms | 47 5.58 0.69 3.88 7.07
justifiableillegal | 13 0.06 0.29 -0.24 0.77
justifiableimmoral | 13 -0.02 0.28 -0.47 0.35
p:\icvsnew2026augustnew.dta
. fsum *
Variable | N Mean SD Min Max
------------------------+---------------------------------------------
country | 49 433.41 273.20 8.00 915.00
neighborscriminals | 48 0.53 0.19 0.16 0.83
priorityimmsjobs | 36 3.62 0.59 2.46 4.72
unfairjobshandicapped | 49 -3.22 0.79 -4.00 -0.60
workforsalary | 47 2.47 0.38 1.71 3.16
lazy | 47 2.28 0.38 1.68 3.60
equality | 49 -0.15 1.15 -4.00 1.47
competition | 49 3.05 1.03 -0.88 4.30
concernY | 46 1.60 0.48 1.08 3.22
neighbourhood | 47 2.81 0.36 1.67 3.67
region | 47 2.99 0.33 1.96 3.61
countrymen | 47 2.91 0.30 1.96 3.43
europeas | 47 3.44 0.25 2.85 3.95
humanrace | 47 3.16 0.34 2.25 3.93
elderly | 47 2.10 0.23 1.55 2.73
unemployed | 47 2.55 0.37 1.67 3.32
immigrants | 47 3.23 0.36 2.46 3.99
disabled | 47 2.18 0.25 1.49 2.76
taxrich | 49 -1.50 2.08 -4.00 5.64
interpret | 49 -2.33 1.39 -4.00 2.03
elecleaders | 49 -0.94 2.61 -4.00 8.88
unemploymentaid | 49 -1.19 2.42 -4.00 8.09
churchracedisc | 26 0.68 0.12 0.44 0.88
churcheuthanasia | 26 0.60 0.13 0.32 0.89
churchhomosexuality | 26 0.43 0.15 0.22 0.80
churchecology | 26 0.60 0.11 0.34 0.85
churchgovernmentpolicy | 26 0.28 0.10 0.15 0.45
I then typed:
collapse proudnationality - trustothernationality bornhere respetlaws-immigrantskeepcustoms justifiableillegal justifiableimmoral,by(country)
. fsum *
Variable | N Mean SD Min Max
--------------------------+---------------------------------------------
country | 49 433.41 273.20 8.00 915.00
proudnationality | 49 1.67 0.23 1.13 2.12
trustpeople | 31 2.27 0.29 1.82 3.04
trustneighborhood | 36 2.04 0.21 1.56 2.53
trustknowotherpersonally | 36 1.83 0.25 1.21 2.23
trustfirsttime | 36 2.81 0.33 2.09 3.50
trustotherreligion | 36 2.46 0.30 1.85 3.05
trustothernationality | 36 2.44 0.31 1.78 3.07
bornhere | 47 0.92 0.09 0.55 1.00
respetlaws | 49 -0.53 1.57 -4.00 1.94
ancestry | 49 -0.25 1.55 -4.00 2.73
lang | 49 -0.55 1.52 -4.00 1.93
immigrantstakejobs | 47 5.32 0.95 3.36 7.46
immigrantscrime | 47 4.59 0.77 2.87 6.37
immigrantsstrainwelfare | 47 4.53 0.92 1.87 6.41
immigrantskeepcustoms | 47 5.58 0.69 3.88 7.07
justifiableillegal | 13 0.06 0.29 -0.24 0.77
justifiableimmoral | 13 -0.02 0.28 -0.47 0.35
. save "p:\Data\Data\ivscum.dta", replace
file p:\Data\Data\ivscum.dta saved
and received
. merge 1:1 proudnationality - justifiableimmoral by(country) using p:\icvsnew2026augustnew.dta
factor-variable and time-series operators not allowed
r(101);
But thee are no factor-variable and time-series operators in either data set, What did I do wrong? Any helpwould be appreciated,
RiC Uslaner

Comment