BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
opeyemi123
Calcite | Level 5

Dear all,

I am a beginner on SAS. Was asked to write a SAS program for meta-analysis. Learnt it can be done using Proc mixed. Currently stucked on how to get my forest plot and the tactics to arrive at the final analysis.

please correct me if I'm wrong;

proc mixed data= blood_pressure order=data method=reml;

class trial;

model theta= / cl solution outp=predicted;

random trial / solution gdata=blood_pressure;

repeated diag;

run;

many thanks;

ib.

1 ACCEPTED SOLUTION

Accepted Solutions
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

I see you are trying the approach originally proposed by Normand (1999), and repeated several places, including in the book Meta-Analysis of Controlled Clinical Trials. However, there is an easier way to do this, and this has been shown by several authors. Presumably, your GDATA file contains a variance term, known as the sampling variance, with a separate value for each study. These are held fixed in meta-analysis. (It is not clear that you defined the sampling variance properly). Only the among-study variance is estimated. But the Normand approach treats the among-study variance as the residual, where usually the residual should be the within-study variance (with a separate value for each study, held fixed). This all still works out correctly if all you want is the estimated expected effect size and its estimated standard error. But if you want BLUPs for each study, then you need additional post-model-fitting steps.

Here is a way to fit the same model that does not require a separate GDATA file. Assume that the variable wgt in the blood_pressure data file is the inverse of the sampling variance for each study. You can create it with wgt = 1/samplvar; statement in a data step. You must have this value from each trial in order to do this meta-analysis. Then use:

proc mixed data= blood_pressure order=data method=reml;

class trial;

weight wgt;

model theta= / cl solution outp=predicted;

random trial ;

parms (1) (1) / hold=2;

estimate 'exp.effect size' int 1 / cl;

run;

The combination of the weight and the parms statements gives the required model. The parms statement gives initial guesses for the among-study and residual variance. The second variance parameter (residual) is held fixed at 1 (hold=2 means hold the second term at the value of 1). This, in combination with the weight statement, gives a separate sampling variance for each trial that is held fixed. (The output lists 1 for residual variance, but with the weight statement, one is really getting a separate residual for each trial. This will give the correct EBLUPs on the outp file.

There are several other, but more tedious, ways of getting idential results, using pdata= options on a repeated statement.

If you want to learn more, send me your email and I will send you an instruction file.

View solution in original post

6 REPLIES 6
SteveDenham
Jade | Level 19

What is the variable "diag" in the repeated statement?  Since it is not included in the class statement, I must assume that it is a continuous variable that is unique for each record in the data set blood_pressure.  In order for this to be valid, the dataset must be sorted on "diag."

I also wonder that your input dataset and your G matrix dataset are identically named.  I suspect that this will lead to problems, as the gdata= option requires somewhat different formatting.

For further assistance, it would help if you posted any error or warning messages from the log.

Steve Denham

opeyemi123
Calcite | Level 5

Hi steve, thanks for the reply. The sas code you saw there was gotten from the internet. I not really sure of it's correctness. I have been instructed to carry out a full  meta-analysis of a normally distributed data on sas, as well as to produce the forest plot(95% CI). Ordinarily, the CMA package is what I'm used to but the instruction was that i should use sas for the analysis. The data is of the form;

trial     mean_of_new_treat     stand_dev_of_new_treat     numb_on_new_treat     mean_of_placebo stand_dev_of_placebo     numb_on_placebo

1          5.7                                6.2                                     12                                    5.2                          6.3                       10

2          6.3                                5.6                                     120                                  7.5                          6.2                       122

3          6.9                                4.5                                      63                                   7.1                          4.3                       64

4          7.3                                5.4                                      58                                   7.5                          3.4                       56

Thanks

ib

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

I see you are trying the approach originally proposed by Normand (1999), and repeated several places, including in the book Meta-Analysis of Controlled Clinical Trials. However, there is an easier way to do this, and this has been shown by several authors. Presumably, your GDATA file contains a variance term, known as the sampling variance, with a separate value for each study. These are held fixed in meta-analysis. (It is not clear that you defined the sampling variance properly). Only the among-study variance is estimated. But the Normand approach treats the among-study variance as the residual, where usually the residual should be the within-study variance (with a separate value for each study, held fixed). This all still works out correctly if all you want is the estimated expected effect size and its estimated standard error. But if you want BLUPs for each study, then you need additional post-model-fitting steps.

Here is a way to fit the same model that does not require a separate GDATA file. Assume that the variable wgt in the blood_pressure data file is the inverse of the sampling variance for each study. You can create it with wgt = 1/samplvar; statement in a data step. You must have this value from each trial in order to do this meta-analysis. Then use:

proc mixed data= blood_pressure order=data method=reml;

class trial;

weight wgt;

model theta= / cl solution outp=predicted;

random trial ;

parms (1) (1) / hold=2;

estimate 'exp.effect size' int 1 / cl;

run;

The combination of the weight and the parms statements gives the required model. The parms statement gives initial guesses for the among-study and residual variance. The second variance parameter (residual) is held fixed at 1 (hold=2 means hold the second term at the value of 1). This, in combination with the weight statement, gives a separate sampling variance for each trial that is held fixed. (The output lists 1 for residual variance, but with the weight statement, one is really getting a separate residual for each trial. This will give the correct EBLUPs on the outp file.

There are several other, but more tedious, ways of getting idential results, using pdata= options on a repeated statement.

If you want to learn more, send me your email and I will send you an instruction file.

Rick_SAS
SAS Super FREQ

Wow. Answers like this give me a warm feeling inside. On behalf of all of us who don't have as much experience, thanks to LVM and Steve and ALL of the SAS experts who spend considerable time to answer these technical forum questions!

opeyemi123
Calcite | Level 5

Many thanks Ivm, will work on this sas code now. My email addy is - yemiabdulwasiu@ymail.com.

Thanks

ib

MisterFred
Fluorite | Level 6

Hi,

I've found your code very usefull for a meta analysis I'm doing. It gives great results, but I have to add references to complete may work.

You mentionned  in your post that there are several authors descibing the analysis that is in your code. Could you give me some references, so i will try to read and understand these papers.

Thanks a lot

Friedrich

PS : here is my mail  friedrich.rouffineau@adisseo.com

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 10180 views
  • 3 likes
  • 5 in conversation