Hello,
I have been attempting to obtain predictions in Stata following the fitting of my model (2 level cross-classified model using mcmc)
I found this post particularly useful in obtaining my yhat and associated standard errors:
https://www.cmm.bristol.ac.uk/forum/vie ... a2112#p452
I was hoping to calculate margins and plot the results via marginsplot as this has produced some very nice graphs for me in the past using simple linear regression. However, I get the following error after running my syntax:
predict yhatCC5
predict yhatCC5_se, stdp
gen yhatCC5_lb = yhatCC5 - 1.96 * yhatCC5_se
gen yhatCC5_ub = yhatCC5 + 1.96 * yhatCC5_se
margins, dydx(*)
Warning: cannot perform check for estimable functions.
variable var not found
r(111);
I wondered if anyone had success in using margins post estimation and might be able to advise?
Thanks in advance for your help.
Best wishes,
Marie
Use of predict and margins post-estimation
-
- Posts: 6
- Joined: Sat Jan 07, 2017 7:23 pm
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Use of predict and margins post-estimation
Hi Marie,
I'm afraid you will have to make your graphs from first principles. We have not done anything in runmlwin to allow margins to work with it; it is a non-trivial task.
Best wishes
George
I'm afraid you will have to make your graphs from first principles. We have not done anything in runmlwin to allow margins to work with it; it is a non-trivial task.
Best wishes
George