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: Post-regression graph
From
Jorge Eduardo Pérez Pérez <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Post-regression graph
Date
Wed, 20 Nov 2013 21:51:38 -0500
I think you want to use e(sample)
For example, if you run a quadratic mode on a subsamplel:
sysuse auto, clear
gen mpg2=mpg*mpg
reg price mpg mpg2 if foreign
Then the graph of this model would be:
twoway qfit price mpg if e(sample)
You may restrict your graph to a smaller subsample with another
condition, for example:
twoway qfit price mpg if e(sample)&turn>5
But this graph does not correspond to the model you estimated on the
first place.
--------------------------------------------
Jorge Eduardo Pérez Pérez
Graduate Student
Department of Economics
Brown University
On Wed, Nov 20, 2013 at 9:22 PM, David Torres <[email protected]> wrote:
> I'm trying to get a nonlinear regression line after estimating a model. The following is the command I'm using (and the error returned).
>
> . graph twoway qfit srsc year if `e(model)'&white==1
> g2sls not found
> r(111);
>
>
> What specifically am I doing wrong here? If I drop the `e(model)' I can get a line, but I'm afraid it's not taking into account the actual model I want to graph.
>
> Thanks in advance,
> Diego
> *
> * 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/