Hi everyone,
I am working in a network meta-analysis and have data for each intervention (1 to 6) and for each rating scale used in those studies (1 to 3) for which these data were collected at multiple timepoints (baseline, at 30 min, 60 min, 120 min and 180 min). I tried to use this article from UCLA, but sample size and name of the rating scales data are not being properly inputed repeatedly for the new created observations after reshaping the dataset. Here is an example of the long dataset after reshaping that I am getting after following the steps on the UCLA article. Variables "intervention" and "RS" are the number of the intervention and the number of the rating scale respectively.
So, treatment should have been inputed twice for study 11 and 30 and three times for study 19, same as sample size. And the rating scale does not even get inputed repeatedly for the first 6 interventions. That is the issue that I am having.
Here is a sample set and the code line I am using:
Thanks for your help.
I am working in a network meta-analysis and have data for each intervention (1 to 6) and for each rating scale used in those studies (1 to 3) for which these data were collected at multiple timepoints (baseline, at 30 min, 60 min, 120 min and 180 min). I tried to use this article from UCLA, but sample size and name of the rating scales data are not being properly inputed repeatedly for the new created observations after reshaping the dataset. Here is an example of the long dataset after reshaping that I am getting after following the steps on the UCLA article. Variables "intervention" and "RS" are the number of the intervention and the number of the rating scale respectively.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float ID str27 treatment int n double(bm bsd ym ysd) str152 RatingScale byte(intervention RS) 11 "Haloperidol + Promethazine" 27 1.4 .6 . . "ACES" 1 1 11 "Haloperidol + Midazolam" 25 1.8 .7 . . "PANSS-EC" 2 1 11 "Ziprasidone" 23 1.7 .7 . . "" 3 1 11 "Olanzapine" 25 1.7 .6 . . "" 4 1 11 "" . . . . . "" 5 1 11 "" . . . . . "" 6 1 11 "" . 25.7 6 10.7 6.7 "" 1 2 11 "" . 24.3 5.6 9.4 9.4 "" 2 2 11 "" . 26.4 6.4 11.2 8.3 "" 3 2 11 "" . 24.4 5.9 9.2 5.3 "" 4 2 11 "" . . . . . "" 5 2 11 "" . . . . . "" 6 2 11 "" . . . . . "" 1 3 11 "" . . . . . "" 2 3 11 "" . . . . . "" 3 3 11 "" . . . . . "" 4 3 11 "" . . . . . "" 5 3 11 "" . . . . . "" 6 3 19 "Clonazepam + Placebo" 8 5.5 1.2 2.2 1.3 "Other: CGI Severity Scale" 1 1 19 "Haloperidol + Procyclidine" 8 5.4 1.1 2.6 1.3 "Other: Target Manic Symptoms" 2 1 19 "" . . . . . "Other: Inpatient Multidimensional Psychiatric Scale (IMPS) Manic Subscale" 3 1 19 "" . . . . . "" 4 1 19 "" . . . . . "" 5 1 19 "" . . . . . "" 6 1 19 "" . 17 3.3 7.3 4.9 "" 1 2 19 "" . 18 3.2 5 4.9 "" 2 2 19 "" . . . . . "" 3 2 19 "" . . . . . "" 4 2 19 "" . . . . . "" 5 2 19 "" . . . . . "" 6 2 19 "" . 16.8 3 10 7.2 "" 1 3 19 "" . 16.6 5.2 7.4 3.8 "" 2 3 19 "" . . . . . "" 3 3 19 "" . . . . . "" 4 3 19 "" . . . . . "" 5 3 19 "" . . . . . "" 6 3 30 "Staccato Placebo" 105 17.7 . 12.9 . "PANSS-EC" 1 1 30 "Loxapine" 104 17.4 . 9.31 . "ACES" 2 1 30 "Loxapine" 105 17.3 . 8.27 . "Other: " 3 1 30 "" . . . . . "" 4 1 30 "" . . . . . "" 5 1 30 "" . . . . . "" 6 1 30 "" . 2.01 .4 3.34 1.68 "" 1 2 30 "" . 2.11 .44 4.67 1.98 "" 2 2 30 "" . 2.11 .42 5.14 2.06 "" 3 2 30 "" . . . . . "" 4 2 30 "" . . . . . "" 5 2 30 "" . . . . . "" 6 2 30 "" . . . . . "" 1 3 30 "" . . . . . "" 2 3 30 "" . . . . . "" 3 3 30 "" . . . . . "" 4 3 30 "" . . . . . "" 5 3 30 "" . . . . . "" 6 3 end
Here is a sample set and the code line I am using:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float ID str26 treatment1 str27 treatment2 int(n1 n2) double(bm1 bm2 bsd1 bsd2 ym1 ym2 ysd1 ysd2) str83 RatingScale1 str152 RatingScale2 1 "Haloperidol" "Haloperidol" 21 12 1 1 . . . . . . "Other: Five-point combativeness scale" "" 2 "Midazolam" "Haloperidol" 42 42 . . . . . . . . "" "" 3 "Droperidol" "Ziprasidone" 25 28 3 3 . . -1 -3 . . "Other: Altered Mental Status Scale (AMSS)" "Other: " 4 "Droperidol" "Ziprasidone" 50 46 3.12 3.41 . . -1.68 -2 . . "Other: Altered Mental Status Scale (AMS)" "" 5 "Ketamine" "Haloperidol" 45 45 2.62 2.59 .94 1.13 . . . . "Other: altered mental status score (AMSS)" "" 6 "Haloperidol" "Midazolam" 23 25 . . . . . . . . "Other: Restless score" "" 7 "Olanzapine" "Haloperidol" 54 57 3.96 4.15 . . . . . . "Other: Agitation/Sedation Scale" "" 8 "Ketamine" "Haloperidol + Midazolam" 40 40 3.64 3.45 . . . . . . "RASS" "" 9 "Lorazepam" "Droperidol" 100 102 5.3 5.6 .7 .6 . . . . "Other: Sedation Scale" "" 10 "Haloperidol + Promethazine" "Olanzapine" 150 150 4.63 4.55 .72 .78 . . . . "Other: CGI-S" "Other: CGI-I" 11 "Haloperidol + Promethazine" "Haloperidol + Midazolam" 27 25 1.4 1.8 .6 .7 . . . . "ACES" "PANSS-EC" end
Code:
reshape long treatment n bm bsd ym ysd RatingScale, i(ID) j(seq)
Comment