Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Producing forest plot with reference category using preestimated values from regression analysis??

    Dear Stata users,
    I have regression estimates (i.e., effect sizes and 95%CIs). Now, I want to put them on the forest plot with reference category. I tried using admetan but it excludes the reference category (as it uses log form, SE is inestimable for reference category. I want to have forest plot as given below in the figure and appreciate if someone suggest any way of doing;

    Click image for larger version

Name:	Fig1.jpg
Views:	1
Size:	147.1 KB
ID:	1517663

  • #2
    Dear Vicky,
    If you have preestimated values and you are not interested in performing any meta-analysis pooling, then forestplot (bundled with admetan) should be able to do what you want.
    Best wishes,
    David.

    Comment


    • #3
      Hi David,
      Thanks for your reply. I'm able to do it with the 'admetan' command. But the problem is, I'm not able to add reference category. Do you have any suggestion on how to add reference category on forest plots?

      Comment


      • #4
        Hi Vicky,
        Here is a "toy" example, using the dataset bundled with metan and admetan.
        David.


        Code:
        use http://fmwww.bc.edu/repec/bocode/m/metan_example_data, clear
        
        * Run admetan to generate effect size and confidence interval for forestplot
        admetan td tn cd cn, nogr
        
        * Add a new observation, which will be our "reference"
        count
        set obs 21
        replace _ES = 0 in 21
        replace _LCI = 0 in 21
        replace _UCI = 0 in 21
        replace id = "New study" in 21
        
        * Run forestplot to add automatically-generated column variables to the dataset
        forestplot _ES _LCI _UCI, labels(id)
        
        * Edit the automatically-generated column variables, and then re-run forestplot
        * This time, we need to suppress the auto-generation [ nostats nowt]  and instead specify use of existing variables [  rcols() ]
        replace _EFFECT = "(Reference)" in 21
        forestplot _ES _LCI _UCI, labels(id) nostats nowt rcols(_EFFECT _WT)

        Comment


        • #5
          Hi David,
          Thank you for your kind help. Not sure how to do that with the multiple categorical variables with references on the same plot.
          How can I plot for the given example; [Age: <40 (Ref); >=40 (OR: 2.5; 95%CI: 2.12-4.15) and sex: Female (Ref); Male (OR: 1.5; 95%: 1.10-2.95)]
          I'll be grateful if you help with the above mentioned example. Thank you in advance for your time.

          Comment

          Working...
          X