Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
John Antonakis <John.Antonakis@unil.ch> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Testing difference between margins |

Date |
Thu, 19 May 2011 20:43:36 +0200 |

Hi:

Recall, suppose I estimate: xi: reg y x z x2 xz z2 I then predict y at certain levels of the covariates using "margins", e.g., margins, at (x=-2.5 z = -2.5 x2=6.25 x = 6.25 z2=6.25) margins, at (x=2.5 z = -2.5 x2=6.25 xz = -6.25 z2=6.25) I can test the differences in margins by combined the command as follows margins, at(x=-2.5 z = -2.5 x2=6.25 x = 6.25 z2=6.25) /// at(x=2.5 z = -2.5 x2=6.25 xz = -6.25 z2=6.25) post Then to perform a test for the difference, one types: test _b[1._at] = _b[2._at] Simple as that! Best, J. __________________________________________ Prof. John Antonakis Faculty of Business and Economics Department of Organizational Behavior University of Lausanne Internef #618 CH-1015 Lausanne-Dorigny Switzerland Tel ++41 (0)21 692-3438 Fax ++41 (0)21 692-3305 http://www.hec.unil.ch/people/jantonakis Associate Editor The Leadership Quarterly __________________________________________ On 19.05.2011 12:09, John.Antonakis@unil.ch wrote: > Suppose I estimate: > > xi: reg y x z x2 xz z2 > > I then predict y at certain levels of the covariates using > "margins", e.g., > > margins, at (x=-2.5 z = -2.5 x2=6.25 x = 6.25 z2=6.25) > margins, at (x=2.5 z = -2.5 x2=6.25 xz = -6.25 z2=6.25) > > I would like to test whether the predict from the first > margins command is different from the predict of the second > margins command; of course, I can see whether the confidence > intervals of the predict overlap (but I would like to do a > test). > > Is there a way to do this? > > Best, > John Antoankis > * > * 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**:**st: Testing difference between margins***From:*John.Antonakis@unil.ch

- Prev by Date:
**st: Question on ROC analysis** - Next by Date:
**Re: st: repeated events employment - unemployment** - Previous by thread:
**st: Testing difference between margins** - Next by thread:
**st: table weights** - Index(es):