query on calculation of probability predictions
Posted: Tue Aug 02, 2016 11:52 am
Hi,
We are running a three-level multiple-membership (logit) model, calling MLwiN 2.32 from within Stata 14 using runmlwin.
In our panel dataset (the HILDA Survey from Australia), the hierarchy is given by person-year observations, nested within individuals, nested within interviewers.
The multiple membership applies because survey respondents can be interviewed by different interviewers over time.
In Stata syntax, the model looks something like this:
runmlwin Y cons Xs, level3(interviewer_ID: cons) level2(xwaveid: cons) level1(obs_id: ) nopause or discrete(distribution(binomial) link(logit) denom(cons))
runmlwin does a good job in estimating this, but we are having issues retrieving predicted probabilities at different values of the X variables –which journal reviewers have requested.
This is because Stata’s predict and margins routines do not seem to work (or work well) for models estimated using runmlwin, unless we are missing something?
The questions we have are:
1. Is there a way to get Stata (or MLwiN from within Stata) to come up with predicted probabilities for the above model without having to calculate these ‘manually’?
2. When we try to estimate the predicted probabilities manually, can you advice on how to best deal with the random effects at the different levels?
3. Are we correct to assume that using only the estimates in the fixed part of the model would be equivalent to setting the random effects at the individual and interviewer level at zero? Is that a good solution?
4. Importantly, when we try to estimate the predicted probabilities manually based on the fixed part of the model the resulting probabilities are very small -about 10-20 times smaller than the unconditional means. Do you have a hunch about why this may occur?
Thanks for your help!
We are running a three-level multiple-membership (logit) model, calling MLwiN 2.32 from within Stata 14 using runmlwin.
In our panel dataset (the HILDA Survey from Australia), the hierarchy is given by person-year observations, nested within individuals, nested within interviewers.
The multiple membership applies because survey respondents can be interviewed by different interviewers over time.
In Stata syntax, the model looks something like this:
runmlwin Y cons Xs, level3(interviewer_ID: cons) level2(xwaveid: cons) level1(obs_id: ) nopause or discrete(distribution(binomial) link(logit) denom(cons))
runmlwin does a good job in estimating this, but we are having issues retrieving predicted probabilities at different values of the X variables –which journal reviewers have requested.
This is because Stata’s predict and margins routines do not seem to work (or work well) for models estimated using runmlwin, unless we are missing something?
The questions we have are:
1. Is there a way to get Stata (or MLwiN from within Stata) to come up with predicted probabilities for the above model without having to calculate these ‘manually’?
2. When we try to estimate the predicted probabilities manually, can you advice on how to best deal with the random effects at the different levels?
3. Are we correct to assume that using only the estimates in the fixed part of the model would be equivalent to setting the random effects at the individual and interviewer level at zero? Is that a good solution?
4. Importantly, when we try to estimate the predicted probabilities manually based on the fixed part of the model the resulting probabilities are very small -about 10-20 times smaller than the unconditional means. Do you have a hunch about why this may occur?
Thanks for your help!