Is there anyone could give some suggestions?
Thanks.
Diva
Error when running 2level ordinal model in R2wiN

 Posts: 1069
 Joined: Mon Oct 19, 2009 10:34 am
Re: Error when running 2level ordinal model in R2wiN
I asked Kelvyn Jones about this and he said the following:
The key is that not that the outcome specific slopes are significantly different from zero but significantly different from each other; you can set this up in the Intervals and test window by putting a 1 for one of the slopes and a 1 for the one to be compared with so you are testing a difference.
Here is an example using Beck’s Schizophrenia example (available from http://hedeker.people.uic.edu/SCHIZX1.DAT.txt, https://rdrr.io/github/lme4/lme4/src/mi ... s/schizo.R):
Model: Wald Test: (No significant difference)
He also suggested reading the at materials at http://www.bristol.ac.uk/medialibrary/ ... models.pdf, noting that beta3 on slide 14 should have the value 0.481 instead of 0.481.
Another possibility is using the MLwiN customised predictions on the logit link scale (effectively the left hand side of slide 18). The proportional odds assumption would be parallel lines on the logit scale.
The key is that not that the outcome specific slopes are significantly different from zero but significantly different from each other; you can set this up in the Intervals and test window by putting a 1 for one of the slopes and a 1 for the one to be compared with so you are testing a difference.
Here is an example using Beck’s Schizophrenia example (available from http://hedeker.people.uic.edu/SCHIZX1.DAT.txt, https://rdrr.io/github/lme4/lme4/src/mi ... s/schizo.R):
Model: Wald Test: (No significant difference)
He also suggested reading the at materials at http://www.bristol.ac.uk/medialibrary/ ... models.pdf, noting that beta3 on slide 14 should have the value 0.481 instead of 0.481.
Another possibility is using the MLwiN customised predictions on the logit link scale (effectively the left hand side of slide 18). The proportional odds assumption would be parallel lines on the logit scale.
Re: Error when running 2level ordinal model in R2wiN
Hi Chris,
Many thanks for your help. And I will read the documents you suggested carefully.
I have another problem when fitting a model using R2MLwiN when I explored a random effect of one individual variable (random slope random intercept model). And the error is shown in the bottom. I have read several related topic in the forum, and tried to solve it. However, it didn't work to my problem. There is no missing data in my dataset; I have reordered my data; the cons is numeric; I have assign initial values from the basic random intercept model. So could you please give me some suggestions? I have sent my sample data and code to your email box (c.charlton@bristol.ac.uk). Hope you could help me solve this problem. Many thanks.
Regards.
Diva
/nogui option ignored
ECHO 0
Echoing is ON
BATC 1
Batch mode is ON
MAXI 2
STAR
iteration 0
iteration 1
Convergence not achieved
JOIN 1.42275739304974 0.308439026824743 1.25395389725885 2.84483612421086 0.251278520475903 '_FP_b'
JOIN 0.039749333555033 0.0346204857887299 0.0383359924738334 0.0332605244565208 0.0364639882753521 0.040004125270958 0.0318606652111456 0.0348067623359593 0.0377525848112598 0.0484698156008947 0.0114819365563485 0.0118878355577854 0.0121166989349699 0.0125251094721577 0.0181430152561681 '_FP_v'
JOIN 0 0 2.75701906789359 1 '_RP_b'
JOIN 0 0 0 0 0 0.181569740306571 0 0 0 0 '_RP_v'
TOLE 2
MAXI 20
NEXT
error while obeying batch file C:/Users/Diva/AppData/Local/Temp/RtmporJ1lh/macrofile_1ca015fe7001.txt at line number 88:
NEXT
design vector at level 2 is the wrong length
WARNING: macro file has aborted, your data may be in a transformed state
WARNING: macro file has aborted, your data may be in a transformed state
error while obeying batch file C:/Users/Diva/AppData/Local/Temp/RtmporJ1lh/macrofile_1ca015fe7001.txt at line number 88:
NEXT
design vector at level 2 is the wrong length
.
Execution completed
Error in read.dta(IGLSfile) :
unable to open file: 'No such file or directory'
Many thanks for your help. And I will read the documents you suggested carefully.
I have another problem when fitting a model using R2MLwiN when I explored a random effect of one individual variable (random slope random intercept model). And the error is shown in the bottom. I have read several related topic in the forum, and tried to solve it. However, it didn't work to my problem. There is no missing data in my dataset; I have reordered my data; the cons is numeric; I have assign initial values from the basic random intercept model. So could you please give me some suggestions? I have sent my sample data and code to your email box (c.charlton@bristol.ac.uk). Hope you could help me solve this problem. Many thanks.
Regards.
Diva
/nogui option ignored
ECHO 0
Echoing is ON
BATC 1
Batch mode is ON
MAXI 2
STAR
iteration 0
iteration 1
Convergence not achieved
JOIN 1.42275739304974 0.308439026824743 1.25395389725885 2.84483612421086 0.251278520475903 '_FP_b'
JOIN 0.039749333555033 0.0346204857887299 0.0383359924738334 0.0332605244565208 0.0364639882753521 0.040004125270958 0.0318606652111456 0.0348067623359593 0.0377525848112598 0.0484698156008947 0.0114819365563485 0.0118878355577854 0.0121166989349699 0.0125251094721577 0.0181430152561681 '_FP_v'
JOIN 0 0 2.75701906789359 1 '_RP_b'
JOIN 0 0 0 0 0 0.181569740306571 0 0 0 0 '_RP_v'
TOLE 2
MAXI 20
NEXT
error while obeying batch file C:/Users/Diva/AppData/Local/Temp/RtmporJ1lh/macrofile_1ca015fe7001.txt at line number 88:
NEXT
design vector at level 2 is the wrong length
WARNING: macro file has aborted, your data may be in a transformed state
WARNING: macro file has aborted, your data may be in a transformed state
error while obeying batch file C:/Users/Diva/AppData/Local/Temp/RtmporJ1lh/macrofile_1ca015fe7001.txt at line number 88:
NEXT
design vector at level 2 is the wrong length
.
Execution completed
Error in read.dta(IGLSfile) :
unable to open file: 'No such file or directory'

 Posts: 1069
 Joined: Mon Oct 19, 2009 10:34 am
Re: Error when running 2level ordinal model in R2wiN
Although the default for the MISR command (replace small numbers with missing values in residuals) while running discrete response models was changed in MLwiN 3.01 it appears not to have been applied to multinomial models. The attached test version of R2MLwiN changes this option globally so it will be applied in this case, and this prevents the error from occurring in your example.
In general we recommend fitting discrete response models with MCMC as the IGLS estimation uses quarsilikelihood and can therefore have biases.
In general we recommend fitting discrete response models with MCMC as the IGLS estimation uses quarsilikelihood and can therefore have biases.
 Attachments

 R2MLwiN_0.86.tar.gz
 (339.81 KiB) Downloaded 33 times
Re: Error when running 2level ordinal model in R2wiN
Hi Paul,
It works for me now. Thanks a lot! And when I install this new version of R2MLwiN in R3.4.0, it doesn't work. However, after updating R version into R3.4.2, it works now. Just want to mention this problem here for others' reference. Again many thanks for your help.
Regards.
Diva
It works for me now. Thanks a lot! And when I install this new version of R2MLwiN in R3.4.0, it doesn't work. However, after updating R version into R3.4.2, it works now. Just want to mention this problem here for others' reference. Again many thanks for your help.
Regards.
Diva