Announcement

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

  • Meta analysis commands in stata

    Hi,
    This is a general question regarding the meta-analysis commands within Stata - is there a command that allows you to save the results of your meta analysis (pooled ES, SEs, I^2, etc) within a separate stata dataset automatically, or does this needs to be done through the use of scalars?
    Many thanks,
    Jo

  • #2
    You will need to use some custom programming if you want the heterogeneity statistics as part of a dataset. Otherwise you can follow the manual example with any meta-analysis to see which variables are automatically created by the -meta- suite of commands, which will their name prefixed by an underscore (_).

    Comment


    • #3
      Actually, do you want a dataset, or are you just looking to export summary information to Excel, or something else?

      After a straight up meta-analysis, I am not sure there really is a need for a dataset of results. Stata does spit out a bunch of scalars containing parameters of interest, e.g. r(I2) is is the I^2 (heterogeneity estimate), r(theta) is the overall effect size, etc. It seems like any dataset you might generate after a meta analysis would have the study name, its point estimate, the bounds of the confidence interval ... but you already declared these before you ran the meta analysis command. You could add a line for the overall effect estimate, I guess, and you could populate it with information from the scalars above. I'm not sure where you'd store model-related statistics like I^2. Anyway, you can type return list and ereturn list after an estimation command to see what it spits out, and there will be a list at the end of the help file entry anyway. I think that all of the meta analysis command's returns should be under return list. ereturn list tends to spit out a bunch of matrices (e.g. parameter estimates, variance-covariance matrix of the betas, etc).

      Now, some graphing commands have an undocumented saving(...) option that saves the information as a dataset. Margins does this, and I can attest that the IRT graphs also do this. I don't know that the forest plot command would need to do this, because most of the information is in the original dataset, except for one last line for the overall effect. It does seem like the saving(...) option for forest plot is documented, and it will save the graph and not the dataset.

      If you actually need a dataset, can you describe what you want in it?
      Last edited by Weiwen Ng; 06 Oct 2021, 11:23.
      Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

      When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

      Comment


      • #4
        Hi,
        Thanks very much for your responses

        Leonardo - i was hoping to use the variables which are automatically created within the current dataset by metan - but only _UCI _LCI and _WT are being generated, not _ES,_seES etc as listed in the metan help file - is this potentially because I am using precalculated effect estimates for the underlying studies?
        Weiwen - I need to run many different meta analysis, approx 500, and just wanted to store the pooled ES, etc in a dataset, for ease, before deciding which results to output to excel

        Thanks,
        Jo

        Comment


        • #5
          I see the issue, the ones you referenced are system variables. That is, they exist, but you don’t see them when you browse the data. You should actually be able to generate a new variable or scalar corresponding to the system variables you’re interested in.
          Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

          When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

          Comment

          Working...
          X