I tried to use proc glimmix for the pooled analysis but I kept getting error about "solution." What is wrong with my sas code? Thank you for your help!
data meta_analysis_data;
input study_id sensitivity specificity se_sensitivity se_specificity;
datalines;
1 0.85 0.75 0.05 0.04
2 0.90 0.80 0.04 0.03
3 0.80 0.77 0.06 0.05
4 0.88 0.82 0.05 0.04
;
run;
data logit_data;
set meta_analysis_data;
logit_sensitivity = log(sensitivity / (1 - sensitivity));
logit_specificity = log(specificity / (1 - specificity));
run;
proc means data=logit_data nmiss;
var logit_sensitivity logit_specificity;
run;
proc freq data=logit_data;
tables logit_sensitivity*logit_specificity / missing;
run;
proc glimmix data=logit_data method=laplace;
class study_id;
/* Fit the model for logit_sensitivity only */
model logit_sensitivity = / solution dist=normal link=identity;
/* Random intercept for each study */
random study_id / subject=study_id type=vc;
ods output solution=sensitivity_results;
run;
proc print data=sensitivity_results;
run;
One other change - the SOLUTION is output to the ODS file ParameterEstimates, so try this (which ran without errors or warnings for me)
data meta_analysis_data;
input study_id sensitivity specificity se_sensitivity se_specificity;
datalines;
1 0.85 0.75 0.05 0.04
2 0.90 0.80 0.04 0.03
3 0.80 0.77 0.06 0.05
4 0.88 0.82 0.05 0.04
;
run;
data logit_data;
set meta_analysis_data;
logit_sensitivity = log(sensitivity / (1 - sensitivity));
logit_specificity = log(specificity / (1 - specificity));
run;
proc means data=logit_data nmiss;
var logit_sensitivity logit_specificity;
run;
proc freq data=logit_data;
tables logit_sensitivity*logit_specificity / missing;
run;
proc glimmix data=logit_data method=laplace;
class study_id;
/* Fit the model for logit_sensitivity only */
model logit_sensitivity = / solution dist=normal link=identity;
/* Random intercept for each study */
random intercept / subject=study_id type=vc;
ods output parameterestimates=sensitivity_results;
run;
proc print data=sensitivity_results;
run;
SteveDenham
Consider changing the last RANDOM statement to:
random intercept/subject=study_id;
Having study_id as both the random effect and the subject of the random effect most likely is the source of your error.
SteveDenham
One other change - the SOLUTION is output to the ODS file ParameterEstimates, so try this (which ran without errors or warnings for me)
data meta_analysis_data;
input study_id sensitivity specificity se_sensitivity se_specificity;
datalines;
1 0.85 0.75 0.05 0.04
2 0.90 0.80 0.04 0.03
3 0.80 0.77 0.06 0.05
4 0.88 0.82 0.05 0.04
;
run;
data logit_data;
set meta_analysis_data;
logit_sensitivity = log(sensitivity / (1 - sensitivity));
logit_specificity = log(specificity / (1 - specificity));
run;
proc means data=logit_data nmiss;
var logit_sensitivity logit_specificity;
run;
proc freq data=logit_data;
tables logit_sensitivity*logit_specificity / missing;
run;
proc glimmix data=logit_data method=laplace;
class study_id;
/* Fit the model for logit_sensitivity only */
model logit_sensitivity = / solution dist=normal link=identity;
/* Random intercept for each study */
random intercept / subject=study_id type=vc;
ods output parameterestimates=sensitivity_results;
run;
proc print data=sensitivity_results;
run;
SteveDenham
Thank you so much for your solution! It ran without any errors. Now my question is what this random intercept for sensitivity (=1.83, stdErr = 0.15, p = 0.0012) mean. This is my first try to use this method to do a pooled analysis. I was expecting to see the pooled sensitivity. Any advice would be greatly appreciated.
It looks like you are doing Meta Analysis.
Here random intercept for sensitivity is ODDS Ratio if you EXP() it .
a.k.a
exp(1.83)= odds ratio = sensitivity/(1-sensitivity)
Thank you so much for the suggestion and also the SAS document! I will read it carefully and see how I can modify my code to get a pooled sensitivity. Thank you!
sensitivity or specificity are just binomial distribution ratio.
You can Pooled them if you have their std error by PROC MIANALYSIS.
Here is an example for pooled sensitivity .
data meta_analysis_data;
input study_id sensitivity specificity se_sensitivity se_specificity;
datalines;
1 0.85 0.75 0.05 0.04
2 0.90 0.80 0.04 0.03
3 0.80 0.77 0.06 0.05
4 0.88 0.82 0.05 0.04
;
run;
data have;
set meta_analysis_data;
level=1;count=100*sensitivity;output;
level=0;count=100*(1-sensitivity);output;
keep study_id level count;
run;
ods select none;
proc freq data=have;
by study_id;
table level/binomial(level='1' cl=exact);
weight count;
ods output Binomial= Binomial;
run;
ods select all;
proc transpose data= Binomial out= Binomial2;
by study_id;
var nvalue1;
id name1;
run;
proc mianalyze data=Binomial2;
modeleffects _BIN_;
stderr E_BIN;
run;
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.