Announcement

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

  • metan with sample size

    Hi all,

    I am working on meta-anaylsis. I have 4 studies with sample size, coefficients, p values and standard errors (also confidence intervals but only for two studies). Now I want to run meta-analysis. I used the code

    'metan Effect_value SE, random'

    However, it is not displaying study authors instead it shows 1, 2, 3, 4

    I also want to include study sample size using the following code

    'metan Effect_value SE, random n(sample_size)'

    Study_ID Effect [95% Conf. Interval] % Weight
    ------------------------+----------------------------------------------
    1 0.280 0.190 0.370 34.63
    2 0.240 0.150 0.330 34.63
    3 0.330 0.052 0.608 3.63
    4 0.170 0.068 0.272 27.10
    ------------------------+----------------------------------------------
    Overall,DL 0.238 0.185 0.291 100.00
    ---------------------------------------------------------------------
    I tried with forestplot option, then I found 10% heterogeneity, which was 0 using metan

    It would be great if someone could guide me where it went wrong and how to solve it

    Thank you
    Last edited by Pallavi Ch; 28 Feb 2025, 07:25.

  • #2
    version number? n() does not appear to be allowed in more recent versions. I think wgt() is the new option.

    lcols(Study_ID) will give you labels for the Study_ID. Or, you have Study_Name, you can lcols(Study_Name).

    providing sample sizes might be helpful.

    Comment


    • #3
      Hi,
      thank you for responding

      I am using STATA SE 18.5

      Sample sizes are as follows

      study 1- 89
      study 2- 204
      study 3- 202
      study 4- 2280

      Comment


      • #4
        Hi George Ford,

        Here is the corrected code based on your suggestion, and it worked

        Code:
        metan Effect_value SE, random lcols(Study_ID sample_size)
        graph looks like this

        Click image for larger version

Name:	Graph_output.png
Views:	1
Size:	109.2 KB
ID:	1773931
        Now I wanted to reduce the space between sample size and forest plot also increase the space between forest plot and effect 95%CI. I used graph editor option- Aspect ratio, graph size, scale but was not able to fix it. Could you or someone please help me with this.

        Also I tried the following code for the same sample
        Code:
        meta set Effect_value SE, studylabel(Study_ID)
        Code:
        meta update, studylabel(Study_ID) studysize(sample_size)
        Code:
        meta forestplot
        however, graph did not show the sample size
        Is it because of precomputed effect sizes?


        Graph editing in meta forest plot is more flexible though
        Is there any specific condition for using meta or metan? I am confused

        Any suggestions would be helpful

        Thanks

        Comment

        Working...
        X