I am trying to do multilevel logit analysis on survey data that is mi set. I have no trouble running regular logistic regressions on this data using several different weights, but Stata seems to be ignoring the weights when I implement melogit instead of logit. I have pasted the code below, showing that the output of melogit is identical when I run it on the data without using svy, or when I run it using surveyset data with three complete different weight variables.
Am I doing something incorrect in the way that I run the multilevel logit models that could explain why melogit seems to be ignoring the survey weights? Or is there another approach that someone could recommend that might allow me to do this analysis?
At the moment I am running Stata/MP 14.0 for Mac, in case that is relevant.
Am I doing something incorrect in the way that I run the multilevel logit models that could explain why melogit seems to be ignoring the survey weights? Or is there another approach that someone could recommend that might allow me to do this analysis?
At the moment I am running Stata/MP 14.0 for Mac, in case that is relevant.
Code:
mi estimate, or: melogit success fully || course:
Multiple-imputation estimates Imputations = 35
Mixed-effects logistic regression Number of obs = 9,484
Average RVI = 0.0000
Largest FMI = 0.0000
DF adjustment: Large sample DF: min = .
avg = .
max = .
Model F test: Equal FMI F( 1, .) = 3.12
Within VCE type: OIM Prob > F = 0.0771
------------------------------------------------------------------------------------
success | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval]
-------------------+----------------------------------------------------------------
success |
fully | 1.313333 .2025 1.77 0.077 .9708002 1.776723
_cons | 17.01076 1.407229 34.26 0.000 14.46463 20.00507
-------------------+----------------------------------------------------------------
var(_cons[course]) |
_cons | .799304 .1253634 6.38 0.000 .5535961 1.045012
------------------------------------------------------------------------------------
Note: Number of groups varies among imputations.
Note: Number of observations per group varies among imputations.
mi svyset _n [pweight=newweight], vce(linearized) singleunit(missing)
pweight: newweight
VCE: linearized
Single unit: missing
Strata 1: <one>
SU 1: <observations>
FPC 1: <zero>
mi estimate, or: svy linearized: melogit success fully || course:
Multiple-imputation estimates Imputations = 35
Survey: Mixed-effects logistic regression Number of obs = 9,484
Number of strata = 1 Population size = 9,484
Number of PSUs = 9,484
Average RVI = 0.0000
Largest FMI = 0.0000
Complete DF = 9483
DF adjustment: Small sample DF: min = 9,481.00
avg = 9,481.00
max = 9,481.00
Model F test: Equal FMI F( 1, 9481.0) = 2.74
Within VCE type: Linearized Prob > F = 0.0977
------------------------------------------------------------------------------------
success | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval]
-------------------+----------------------------------------------------------------
success |
fully | 1.313333 .2161077 1.66 0.098 .9512453 1.813248
_cons | 17.01076 1.451358 33.21 0.000 14.39097 20.10748
-------------------+----------------------------------------------------------------
var(_cons[course]) |
_cons | .799304 .1299294 6.15 0.000 .5446145 1.053993
------------------------------------------------------------------------------------
Note: Number of groups varies among imputations.
Note: Number of observations per group varies among imputations.
mi svyset _n [pweight=normweightsubdl], vce(linearized) singleunit(missing)
pweight: normweightsubdl
VCE: linearized
Single unit: missing
Strata 1: <one>
SU 1: <observations>
FPC 1: <zero>
mi estimate, or: svy linearized: melogit success fully || course:
Multiple-imputation estimates Imputations = 35
Survey: Mixed-effects logistic regression Number of obs = 9,484
Number of strata = 1 Population size = 9,484
Number of PSUs = 9,484
Average RVI = 0.0000
Largest FMI = 0.0000
Complete DF = 9483
DF adjustment: Small sample DF: min = 9,481.00
avg = 9,481.00
max = 9,481.00
Model F test: Equal FMI F( 1, 9481.0) = 2.74
Within VCE type: Linearized Prob > F = 0.0977
------------------------------------------------------------------------------------
success | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval]
-------------------+----------------------------------------------------------------
success |
fully | 1.313333 .2161077 1.66 0.098 .9512453 1.813248
_cons | 17.01076 1.451358 33.21 0.000 14.39097 20.10748
-------------------+----------------------------------------------------------------
var(_cons[course]) |
_cons | .799304 .1299294 6.15 0.000 .5446145 1.053993
------------------------------------------------------------------------------------
Note: Number of groups varies among imputations.
Note: Number of observations per group varies among imputations.
mi svyset _n [pweight=newweightmlm], vce(linearized) singleunit(missing)
pweight: newweightmlm
VCE: linearized
Single unit: missing
Strata 1: <one>
SU 1: <observations>
FPC 1: <zero>
mi estimate, or: svy linearized: melogit success fully || course:
Multiple-imputation estimates Imputations = 35
Survey: Mixed-effects logistic regression Number of obs = 9,484
Number of strata = 1 Population size = 9,484
Number of PSUs = 9,484
Average RVI = 0.0000
Largest FMI = 0.0000
Complete DF = 9483
DF adjustment: Small sample DF: min = 9,481.00
avg = 9,481.00
max = 9,481.00
Model F test: Equal FMI F( 1, 9481.0) = 2.74
Within VCE type: Linearized Prob > F = 0.0977
------------------------------------------------------------------------------------
success | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval]
-------------------+----------------------------------------------------------------
success |
fully | 1.313333 .2161077 1.66 0.098 .9512453 1.813248
_cons | 17.01076 1.451358 33.21 0.000 14.39097 20.10748
-------------------+----------------------------------------------------------------
var(_cons[course]) |
_cons | .799304 .1299294 6.15 0.000 .5446145 1.053993
------------------------------------------------------------------------------------
Note: Number of groups varies among imputations.
Note: Number of observations per group varies among imputations.

Comment