Dear Statalist,
I am automating some reports using putdocx that are based on clinical data. Reporting these data are subject to requirements concerning statistical disclosure. Counts <10 need to be reported as “<10”, rather than the actual value.
I tried searching Statalist, but “disclosure” is a common term here, so apologies if this has been covered.
My question: is there an easy way to replace values in outputs that meet a certain criterion? For example,
clear all
input str20 condition count
"injury" 20
"overdose" 5
"other" 15
end
table condition, stat(sum count) stat(percent count)
I would like to replace the count 5 with “<10” and percent 12.50 with “<20.00”.
Simon
I am automating some reports using putdocx that are based on clinical data. Reporting these data are subject to requirements concerning statistical disclosure. Counts <10 need to be reported as “<10”, rather than the actual value.
I tried searching Statalist, but “disclosure” is a common term here, so apologies if this has been covered.
My question: is there an easy way to replace values in outputs that meet a certain criterion? For example,
clear all
input str20 condition count
"injury" 20
"overdose" 5
"other" 15
end
table condition, stat(sum count) stat(percent count)
I would like to replace the count 5 with “<10” and percent 12.50 with “<20.00”.
Simon
Comment