I want to store p-values in macros to display in graph captions and am having trouble with p-values that are nearly zero as the round(p-value, .001) function returns 0, which looks incorrect in the output:
mgof variablex, mc ksmirnov
global ksfull=round(r(p_ksmirnov), .001)
twoway...caption("KS test rejects null, p=$ksfull")
In many cases I get p=0, where I would prefer to have p<.001. If the ceil() function had the option of specifying digits, as round() does, then this would be trivial. Any suggestions?
Sean
mgof variablex, mc ksmirnov
global ksfull=round(r(p_ksmirnov), .001)
twoway...caption("KS test rejects null, p=$ksfull")
In many cases I get p=0, where I would prefer to have p<.001. If the ceil() function had the option of specifying digits, as round() does, then this would be trivial. Any suggestions?
Sean
Comment