Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: question on graphing |
Date | Tue, 5 Apr 2011 08:08:17 +0100 |
Susan's wording was not really ambiguous. Her reference to separate lines shows that she wants a plot of predictions as they vary with age for the possible values of indicator (dummy) variables. Nick On Mon, Apr 4, 2011 at 7:39 PM, Duha Altindag <daltin2@tigers.lsu.edu> wrote: > I'm curious: > Isn't "the relationship between predicted logearnings and age holding > the other variables constant" same thing as the partial derivative of > log earnings with respect to age? > And so this is just a line with slope _b[age]? > > On Mon, Apr 4, 2011 at 12:23 PM, Nick Cox <njcoxstata@gmail.com> wrote: >> No add-ons needed. >> >> sysuse auto >> gen hiprice = price > 6000 >> reg mpg weight hiprice foreign >> predict mypredict >> egen group = group(hiprice foreign), label >> separate mypredict, by(group) veryshortlabel >> scatter mpg weight || line mypredict? weight, sort c(L ..) >> >> Nick >> >> On Mon, Apr 4, 2011 at 6:10 PM, Dimitriy V. Masterov <dvmaster@gmail.com> wrote: >>> Susan, >>> >>> I think you can accomplish this with: >>> >>> (1) -margins- to get the profiles. Use the at option for the age variable. >>> (2) -parmest- or -stastby- to save the profiles as a dataset >>> (3) Plot the results using -eclplot- >>> >>> DVM >>> >>> >>> On Mon, Apr 4, 2011 at 12:54 PM, Averett, Susan L >>> <averetts@lafayette.edu> wrote: >>>> Hi, I am running a regression with logearnings as the dependent variable and age in years, a female dummy variable and a dummy equal to 1 if the individual has a college degree. I would like to graph my age/earnings profile in Stata...i.e. I'd like to graph the relationship between predicted logearnings and age holding the other variables constant but I cannot figure out how to do this. I'd also then like to plot the lines separately for men and women on the same graph. >>>> Any suggestions? >>>> >>>> Here is my regression: >>>> >>>> regress lahe age female bachelor * * 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/