Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: st: How to get rid of "asobserved" on -marginsplot-?


From   Philip Jones <pjones8@uwo.ca>
To   statalist@hsphsun2.harvard.edu
Subject   re: st: How to get rid of "asobserved" on -marginsplot-?
Date   Thu, 20 Oct 2011 09:26:55 -0400

I had previously asked on Statalist:

> Hello,
> 
> I am performing mixed effects regression. After fitting the model, I am
> attempting to use the -marginsplot- command to show the predicted
> values over time in two separate groups.
> 
> This is working nicely, but unfortunately, in addition to the two plots
> I want, Stata insists on plotting a third (intermediate) as "asobserved".
> 
> Does anyone know if this can be suppressed? I looked at the
> documentation for -marginsplot-, but it wasn't apparent to me how
> to get rid of it.
> 
> Many thanks for any assistance,
> 
> Phil

To which I had not received a reply.


Philipp Rehm then contacted me personally to find out if I had resolved this issue,
which I had, so I am now posting the resolution.

After fitting the model with -xtmixed- using the syntax
-xtmixed score i.group##i.time || id:, mle-, I had run the -margins- command like so:

-margins i.group##i.time-, followed by -marginsplot, xdim(time)-, which had given
me the unwanted "asobserved" line.

The solution was to re-run -margins- specifying the 'over' option, as so:
-margins, over(group time)- which gave me equivalent results, but when the subsequent
call to -marginsplot, xdim(time)- was made, the 'asobserved' line was not plotted.

I hope this helps,

Phil
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index