Multiple membership model error 2
Multiple membership model error 2
Dear George:
MLwiN gives me another error message: "error while obeying batch file C:\XXX at line number 90: MCMC 0 500 1 5.8 50 10 1 1 1 1 1 1"
I read in another post that it might be due to the starting values. Any suggestion how to solve this?
Regards,
Mguel
MLwiN gives me another error message: "error while obeying batch file C:\XXX at line number 90: MCMC 0 500 1 5.8 50 10 1 1 1 1 1 1"
I read in another post that it might be due to the starting values. Any suggestion how to solve this?
Regards,
Mguel
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Multiple membership model error 2
Have you tried supplying your own starting values to see whether this fixes the problem? Example syntax for how to do this can be found in the Stata do file replicating chapter 5 of the MCMC manual, which is provided on http://www.bris.ac.uk/cmm/software/runm ... ples/#mcmc.
Re: Multiple membership model error 2
Hi,
I have tried to follow the instructions and do the following:
quietly runmlwin Qfunc43 cons, level2(SAMS81: cons) level1(id: cons) nopause
matrix b = e(b)
matrix V = e(V)
matrix b[1,1] = -2
matrix b[1,2] = 5
matrix b[1,3] = 2
matrix b[1,4] = 4
Here there is an error saying: "conformability error"
My plan was later to apply:
runmlwin Qfunc43 cons, level2(SAMS81: cons, mmids(SAMS81 SAMS86) mmweights(weight1-weight2)) level1(id:cons) mcmc(burnin(0) chain(500)) initsb(b) initsv(V)
Any suggestion to solve that error?
Thanks in advance,
Miguel
I have tried to follow the instructions and do the following:
quietly runmlwin Qfunc43 cons, level2(SAMS81: cons) level1(id: cons) nopause
matrix b = e(b)
matrix V = e(V)
matrix b[1,1] = -2
matrix b[1,2] = 5
matrix b[1,3] = 2
matrix b[1,4] = 4
Here there is an error saying: "conformability error"
My plan was later to apply:
runmlwin Qfunc43 cons, level2(SAMS81: cons, mmids(SAMS81 SAMS86) mmweights(weight1-weight2)) level1(id:cons) mcmc(burnin(0) chain(500)) initsb(b) initsv(V)
Any suggestion to solve that error?
Thanks in advance,
Miguel
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Multiple membership model error 2
The b matrix should be 1x[number of parameters] and the V matrix should be [number of paramters]x[number of parameters]. I count three parameters in in your example model (FP1:cons, RP2:cons, RP1:cons) so you would only need to specify three elements of b for this. You can check the dimensions and contents of these matrices with the following code:
Code: Select all
mat list b
mat list V
Re: Multiple membership model error 2
Thanks Chris. That problem is solved. But still when I run the last command:
runmlwin Qfunc43 cons, level2(SAMS81: cons, mmids(SAMS81 SAMS86) mmweights(weight1-weight2)) level1(id:cons) mcmc(burnin(0) chain(500)) initsb(b) initsv(V)
This error comes: "error while obeying batch file C:\XXX at line number 90: MCMC 0 0 1 5.8 50 10 1 1 1 1 1 1"
Any idea?
Thanks,
Miguel
runmlwin Qfunc43 cons, level2(SAMS81: cons, mmids(SAMS81 SAMS86) mmweights(weight1-weight2)) level1(id:cons) mcmc(burnin(0) chain(500)) initsb(b) initsv(V)
This error comes: "error while obeying batch file C:\XXX at line number 90: MCMC 0 0 1 5.8 50 10 1 1 1 1 1 1"
Any idea?
Thanks,
Miguel
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Multiple membership model error 2
When MLwiN opens could you try pressing the "Abort Macro" button and instead run the model using the "Start" button, as this may give you a more informative error message?
Re: Multiple membership model error 2
Thanks. When I do that (Abort and Start) a new error message appears: MCMC Error 0142: The 2th MM unit for obs 3 is a duplicate of the 1th MM unit(MCMC)
I checked obs 3 but it seems to me the same as the others.
I checked obs 3 but it seems to me the same as the others.
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Multiple membership model error 2
Each row of multiple membership IDs should not contain any repeats, if they are the same you need to remove one and set the weight of the other to the combined weight. If SAMS81 and SAMS86 don't have the same value for your third observation could you post the first few lines of data so we can attempt to determine what else might be triggering the message?
Re: Multiple membership model error 2
Hi,
my population has been living in four neighborhoods during their live so for some cases (rows) the same code could apply for the neighborhood for instance at time 1 and 3 because the person lived first in neighborhood X1, moved to X2 and then to X1 again. Could it be this the source of error?
When I run:
sort SAMS81 id
quietly runmlwin Qfunc43 cons, level2(SAMS81: cons) level1(id: cons) nopause
matrix b = e(b)
matrix V = e(V)
matrix b[1,1] = -2
matrix b[1,2] = 5
matrix b[1,3] = 2
runmlwin Qfunc43 cons, level2(SAMS81: cons, mmids(SAMS81 SAMS86 SAMS95 SAMS07) mmweights(weight1-weight4)) level1(id:cons) mcmc(burnin(0) chain(500)) initsb(b) initsv(V)
If I click in Resume Macro still comes: error while obeying batch file C:\XXX at line number 90: MCMC 0 500 1 5.8 50 10 1 1 1 1 1 1"
If I click in Abort Macro then Start then comes: "MCMC Error 0142: The 2th MM unit for obs 2 is a duplicate of the 1th MM unit(MCMC)"
This is how it looks the first four records:
id SAMS81 SAMS86 SAMS95 SAMS07 weight1 weight2 weight3 weight4
1 258000.63 148003.84 0 0 .25 .75 0 0
2 258000.09 0 0 0 1 0 0 0
3 258000.59 258000.14 0 0 .25 .75 0 0
4 258000.63 0 18000.439 0 .5 0 .5 0
If you think it is more practical to send you the database I can do it (it is not big).
Regards,
Miguel
my population has been living in four neighborhoods during their live so for some cases (rows) the same code could apply for the neighborhood for instance at time 1 and 3 because the person lived first in neighborhood X1, moved to X2 and then to X1 again. Could it be this the source of error?
When I run:
sort SAMS81 id
quietly runmlwin Qfunc43 cons, level2(SAMS81: cons) level1(id: cons) nopause
matrix b = e(b)
matrix V = e(V)
matrix b[1,1] = -2
matrix b[1,2] = 5
matrix b[1,3] = 2
runmlwin Qfunc43 cons, level2(SAMS81: cons, mmids(SAMS81 SAMS86 SAMS95 SAMS07) mmweights(weight1-weight4)) level1(id:cons) mcmc(burnin(0) chain(500)) initsb(b) initsv(V)
If I click in Resume Macro still comes: error while obeying batch file C:\XXX at line number 90: MCMC 0 500 1 5.8 50 10 1 1 1 1 1 1"
If I click in Abort Macro then Start then comes: "MCMC Error 0142: The 2th MM unit for obs 2 is a duplicate of the 1th MM unit(MCMC)"
This is how it looks the first four records:
id SAMS81 SAMS86 SAMS95 SAMS07 weight1 weight2 weight3 weight4
1 258000.63 148003.84 0 0 .25 .75 0 0
2 258000.09 0 0 0 1 0 0 0
3 258000.59 258000.14 0 0 .25 .75 0 0
4 258000.63 0 18000.439 0 .5 0 .5 0
If you think it is more practical to send you the database I can do it (it is not big).
Regards,
Miguel
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Multiple membership model error 2
Yes, this is most likely the cause of the problem. MLwiN doesn't do anything with the ordering of the IDs within a row and only needs to know the total relative time for each ID. In your example you could add the weight for time 3 onto time 1 and remove the second instance.
I would also suggest that you recode the IDs to use integer values, as otherwise you might encounter rounding issues.
I would also suggest that you recode the IDs to use integer values, as otherwise you might encounter rounding issues.