Does anyone know how I can plot a graph using mean+- SEM using STATA? The data I have has been analysed using the mixed-effects model. I'm trying to look for treatment, time and treatment by time interaction.
First off, please note that it is spelled "Stata" not "STATA" (it is not an acronym).
Have you looked at the post-estimation margins, folllowed by marginsplot? This is as good as it gets for plotting results from any regression-type model in Stata.
First off, please note that it is spelled "Stata" not "STATA" (it is not an acronym).
Have you looked at the post-estimation margins, folllowed by marginsplot? This is as good as it gets for plotting results from any regression-type model in Stata.
If you need a nice, high fidelity plot, you may be better off using Excel or LibreOffice Calc -- there are great templates that can be populated with raw numbers for mean and SEM, the rest is automatic... It takes a bit longer, but these traditional spreadsheet applications are truly powerful in graphing results!
Excel certainly doesn't produce high-fidelity plots! And there is no need to export your results to some spreadsheet when Stata has very powerful graphics capabilities. I notice that users of SPSS almost always do their graphs in Excel, but this says more about the poor quality of SPSS than it does about the excellence of Excel.
The question is why you want to graph means and standard errors. This practice has been condemned repeatedly as valueless, but it continues under the inertia of tradition. Means and confidence intervals tell us seething but standard errors tell us nothing of any value (they represent 67% confidence intervals, which are surely the answer to no sensible question).
I would repeat the recommendation that you look at margins and marginsplot. Also, have a look at Roger Newson's command eclplot, which comes complete with its own dialogue (just click the link in the help file). It's a very powerful tool for plotting estimates and, well, confidence intervals.
Dynamite plots (means and SE) are critiqued here: http://biostat.mc.vanderbilt.edu/wiki/Main/DynamitePlots
More interesting discussion here: http://www.statsblogs.com/2012/05/27/the-aesthetics-of-error-bars/
and here: http://emdbolker.wikidot.com/blog:dynamite
And here's a person putting forward the thesis that the main reason for the popularity of dynamite plots is the very poor graphics capabilities of spreadsheets: http://sharpstatistics.co.uk/stats/wily-data-analysis/