Announcement

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

  • Creating a forest plot with given weights (from population) and confidence intervals

    Hi everyone,

    I have the following dataset and I want to create a forest plot for some correlation coefficients. Each correlation coefficient has an assigned weight and confidence interval that I calculated as these correlation coefficents are for specific cities in one region, and weights are assigned by population size. I have been using the following commands to make the forest plots, however, I am not sure how to include my own weights in the code. I am new to STATA so I have selected the random effects model, and the weights are being used from there. Below is my inputted dataset, code and output.

    In my code, I calculated the relative difference and used civartolerence() as the meta set command was not accepting my original confidence intervals.


    Click image for larger version

Name:	Screenshot 2023-12-29 002117.png
Views:	1
Size:	17.5 KB
ID:	1738392


    Code:
    generate double relative_diff = reldif(correlationcoefficient-lowercl, uppercl-correlationcoefficient)
    summarize relative_diff
    meta set correlationcoefficient lowercl uppercl, civartolerance(.18)
    meta forestplot _plot _esci _weight _es lhin

    Output:

    . summarize relative_diff

    Variable | Obs Mean Std. dev. Min Max
    -------------+---------------------------------------------------------
    relative_d~f | 14 .0969017 .0380708 .0107149 .1718803

    . meta set correlationcoefficient lowercl uppercl, civartolerance(.18)

    Meta-analysis setting information

    Study information
    No. of studies: 14
    Study label: Generic
    Study size: N/A

    Effect size
    Type: <generic>
    Label: Effect size
    Variable: correlationcoefficient

    Precision
    Std. err.: _meta_se
    CI: [_meta_cil, _meta_ciu]
    CI level: 95%, controlled by level()
    User CI: [lowercl, uppercl]
    User CI level: 95%, controlled by civarlevel()

    Model and method
    Model: Random effects
    Method: REML

    .
    . meta forestplot _plot _esci _weight _es lhin

    Effect-size label: Effect size
    Effect size: correlationcoefficient
    Std. err.: _meta_se

    Click image for larger version

Name:	Graph.jpg
Views:	1
Size:	32.7 KB
ID:	1738393


    Note: I have not included full results here.

    Any suggestions for how to include my own weights into the forest plot would be greatly appreciated.

    Thanks,
    Maliha


Working...
X