Multiple membership model error
Posted: Mon Apr 14, 2014 8:03 am
Hi,
I am trying to run a multiple membership model using runmlwin in Stata (linking to MLWin v 2.30). I have used the code provided in section 16.4 of the MLWin MCMC manual. The code runs fine until the last command, when I get the following error message in Stata:
“Number of variables in mmids2() must equal number of variables in mmweights2().;”
My dataset is a cohort of 1000 individuals, who belong to 4 different neighborhoods along their life (sams1-sams4). I have created mmweight variables for each time point. I think I have the same number of variables in both the sams and the weights. My Stata code is shown below:
Any suggestion?
Regards,
Miguel
I am trying to run a multiple membership model using runmlwin in Stata (linking to MLWin v 2.30). I have used the code provided in section 16.4 of the MLWin MCMC manual. The code runs fine until the last command, when I get the following error message in Stata:
“Number of variables in mmids2() must equal number of variables in mmweights2().;”
My dataset is a cohort of 1000 individuals, who belong to 4 different neighborhoods along their life (sams1-sams4). I have created mmweight variables for each time point. I think I have the same number of variables in both the sams and the weights. My Stata code is shown below:
Code: Select all
sort sams1 id
quietly runmlwin Qfunc43 cons, level2(sams1: cons) level1(id: cons) nopause
matrix b = e(b)
matrix V = e(V)
runmlwin Qfunc43 cons, level2(sams1: cons, mmids(sams1-sams4) mmweights(weight1-weight4)) level1(id:cons) mcmc(on) initsb(b) initsv(V) nopause
Regards,
Miguel