Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: RE: plotting estimates and confidence intervals from a regression
From
"Cohen, Elan" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: RE: plotting estimates and confidence intervals from a regression
Date
Thu, 21 Nov 2013 15:02:29 +0000
g id = _n
reshape long X, i(id) j(grp)
reg Y X##grp
margins X#grp
marginsplot
- Elan
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of jean-luc morin-chesnel
Sent: Wednesday, November 20, 2013 15:42
To: [email protected]
Subject: Re: st: RE: plotting estimates and confidence intervals from a regression
Great! thank you!
Do you know whether it is possible to show multiple "marginsplot"
graphs on the same graph (id to overlay them?)
for instance
reg Y X1
margins X1
reg Y X2
margins X2
and I would like to show on the same graph the results from a
marginsplot command for each regression
Thank you again!
On 20 November 2013 21:21, Cohen, Elan <[email protected]> wrote:
> margins X
> marginsplot
>
> If you don't want the connecting line:
>
> marginsplot, plotopt(c(i))
>
>
> - Elan
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of jean-luc morin-chesnel
> Sent: Wednesday, November 20, 2013 14:38
> To: [email protected]
> Subject: st: plotting estimates and confidence intervals from a regression
>
> Dear all,
>
> I regress Y on a categorical variable X (having n different values)
> that is -reg Y i.X, noconstant
>
> I would simply like to plot on the x axis the n different values of X,
> and on the Y axis the corresponding estimates (and the confidence
> interval) from the regression.
>
> Do you know how to proceed?
> Many, many thanks in advance
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/