Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Easy Question: pvalues for means for groups
From
"Ben Hoen" <[email protected]>
To
<[email protected]>
Subject
st: Easy Question: pvalues for means for groups
Date
Fri, 6 Sep 2013 13:16:29 -0400
Hi all,
I am trying to find a simple way to output a set of tests (e.g., p-values)
of means (i.e., are they different from 0) across groups (there are 6 of
them). Ideally .tabstat, which outputs a mean and a se would also produce a
pvalue (in this case, the probability that the mean is different from zero)
because that tabular output is preferable.
**** example ****
sysuse auto, clear
g type=round((runiform()*5)+1)
tabstat price, stat(mean sem) by(type) //in addition to these two stats it
would, ideally, produce a p-value
***** end *******
I can use .reg, of course, but I then I need to convert the coef using the
constant.
**** example ****
sysuse auto, clear
g type=round((runiform()*5)+1)
reg price ib1.type
***** end *******
I suspect I am missing something very obvious, but I have not been able to
figure it out. Anyone able to quickly send me on my way?
Thanks, in advance,
Ben
Ben Hoen
Staff Research Associate
Lawrence Berkeley National Laboratory
Office: 845-758-1896
Cell: 718-812-7589
[email protected]
http://emp.lbl.gov/staff/ben-hoen
Visit our publications at:
http://emp.lbl.gov/reports/re
Sign up for our email list to receive publication notifications at:
https://spreadsheets.google.com/a/lbl.gov/spreadsheet/viewform?formkey=dGlFS
1U1NFlUNzQ1TlBHSzY2VGZuN1E6MQ
*
* 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/