[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: re: pvalue in stata???
< >
Re my previous post, might be more sensible to compute an average t-
value weighted by the size of the samples, a la
sysuse auto,clear
reg price mpg if foreign
scalar t1 = _b[mpg]/_se[mpg]
scalar n1 = e(N)
reg price mpg if !foreign
scalar t2 = _b[mpg]/_se[mpg]
scalar n2 = e(N)
scalar avgt = (n1 * t1 + n2 * t2) / (n1 + n2)
scalar avgn = 0.5 * (n1 + n2)
scalar avgp = ttail(avgn, abs(avgt))
di _n "Average t(" avgn ") = " avgt " with pval = " avgp
Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* 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/