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: Twoway quadratic prediction plots with CIs in a multivariate regression setting


From   Scott Merryman <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Twoway quadratic prediction plots with CIs in a multivariate regression setting
Date   Wed, 25 Jul 2012 08:49:05 -0500

Something like this:

webuse nhanes2.dta
reg iron c.age##c.age i.race zinc
margins , at(age = (10(10)80) (base) race (zero) zinc) vsquish
marginsplot


Scott

On Wed, Jul 25, 2012 at 8:30 AM, Michael Ingenhaag
<Michael.Ingenhaag@unil.ch> wrote:
> Hi,
>
> I'd like to construct quadratic prediction plots with Cis based on a
> multivariate regression, i.e. include additional regressors to the one on
> which the quadratic fit is based on.
> Essentially, I want to run the following regression:
>
> /reg y c.age c.age#c.age i.male i.country_ind/ /num_hh_children income/
>
> I'd like to have the prediction of the age polynomial based on the above
> regression setting all other variables, respectively, to their base level
> (factor variables) or zero if continuous.
> Based on this prediction I need a plot similar to the one produced by
> /qfitci/.
>
> The Stata command /qfitci/ does only allow for one regressor that is used to
> compute the quadratic prediction.
>
> Does anyone have any suggestions?
>
> --
> Michael Ingenhaag
*
*   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