Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Output table with means pvalues for difference in means

From   "Swanquist, Quinn Thomas" <>
To   "" <>
Subject   st: Output table with means pvalues for difference in means
Date   Wed, 13 Jun 2012 17:32:01 +0000


I am trying to output a table (into txt, word, or excel) that shows the means for variables in two subsamples as well as the pvalue from the ttest of difference in means. Is there a command similar to outreg2 that will do this. 

At the end of the day this is how I need the data to look:

	Sample1mean	 Sample2mean	 Difference 	 (p-value) 
v2 	 0.0903		 0.0994 		 (0.0091)	0.00
v1	 145.9465	 66.3245 	 79.6220 	0.00

Quinn Swanquist

-----Original Message-----
From: [] On Behalf Of Nick Cox
Sent: Wednesday, June 13, 2012 1:09 PM
To: ''
Subject: st: RE: Syntax for trimming distribution tail In xtabond2

There is no context here. But even assuming that r(p1) and r(p99) are available from some previous command, the quote characters here are incorrect -- you would need left single quotes as opening delimiters -- and one parenthesis is unmatched. 

... if inrange(y, `r(p1)',`r(p99)')

is more likely to be what you have in mind. 

This is not to be construed as supporting trimming distribution tails, in my view a horrible method.  


Jason Hecht

Apparently the following syntax that worked in xtabond did not work in xtabond2:

xtabond y l.x1 l.x2 l.x3 if inrange(y, 'r(p1','r(p99)'), noconstant

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index