Hello,
I am running cox regression and I want to make forest plot of my hazard ratios using metan. I have been asked to produce my forest plot in log scale. If I remove "eform" from my command, the table of HRs with confidence intervals are also in log scale which makes it not readable. Here is a part of my data and the syntax I have used so far.
clear
input float RR float lci float uci str30 Condition str30 Period index
1.24 1.07 1.43 "condition 1" "1-3 " 1
1.21 1.02 1.44 "condition 1" "4-6 " 1
0.92 0.71 1.20 "condition 1" "7-9 " 1
1.33 0.92 1.93 "condition 1" "10-12" 1
1.57 1.43 1.72 "condition 2" "1-3" 2
1.21 1.07 1.38 "condition 2" "4-6" 2
1.04 0.86 1.25 "condition 2" "7-9" 2
1.06 0.77 1.48 "condition 2" "10-12" 2
end
gen double lRR=log(RR)
gen double lRRlci=log(lci)
gen double lRRuci=log(uci)
metan lRR lRRlci lRRuci , by(Condition) eform effect(HR) xlabel(0.5,2) force nooverall stats nosubgroup nobox nowt label(namevar=Period) xtitle("Hazard ratio (95% CI)", size(small)) graphregion(fcolor(white))
I thought this was the way to produce on log scale. So what do I do wrong? I really appreciate any suggestions
Related Posts with metan Hazard Ratio log scale
List of localsHi Statalist! I need to make a list of some locals defined in the .do file, in order to verify if t…
Python in StataDear all, I have a question about Python and Stata in version 16. I checked the documentation and ma…
Using loops and assigning particular rules to eachDear Stata list, I am agonising over a problem and would very much appreciate your support. I have …
Convert Integer Date to Date FormatHi all, I have a problem with converting an integer-type date (format %d) to long-type date (%10.0g)…
Mediation Analysis with multiple control variables and bootstrap CIsDear Statalist, after intensive studying of the available resources online, I am still left with so…
Subscribe to:
Post Comments (Atom)
0 Response to metan Hazard Ratio log scale
Post a Comment