Hi all,
I am studying the effect of an individual's relative income on his/her likelihood to vote in elections. For this aim I use a dataset with over 100,000 observations from 71 countries, which includes variables measured at the individual level as well as variables measured at the country-level. Therefore I ran multilevel logisting regression models, using meqrlogit. My question regards the comparison of the effect of income on voting between two nested models. This is my first post ever, so please correctly me if I'm doing something wrong. See below for an example of the dataset:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(idno cntry2) byte(incquin_h voting_h) float(dissat_h trstpol_h) byte(interest_h educ_h) int age float age2 byte female float(gini_c gdppc_c fhdemoc_c comp_vote)
348746 1 1 1 5 0 1 2 60 3600 1 -.0852427 21.071457 1.5105634 0
348324 1 2 1 1 1.5 2 2 77 5929 1 -.0852427 21.071457 1.5105634 0
347809 1 2 1 3 1.2 0 2 71 5041 0 -.0852427 21.071457 1.5105634 0
348597 1 3 1 1 1.2 1 2 66 4356 0 -.0852427 21.071457 1.5105634 0
347332 1 5 0 2 2.1 1 2 55 3025 1 -.0852427 21.071457 1.5105634 0
348332 1 4 1 1 2.7 0 2 38 1444 1 -.0852427 21.071457 1.5105634 0
347539 1 2 1 4 .9 0 2 72 5184 1 -.0852427 21.071457 1.5105634 0
347647 1 3 1 1 1.5 0 2 69 4761 1 -.0852427 21.071457 1.5105634 0
348086 1 3 1 2 2.1 0 2 31 961 1 -.0852427 21.071457 1.5105634 0
347657 1 2 1 4 2.1 1 2 77 5929 0 -.0852427 21.071457 1.5105634 0
end
label values cntry2 def_country
label def def_country 1 "AT", modify
label values incquin_h def15
label def def15 1 "lowest quintile", modify
label def def15 2 "2nd quintile", modify
label def def15 3 "3rd quintile", modify
label def def15 4 "4th quintile", modify
label def def15 5 "highest quintile", modify
label values voting_h def2
label def def2 0 "no", modify
label def def2 1 "yes", modify
label values dissat_h def11
label def def11 1 "very satisfied", modify
label def def11 2 "fairly satisfied", modify
label def def11 3 "neutral", modify
label def def11 4 "not very satisfied", modify
label def def11 5 "not at all satisfied", modify
label values trstpol_h def13
label def def13 0 "none at all", modify
label values interest_h def8
label def def8 0 "not (very)", modify
label def def8 1 "somewhat", modify
label def def8 2 "very/much", modify
label values educ_h def1
label def def1 2 "middle", modify
label values female female
label def female 0 "0. male", modify
label def female 1 "1. female", modify
label values comp_vote _noyes
label def _noyes 0 "no", modify
In model 1, I ran melogit to test the effect of relative income (incquin) on voting, controlling for some individual-level variables and country-level variables, and I include a random slope of income at the country-level. See below for the code:
Code:
meqrlogit voting_h incquin /// (the effect of relative income)
i.educ_h age age2 i.female /// (individual-level controls)
gini_c gdppc_c fhdemoc_c i.comp_vote /// (country-level controls)
|| cntry2: incquin , laplace
and corresponding output:
Code:
Refining starting values:
Iteration 0: log likelihood = -50356.71 (not concave)
Iteration 1: log likelihood = -50322.602 (not concave)
Iteration 2: log likelihood = -50302.917
Performing gradient-based optimization:
Iteration 0: log likelihood = -50302.917 (not concave)
Iteration 1: log likelihood = -50266.829 (not concave)
Iteration 2: log likelihood = -50250.624 (not concave)
Iteration 3: log likelihood = -50222.191
Iteration 4: log likelihood = -50156.553 (not concave)
Iteration 5: log likelihood = -50128.84
Iteration 6: log likelihood = -50118.001
Iteration 7: log likelihood = -50112.054
Iteration 8: log likelihood = -50111.894
Iteration 9: log likelihood = -50111.893
Mixed-effects logistic regression Number of obs = 106,535
Group variable: cntry2 Number of groups = 71
Obs per group:
min = 365
avg = 1,500.5
max = 3,082
Integration points = 1 Wald chi2(10) = 10405.74
Log likelihood = -50111.893 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
voting_h | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
incquin_h | .0965892 .0161354 5.99 0.000 .0649644 .1282141
|
educ_h |
middle | .1922642 .024659 7.80 0.000 .1439334 .2405949
high | .7044092 .029537 23.85 0.000 .6465178 .7623006
|
age | .1559657 .0023865 65.35 0.000 .1512883 .160643
age2 | -.0011749 .0000244 -48.24 0.000 -.0012226 -.0011271
|
female |
1. female | .0241919 .0159423 1.52 0.129 -.0070545 .0554383
gini_c | .4381092 1.774624 0.25 0.805 -3.040089 3.916308
gdppc_c | -.0118406 .0073833 -1.60 0.109 -.0263116 .0026304
fhdemoc_c | -.0820563 .056478 -1.45 0.146 -.1927511 .0286386
|
comp_vote |
yes | .661497 .2171799 3.05 0.002 .2358322 1.087162
_cons | -3.681004 .1235347 -29.80 0.000 -3.923128 -3.438881
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
cntry2: Independent |
var(incqui~h) | .014761 .0030403 .0098581 .0221024
var(_cons) | .5628691 .1011927 .3957111 .8006385
------------------------------------------------------------------------------
LR test vs. logistic model: chi2(2) = 5693.94 Prob > chi2 = 0.0000
Note: LR test is conservative and provided only for reference.
Note: Log-likelihood calculations are based on the Laplacian approximation.
In model 2 I add three more explantory variables to the model, and afterwards I would like to compare the effect of relative income in model 1 to the effect of relative income in model 2. First, please take a look at the code and output for model 2:
Code:
. meqrlogit voting_h incquin ///
> dissat_h trstpol_h interest_h ///
> i.educ_h age age2 i.female ///
> gini_c gdppc_c fhdemoc_c i.comp_vote ///
> || cntry2: incquin , laplace
Refining starting values:
Iteration 0: log likelihood = -46422.943 (not concave)
Iteration 1: log likelihood = -46373.814 (not concave)
Iteration 2: log likelihood = -46337.772
Performing gradient-based optimization:
Iteration 0: log likelihood = -46337.772 (not concave)
Iteration 1: log likelihood = -46303.366 (not concave)
Iteration 2: log likelihood = -46275.975
Iteration 3: log likelihood = -46229.955
Iteration 4: log likelihood = -46176.96
Iteration 5: log likelihood = -46176.217
Iteration 6: log likelihood = -46176.214
Mixed-effects logistic regression Number of obs = 101,281
Group variable: cntry2 Number of groups = 71
Obs per group:
min = 326
avg = 1,426.5
max = 2,992
Integration points = 1 Wald chi2(13) = 11051.25
Log likelihood = -46176.214 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
voting_h | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
incquin_h | .0795098 .013856 5.74 0.000 .0523526 .1066671
dissat_h | -.0604718 .0078263 -7.73 0.000 -.075811 -.0451326
trstpol_h | .1157597 .011594 9.98 0.000 .0930359 .1384834
interest_h | .5438414 .0140806 38.62 0.000 .516244 .5714388
|
educ_h |
middle | .109462 .0260258 4.21 0.000 .0584524 .1604716
high | .521709 .0311397 16.75 0.000 .4606762 .5827417
|
age | .1604742 .0025156 63.79 0.000 .1555437 .1654047
age2 | -.001246 .0000258 -48.27 0.000 -.0012966 -.0011954
|
female |
1. female | .1046391 .0167227 6.26 0.000 .0718631 .1374151
gini_c | -.0397291 1.562621 -0.03 0.980 -3.102411 3.022953
gdppc_c | -.0130286 .0065216 -2.00 0.046 -.0258107 -.0002464
fhdemoc_c | -.0466351 .0498051 -0.94 0.349 -.1442513 .0509811
|
comp_vote |
yes | .6699579 .191176 3.50 0.000 .2952598 1.044656
_cons | -3.837195 .1180434 -32.51 0.000 -4.068556 -3.605834
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
cntry2: Independent |
var(incqui~h) | .009697 .0021587 .0062683 .0150012
var(_cons) | .4289071 .078116 .300148 .6129018
------------------------------------------------------------------------------
LR test vs. logistic model: chi2(2) = 4124.09 Prob > chi2 = 0.0000
Note: LR test is conservative and provided only for reference.
Note: Log-likelihood calculations are based on the Laplacian approximation.
So, again, my question is: how can I test whether the effect of incquin_h in model 1 (b =.0965892; se=.0161354) is significantly different from the effect of incquin_h in model 2 (b= .0795098; se = .013856)?
The only thing I could find so far was to use -suest- for these kinds of comparisons. However, this is not possible in this situation, since suest requires that predict allows the score option which is not the case with the models presented here.
Thanks in advance for considering this post, and please let me know if I should clarify something.