Page 1 of 1

Error in random slope model

Posted: Wed Jul 23, 2014 10:22 am
by mario123
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)

Re: Error in random slope model

Posted: Wed Jul 23, 2014 4:13 pm
by GeorgeLeckie
Hi Mario,

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)
... 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

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
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

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
MODEL 3
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
Best wishes

George

Re: Error in random slope model

Posted: Fri Jul 25, 2014 9:36 am
by mario123
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.

Re: Error in random slope model

Posted: Fri Jul 25, 2014 9:47 am
by GeorgeLeckie
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