[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: RE: How to use Postfile without using a new Stata dataset
Jeph Herrin and Austin Nichols between them came up with what looks
like a good solution:
------------------------------
clear
input a b c study p
26 85 41 1 0.056
12 56 23 2 0.862
45 85 96 3 0.996
45 86 91 4 0.005
end
g double pvalue=.
local number = _N
forv i = 1/`number' {
qui genhwi `=a[`i']' `=b[`i']' `=c[`i']'
qui replace pvalue = r(p_exact) in `i'
}
li
--------------------------------
The FAQ
How do I accumulate the results of immediate commands?
http://www.stata.com/support/faqs/data/results.html
covers some related ideas.
Nick
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/