Hi ,
I am trying to run two level random intercept and and random slope model using runmlwin program.Random intercept model for the problem easily converged to the solution. While I am having some problem with running random slope model.
Syntax for random slope model is given below.
runmlwin contra_use cons urban boy i. moth_edu, level2(psu_idm: cons urban,residual(u6)) level1(indi_idm:) discrete(distribution(binomial) link(logit)denominator(cons) pql2)maxiterations(500)
Error in random slope model
Error in random slope model
- Attachments
-
- Errors while running the random slope model when iurban made random at level 2
- error 2.jpg (176.95 KiB) Viewed 6173 times
-
- Errors while running the random slope model when iurban made random at level 2
- error1.jpg (193.93 KiB) Viewed 6173 times
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Error in random slope model
Hi Mario,
Currently you are trying to estimate your final model directly...
... but you run into convergence problems. I would therefore try to build up to the final model gradually using the parameter estimates from simpler models as starting values for more complex models...
MODEL 1
Fit random-intercept version of the model by MQL1
MODEL 2
Fit the random-slope version of the model by MQL1 using the random-intercept model estimates (i.e., MODEL 1) as starting values
MODEL 3
Fit random-slope model by PQL2 using the random-slope MQL1 model estimates (i.e., MODEL 2) as starting values
Best wishes
George
Currently you are trying to estimate your final model directly...
Code: Select all
. runmlwin contra_use cons urban boy i. moth_edu, ///
level2(psu_idm: cons urban, residual(u6)) ///
level1(indi_idm:) ///
discrete(distribution(binomial) link(logit)denominator(cons) pql2) ///
maxiterations(500)
MODEL 1
Fit random-intercept version of the model by MQL1
Code: Select all
. runmlwin contra_use cons urban boy i. moth_edu, ///
level2(psu_idm: cons) ///
level1(indi_idm:) ///
discrete(distribution(binomial) link(logit) denominator(cons) mql1)
. estimates store m1
Fit the random-slope version of the model by MQL1 using the random-intercept model estimates (i.e., MODEL 1) as starting values
Code: Select all
. runmlwin contra_use cons urban boy i. moth_edu, ///
level2(psu_idm: cons) ///
level1(indi_idm:) ///
discrete(distribution(binomial) link(logit) denominator(cons) mql1) ///
initsmodel(m1)
. estimates store m2
Fit random-slope model by PQL2 using the random-slope MQL1 model estimates (i.e., MODEL 2) as starting values
Code: Select all
. runmlwin contra_use cons urban boy i. moth_edu, ///
level2(psu_idm: cons) ///
level1(indi_idm:) ///
discrete(distribution(binomial) link(logit) denominator(cons) pql2) ///
initsmodel(m2)
. estimates store m3
George
Re: Error in random slope model
hello George,
Thanks for the response. I would like to know what should be the maximum number of variable is acceptable for converging the model in both MCMC and IGLS .In my case my runmlwin command hangs when i am using (i.variable e.g i. caste) or the number of variable is large(Specially in MCMC).Should i avoid (i.variable) and enter the dummy of the categories of the variable.I hope i am making sense.
Thanks for the response. I would like to know what should be the maximum number of variable is acceptable for converging the model in both MCMC and IGLS .In my case my runmlwin command hangs when i am using (i.variable e.g i. caste) or the number of variable is large(Specially in MCMC).Should i avoid (i.variable) and enter the dummy of the categories of the variable.I hope i am making sense.
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Error in random slope model
Hi,
In terms of fixed-part of the model, you should be able to make this as simple or complex as you would a linear regression model
In terms of random-part of the model at level-2, most authors tend to limit the number of random slopes to a maximum of, say, two or three
Above comments apply to both IGLS and MCMC
Best wishes
George
In terms of fixed-part of the model, you should be able to make this as simple or complex as you would a linear regression model
In terms of random-part of the model at level-2, most authors tend to limit the number of random slopes to a maximum of, say, two or three
Above comments apply to both IGLS and MCMC
Best wishes
George