运行return list, all
测试后运行ranksum
时,计数和z分数可用,但不是p值。有什么方法可以捡到它吗?
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, .), by (eventtime)
return list, all
答案 0 :(得分:4)
尝试在ranksum
之后计算它:
scalar pval = 2 * normprob(-abs(r(z)))
display pval
答案是@NickCox: http://www.stata.com/statalist/archive/2004-12/msg00622.html
Statalist archive是宝贵的资源。