Statalist


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

st: re: pvalue in stata???


From   Christopher Baum <[email protected]>
To   [email protected]
Subject   st: re: pvalue in stata???
Date   Wed, 29 Oct 2008 17:13:26 -0400

< >
Here is a slightly less toylike example:

webuse grunfeld, clear
scalar tavg = 0
scalar navg = 0
forv i=1/10 {
	reg invest mvalue if company == `i'
	scalar tavg = tavg + e(N) * abs(_b[mvalue] / _se[mvalue])
	di `i' " " tavg
	scalar navg = navg + e(N)
}
scalar tavg = tavg / navg
scalar navg = navg / 10
scalar pavg = ttail(navg, abs(tavg))
di _n "Average t(" navg ") = " tavg " with pval = " pavg



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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index