Good Afternoon Statalist,
I am attempting to run a mixed-effects model using longitudinal complex survey data from the Medical Expenditure Panel Survey, and I want to make sure I am giving Stata the correct syntax for the types of estimates I am looking for. I am using me models instead of using xt models because the me suite of models works with svy commands. I have also used mi impute chained to impute missing values for two of my variables. This is the basic gist of my existing code (my data are in LONG format):
This code gives me one set of estimates, but if I want random effects, I believe my code needs to look like this:
Does the first set of code give me estimates that would be equivalent to xtnbreg, fe? Does my second code look like it would estimate a fixed effects model with random intercepts for each person? Any help would be much appreciated, as I am still trying to figure out how the me suite of commands works. Also please let me know if I can elaborate a little bit more on what I'm trying to ask.
Thanks in advance!
I am attempting to run a mixed-effects model using longitudinal complex survey data from the Medical Expenditure Panel Survey, and I want to make sure I am giving Stata the correct syntax for the types of estimates I am looking for. I am using me models instead of using xt models because the me suite of models works with svy commands. I have also used mi impute chained to impute missing values for two of my variables. This is the basic gist of my existing code (my data are in LONG format):
Code:
use MEPS_imputed_final.dta mi svyset varpsu, strata(varstr) || personid [pweight=longwt] || round mi estimate, post cmdok: svy, subpop(if tabsample==1): menbreg numov i.SICPAY, offset(totalmos)
Code:
mi svyset varpsu, strata(varstr) || personid weight(longwt) || round mi estimate, post cmdok: svy, subpop(if tabsample==1): menbreg numov i.SICPAY, offset(totalmos) || personid:
Does the first set of code give me estimates that would be equivalent to xtnbreg, fe? Does my second code look like it would estimate a fixed effects model with random intercepts for each person? Any help would be much appreciated, as I am still trying to figure out how the me suite of commands works. Also please let me know if I can elaborate a little bit more on what I'm trying to ask.
Thanks in advance!