[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Daniel Waxman" <dan@amplecat.com> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: RE: RE: CIs for the ratio of two adjusted predictions after logistic? |

Date |
Wed, 1 Aug 2007 12:42:48 -0400 |

Works like a charm! (Maarten's original formulation) I can't tell you how much I couldn't come up with that one on my own. Thank you both. Daniel Waxman -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox Sent: Wednesday, August 01, 2007 12:35 PM To: statalist@hsphsun2.harvard.edu Subject: RE: st: RE: RE: CIs for the ratio of two adjusted predictions after logistic? Got it. Nick n.j.cox@durham.ac.uk Maarten buis > --- Nick Cox <n.j.cox@durham.ac.uk> wrote: > > I think in this the term > > > > _b[foreign] > > > > should be > > > > _b[foreign] * foreign > > > > and that > > > > _b[foreignXmpg] * mpg > > > > should be > > > > _b[foreignXmpg] * foreignXmpg > > No, I am comparing for each value of mpg the predicted probability of > foreign cars with the predicted probabilities of domestic cars. To do > so I create a local `xb_for' which contains the linear predictor > assuming the car is foreign and a local `xb_dom' which contains the > linear predictor assuming that the car is domestic. (actually the > locals contain the commands that will create the linear > predictors, but > that is a detail) Consider the code for the linear predictor assuming > that the cars are foreign. > > #delim ; > local xb_for "_b[_cons] + _b[foreign] + > _b[mpg]*mpg + _b[foreignXmpg]*mpg" ; > #delim cr > In that case we know that the the variable foreign has value 1, so > > _b[foreign]*foreign = > _b[foreign]*1 = > _b[foreign] > > similarly: > > _b[foreignXmpg]*foreign*mpg = > _b[foreignXmpg]*1*mpg = > _b[foreignXmpg]*mpg > * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**Re: st: RE: RE: CIs for the ratio of two adjusted predictions after logistic?***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**RE: st: RE: RE: CIs for the ratio of two adjusted predictions after logistic?***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: -outreg2- in Stata 10** - Next by Date:
**st: DHS survey data and Logistic regression - Response from Measure DHS** - Previous by thread:
**RE: st: RE: RE: CIs for the ratio of two adjusted predictions after logistic?** - Next by thread:
**st: -outreg2- in Stata 10** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |