I am trying to fit a two-level multilevel logistic model in runmlwin using survey weights. The model runs fine using PQL2 estimation methods, however, I get the following error when trying to run the same model using MCMC methods: "Weights are only valid for univariate models estimated using (R)IGLS"
Here is the code I am using:
Code: Select all
* Fit model using PQL2
runmlwin outcome cons , ///
level2(group: cons) ///
level1(id:, weightvar(weight)) ///
discrete(distribution(binomial) link(logit) denominator(denominator) pql2) ///
rigls maxiterations(100) ///
nopause
* Fit model using MCMC
runmlwin outcome cons , ///
level2(group: cons, residuals(u, savechains("u.dta", replace))) ///
level1(id:, weightvar(weight)) ///
discrete(distribution(binomial) link(logit) denominator(denominator)) ///
mcmc(burnin(5000) chain(50000) thinning(50) ///
savechains("beta.dta", replace)) initsprevious ///
nopause