Dear All,
I calculated p-value after using sts test, and I intended to acquire p<0.001 when calculated p-value is 0.000 (code as follows) (Stata version 16.0) But it returns "<0.001 invalid name". Could you please give me some advice? Thank you.

Code:
sts test x
local logrankp: display %4.3f chi2tail(r(df), r(chi2))
if `logrankp'==0 {
local logrankp: display %9s "<0.001" 
}