I am using runmlwin to run a three-level model (family-> child-> repeated observation per child) with a binary outcome. I am able to run a two-level model (without accounting for the clustering by family), but when I run the three-level model I am getting the following error "Only MQL1 can be specified if there are empty higher levels". It won't let me specify PQL2 and I cannot seem to figure out the reason for this error. I know I don't have any missing values for FamilyID. I would really appreciate it if you can give me some advice.
Thanks in advance
Empty higher levels
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Empty higher levels
Hi Anna,
Please will you post your runmlwin syntax and output so that we can better see what the problem may be
Many thanks
George
Please will you post your runmlwin syntax and output so that we can better see what the problem may be
Many thanks
George
Re: Empty higher levels
Hi,
This is the syntax I am using...
2-level:
runmlwin asthma cons, level2(personid) level1(time) discrete (distribution(binomial) link(logit) denominator(cons) pql2)
3-level :
runmlwin asthma cons, level3(familyid) level2(personid) level1(time) discrete (distribution(binomial) link(logit) denominator(cons) pql2)
Both of give the same error "Only MQL1 can be specified if there are empty higher levels". They run fine when I use MQL.
This is the syntax I am using...
2-level:
runmlwin asthma cons, level2(personid) level1(time) discrete (distribution(binomial) link(logit) denominator(cons) pql2)
3-level :
runmlwin asthma cons, level3(familyid) level2(personid) level1(time) discrete (distribution(binomial) link(logit) denominator(cons) pql2)
Both of give the same error "Only MQL1 can be specified if there are empty higher levels". They run fine when I use MQL.
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Empty higher levels
Hi Anna,
You need to explicitly declare which variables enter the random part of the model at level-2 and level-3
You want a three-level random intercept model and so you want to only enter the intercept variable (cons) as random at each level.
So you should write
Note that you do not make any variables random at level-1 because there is no level-1 residual error in logistic regression
Bets wishes
George
You need to explicitly declare which variables enter the random part of the model at level-2 and level-3
You want a three-level random intercept model and so you want to only enter the intercept variable (cons) as random at each level.
So you should write
Code: Select all
* 2-level:
. runmlwin asthma cons, level2(personid: cons) level1(time) discrete (distribution(binomial) link(logit) denominator(cons) pql2)
* 3-level :
. runmlwin asthma cons, level3(familyid: cons) level2(personid: cons) level1(time) discrete (distribution(binomial) link(logit) denominator(cons) pql2)
Bets wishes
George
Re: Empty higher levels
Hi George,
Thanks you very much for your reply. I hope you don't mind, but I have two more questions.
1. I tried your syntax for the 3-level model (see below), but I am getting an error ("Work Matrix is too small (v_b_1.build())" ) in a popup window in MLwiN. Do you know why this might be happening?
runmlwin asthma cons, level3(familyid: cons) level2(personid: cons) level1(time) discrete (distribution(binomial) link(logit) denominator(cons) pql2)
2. Since I am only using these parameter estimates to refit the model by MCMC, could I just use the parameter estimates from PQL1?
Thank you,
Anne
Thanks you very much for your reply. I hope you don't mind, but I have two more questions.
1. I tried your syntax for the 3-level model (see below), but I am getting an error ("Work Matrix is too small (v_b_1.build())" ) in a popup window in MLwiN. Do you know why this might be happening?
runmlwin asthma cons, level3(familyid: cons) level2(personid: cons) level1(time) discrete (distribution(binomial) link(logit) denominator(cons) pql2)
2. Since I am only using these parameter estimates to refit the model by MCMC, could I just use the parameter estimates from PQL1?
Thank you,
Anne
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Empty higher levels
Hi Anne,
In terms of your second question, yes you can just use the PQL1 estimates as suitable starting values for fitting the model using MCMC.
Actually, I tend to simply use the MQL1 estimates.
Best wishes
George
In terms of your second question, yes you can just use the PQL1 estimates as suitable starting values for fitting the model using MCMC.
Actually, I tend to simply use the MQL1 estimates.
Best wishes
George
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Empty higher levels
Hi Anne,
In terms of your first question. The cause of that error message is not obvious.
Please will you email me the shortest do-file and data set which replicates this error message
Best wishes
George
In terms of your first question. The cause of that error message is not obvious.
Please will you email me the shortest do-file and data set which replicates this error message
Best wishes
George