Stata: Capture p-value from ranksum test -
when run return list, all
after running ranksum
test, count , z-score available, not p-value. there way of picking up?
clear input eventtime prefflag winner stakechange 1 1 1 10 1 2 1 5 2 1 0 50 2 2 0 31 2 1 1 51 2 2 1 20 1 1 0 10 2 2 1 10 2 1 0 5 3 2 0 8 4 2 0 8 5 2 0 8 5 2 1 8 3 1 1 8 4 1 1 8 5 1 1 8 5 1 1 8 end bysort eventtime winner: tabstat stakechange, stat(mean median n) columns(statistics) ranksum stakechange if inlist(eventtime, 1, 2) & inlist(winner, 0, .), (eventtime) return list,
try computing after ranksum
:
scalar pval = 2 * normprob(-abs(r(z))) display pval
the answer @nickcox: http://www.stata.com/statalist/archive/2004-12/msg00622.html
the statalist archive valuable resource.
Comments
Post a Comment