Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | st: RE: test difference of two linear combinations that are differences of means |
Date | Fri, 7 Feb 2014 10:34:17 +0000 |
David, > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner- > statalist@hsphsun2.harvard.edu] On Behalf Of Radwin, David > Sent: 06 February 2014 21:03 > To: statalist@hsphsun2.harvard.edu > Subject: st: test difference of two linear combinations that are differences of > means > > > Dear Statalisters, > > How do I test whether the difference of two linear combinations is statistically > significant if the linear combinations are differences of means? > > In the contrived example below, I want to test whether the 0.08 absolute mean > difference between the South and West in mean January temperatures is > different than the 8.88 absolute mean difference between the South and West > in July temperatures. > > I can't use -suest- as some earlier posts have suggested because I get the error > message, "impossible to retrieve e(b) and e(V) in A" (error 198). -suest- works after -regress- (among other commands). Can you rejig your example so that the means are estimated by -regress- and reported as coefficients? E.g., instead of mean tempjan, over(region) use reg tempjan ibn.region, nocons HTH, Mark > > David > -- > David Radwin, Senior Research Associate > Education and Workforce Development > RTI International > 2150 Shattuck Ave. Suite 800, Berkeley, CA 94704 > Phone: 510-665-8274 > > www.rti.org/education > > . sysuse citytemp, clear > (City Temperature Data) > > . mean tempjan, over(region) > > Mean estimation Number of obs = 954 > > NE: region = NE > _subpop_2: region = N Cntrl > South: region = South > West: region = West > > -------------------------------------------------------------- > Over | Mean Std. Err. [95% Conf. Interval] > -------------+------------------------------------------------ > tempjan | > NE | 27.88537 .2766693 27.34241 28.42832 > _subpop_2 | 21.69437 .3397395 21.02764 22.36109 > South | 46.1456 .6568972 44.85647 47.43473 > West | 46.22539 .7033823 44.84503 47.60575 > -------------------------------------------------------------- > > . lincom [tempjan]West - [tempjan]South > > ( 1) - [tempjan]South + [tempjan]West = 0 > > ------------------------------------------------------------------------ > ------ > Mean | Coef. Std. Err. t P>|t| [95% Conf. > Interval] > -------------+---------------------------------------------------------- > ------ > (1) | .0797906 .9624243 0.08 0.934 -1.808925 > 1.968506 > ------------------------------------------------------------------------ > ------ > > . mean tempjuly, over(region) > > Mean estimation Number of obs = 954 > > NE: region = NE > _subpop_2: region = N Cntrl > South: region = South > West: region = West > > -------------------------------------------------------------- > Over | Mean Std. Err. [95% Conf. Interval] > -------------+------------------------------------------------ > tempjuly | > NE | 73.35 .1843789 72.98816 73.71184 > _subpop_2 | 73.46725 .1841403 73.10589 73.82862 > South | 80.9896 .1881789 80.62031 81.35889 > West | 72.10859 .4051957 71.31342 72.90377 > -------------------------------------------------------------- > > . lincom [tempjuly]West - [tempjuly]South > > ( 1) - [tempjuly]South + [tempjuly]West = 0 > > ------------------------------------------------------------------------ > ------ > Mean | Coef. Std. Err. t P>|t| [95% Conf. > Interval] > -------------+---------------------------------------------------------- > ------ > (1) | -8.881006 .4467604 -19.88 0.000 -9.757754 > -8.004258 > ------------------------------------------------------------------------ > ------ ----- Sunday Times Scottish University of the Year 2011-2013 Top in the UK for student experience Fourth university in the UK and top in Scotland (National Student Survey 2012) We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/