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]

From |
Eduardo Nunez <enunezb@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: base category in margins output |

Date |
Wed, 19 Oct 2011 10:30:16 -0400 |

Richard, Excelent presentation! I couldn't, however, get a clue to my question. The main difference I have with the examples you showed in your presentation under adjusted predictions is that the default prediction from a logistic regression is pr; after Cox, is hazard ratio. Thus, there must be a base group from which the estimate refers to. Running the univariate Cox, I got the base categories in the results of the margins as 1 1....1 (as shown below) Meaning category 1 for urea_2_ca35 & value "0" for LED_sqrt stcox i.urea_2_ca35##c.LED_sqrt, efron margins, at(LED_sqrt=(0(3)21) (asobserved) _all) over(urea_2_ca35) post --------------------------------------------------------------------------------- | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- _at#urea_2_ca35 | 1 1 | 1 . . . . . 1 2 | .8365883 .4008474 2.09 0.037 .0509418 1.622235 1 3 | .3564519 .1606048 2.22 0.026 .0416723 .6712315 more output not shown............ When I run the adjusted Cox model, the prior base categories 1 1 now reports 1.44 (see below) stcox Iedad__1 sexo dm_i obesidad_i primer_ingreso_i portador_de_dai pad iam demencia nyha3_4 efLT50##c.sbp_i acxfa##c.fc_i br_i edemas_tm_i derrame_pleural_i /// Ina_i__1 Ina_i__2 Iac_u__1 Ibnp___1 Ipcr___1 Icole__1 bbloq_previo_i bbloq estatina nitratos ieca i.urea_2_ca35##c.LED_sqrt, efron margins, at(LED_sqrt=(0(3)21) (asobserved) _all) over(urea_2_ca35) post --------------------------------------------------------------------------------- | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- _at#urea_2_ca35 | 1 1 | 1.446149 .555207 2.60 0.009 .3579634 2.534335 1 2 | 1.133821 .6742893 1.68 0.093 -.1877618 2.455403 more output not shown............ So, my question is why I am getting in the adjusted model a hazard ratio of 1.4 instead of 1 for 1 1? I appreciate your comments on this aparent contradiction. Best wishes, Eduardo On Tue, Oct 18, 2011 at 4:11 PM, Richard Williams <richardwilliams.ndu@gmail.com> wrote: > At 11:53 AM 10/18/2011, Eduardo Nunez wrote: >> >> I appreciate any help in understanding this wonderful addition >> (margins & marginsplot) to Stata 11 & 12. > > I don't know if it is a wonderful explanation, but here are the slides for a > talk I recently gave, which in turn is an expanded version of a talk I gave > at the Stata Conference this summer. > > http://www.nd.edu/~rwilliam/xsoc73994/Margins01.pdf > > > ------------------------------------------- > Richard Williams, Notre Dame Dept of Sociology > OFFICE: (574)631-6668, (574)631-6463 > HOME: (574)289-5227 > EMAIL: Richard.A.Williams.5@ND.Edu > WWW: http://www.nd.edu/~rwilliam > > * > * 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/ > * * 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/

**References**:**Re: st: base category in margins output***From:*Richard Williams <richardwilliams.ndu@gmail.com>

- Prev by Date:
**st: Programming error.** - Next by Date:
**st: Testing whether two estimated survey means are statistically different** - Previous by thread:
**Re: st: base category in margins output** - Next by thread:
**st: Breslow-Day homogeneity test for mhodds** - Index(es):