I have been trying to fit a multilevel multivariate model with two binary outcomes and MLwiN is has been the best program so far. I am investigating the predictors of smoking and alcohol use, and hypothesizing that variable x predicts both equally. I have a few questions I hope the forum can help with please, as I am still learning the syntax. Here is a sample code. Running stat 13 and MlwiN2.32
#1 How does one get the equation names to display in the results window? I would like to perform a wald test to examine the hypothesis that the effect size of variablex on alcohol is the same as the effect size of variable x on smoking. In the stata environment if a command for that might look like test [alcohol]variablex = [smoke]variablex. However, there is an error
/* I even tried copying Dr. Leckie's example where he tested the constant test [RP1]var(cons_1) = [RP1]var(cons_2) and I got an ERROR
[var(cons_1)] not found
/* i now one can call coeflegend when using margins, but im unaware if there is some equivalent in runmlwin*/
# 2 How does one obtain the odds ratios for the multivariate model?, when I typed in OR at the end, I get an ERROR: that Odds Ratios are only available for univariate models.
# 3 I have survey weights and so want to see how my estimates change/stay same when I used them (I already scaled the weights using Sophia's formula). However, when I add the weight, I get this ERROR: Weights are only valid for univariate models estimated using (R)IGLS.
I am aware that MLwiN can handle weights in the stand alone program, however, I am not familiar with its interphase.
# 4, In one model when I added multiple covariates, the variance at leve2 for constant2(smoke) is zero as well as the covariance (whereas it did have an estimate in other models ). My constant2 is now is also not statistically significant, so I am wondering if thats the reason why the variance estimate. Can anyone help me understand this?
/* below is a simple model with covariage centered age, and sex*/
/* I fitted the model before using igls and mlq to get the starting estimates, then fitted it with pql2 and rigls*/
Code: Select all
runmlwin (alcohol cons cage male2 variablex, eq(1)) (smoke cons cage male2 variablex, eq(2)), /// level2(nhood: (cons, eq(1)) (cons, eq(2))) /// level1(pid: (cons, eq(1)) (cons, eq(2)), weightvar(aw1)) /// discrete(distribution(binomial binomial) link(probit) denom(cons cons)pql2) /// maxiterations (50) nopause rigls initsp fps correlations