Announcement

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

  • Clinical trials: creating graphs for subgroup interactions

    I wanted to update Statalist with an resolution to a previous query I had made here (a follow-up from the thread at http://www.statalist.org/forums/foru...p-interactions).

    The goal: to use Stata to create publication-quality Figures depicting the effect on outcomes in various subgroups involved in clinical trials. (See attached figure 1 as an example.)

    The resolution: If you read the linked-to thread above, you will see that David Fisher had just written a series of commands for precisely that use (amongst other things, namely to perform 2-stage inverse-variance individual participant data meta-analysis).

    His Stata package is -ipdmetan- and is available by typing "ssc install ipdmetan".

    I had a go using his commands -ipdover- and -forestplot-, and, thanks to his detailed help, was able to come up with an example which worked for me, and I thought I should share the results. (He has also recently updated his software, so those who already downloaded it should -adoupdate- to get his latest version.)

    I have attached a sample data file and a sample .do file to the next message which will run self-contained and produce the second attached figure. (Statalist didn't seem to let me attach graphics and a .dta file at the same time.)

    Although I used pre-summarized data in my example, David gives two additional, very useful examples in the help files for -ipdover- and -forestplot-. These examples show you how the commands can seamlessly be integrated with your trial's data (without pre-calculating effect sizes and confidence intervals). Only use my example if you want to have manual control over how your plot is created.

    My comments:
    • the data in my files is fictitious
    • weights are entered directly. So, if you are analyzing a clinical trial with a total of 500 patients, you enter in the number of patients in each subgroup directly (the attached example should be clear)
    • P values for interactions are not included in the suite of commands, so you'll need to calculate them yourself
    • I include the gaudy colours only for illustrative purposes, not because I think they are attractive
    I would like to thank David for writing this suite of commands, and for being so responsive to my queries. Hopefully the sample code in my next message will help someone who is in my situation. I am very pleased with the quality of the figures produced. I would appreciate any comments or improvements to my code as well.

    Kind regards,

    Phil
    Sample figure from the NEJM. Output from -forestplot- program by David Fisher.

  • #2
    Note: I have had trouble uploading the .dta file. Unfortunately, the workaround at the moment was to zip the .dta file and then label it as ".png". So, download the "png" file "as" a zip file, unzip it, and you should be OK. Sorry for this kludge! (The .do file seems to be fine.)
    Attached Files
    Last edited by Philip Jones; 30 Jul 2014, 13:13.

    Comment


    • #3
      Hi Phil,

      I don't think it worked, after clicking on the link I got the error message:
      The image “http://www.statalist.org/forums/file...h?id=113592” cannot be displayed, because it contains errors.
      Why don't you try uploading as *.txt?
      Kind regards,
      Konrad
      Version: Stata/IC 13.1

      Comment


      • #4
        OK. I have attached a .txt file which I hope will work. It is a comma separated values file.

        I will revisit this thread when we have the ability to upload .dta files.

        Thanks.
        Attached Files

        Comment

        Working...
        X