Ok so i have ran a mata analysis odds ratio and created a forest plot,i have what i need on the graph but i just need to change the study names. for example they show up as 1,2,3,4,5 . How can i change the numbers to medical , dental, specialty etc.
i have looked everywhere but the examples i keep seeing are on STATA 16 so its not working for me
Any help would be greatly appreciated
. metan lnor lnlci lnuci, eform effect (OR)type
Study | ES [95% Conf. Interval] % Weight
---------------------+---------------------------------------------------
1 | 0.510 0.440 0.590 30.63
2 | 0.710 0.610 0.810 32.77
3 | 4.020 3.100 5.200 9.85
4 | 1.920 1.560 2.340 16.03
5 | 1.720 1.340 2.200 10.72
---------------------+---------------------------------------------------
I-V pooled ES | 0.981 0.905 1.064 100.00
---------------------+---------------------------------------------------
this is the code i used
ssc install metan
set obs 5
gen or=0
gen lci=0
gen uci=0
edit
replace or=0.51 in 1/1
replace or=0.71 in 2/2
replace or=4.02 in 3/3
replace or=1.92 in 4/4
replace or=1.72 in 5/5
replace lci=0.44 in 1/1
replace lci=0.61 in 2/2
replace lci=3.1 in 3/3
replace lci=1.56 in 4/4
replace lci=1.34 in 5/5
replace uci=0.59 in 1/1
replace uci=0.81 in 2/2
replace uci=5.2 in 3/3
replace uci=2.34 in 4/4
replace uci=2.2 in 5/5
gen lnor= ln(or)
gen lnlci= ln(lci)
gen lnuci= ln(uci)
metan lnor lnlci lnuci, eform effect (OR)
Related Posts with Changing variable names on a forest plot STATA 15.1
probleme to perform ado functionDears, i am a new one on this forum and on stata, thank you for your help my question is : I want t…
Quantile regression (QR) for panel dataDear all, i hope you are doing good i'm trying to work on a non linear relationship. does quantile…
Controlling for year when appending two datasetsHello, One newbie question but I'm stuck on this basic task. I'm pooling two datasets from two diff…
Can i pick the Model with lower AIC but higher BIC?Good day Everyone, I was comparing two models Model2 has a lower AIC but a higher BIC. can i pick m…
Reverse Causality and Panel DataHi all, I hope all is well. Please, I am studying if some of the variables affect firm instrument is…
Subscribe to:
Post Comments (Atom)
0 Response to Changing variable names on a forest plot STATA 15.1
Post a Comment