Dear all, Recently i run the two parts of code below. one is from mine and one is from QCer. we have dataset inputed exactly the same except the study name(see below). and when we use proc mixed to run the meta analysis, we used the same code, however, the results generated from proc mixed are different. In the proc mixed, the class statement will consider the study name as categorical, but why length of this variable is impacting the output, anyone has any idea? Thanks a lot! PS: I am using SAS 9.4, but i think this may not be the version issue since I run both code on one laptop. -------------------------------------------------------------------------------------------- part 1 %let z_alpha=quantile('NORMAL',0.975); data tmp; format study $3.; input study $ HR CI_lower CI_upper; cards; Brayden 1.6 1.23 2.02 Mary 3.50 2.97 4.32 Olive 2.36 2.04 2.80 Panda 1.48 1.10 1.98 ; run; data table5; set tmp; est = log(HR); se = (log(CI_upper) - log(CI_lower))/2/&z_alpha.; v=se*se; run; data tmp; format study $10.; study = "intercpt"; v = 0.001; run; data var; set tmp table5(keep=study v); rename v = est; run; ods output SolutionF=out1; proc mixed data=table5 method=reml; class study; model est = / cl solution ; random study / solution; repeated / group = study; parms / parmsdata=var eqcons=2 to 5; run; data out2; set out1; HR = round(exp(Estimate),0.01); CI_lower = round(exp(Estimate - StdErr*&z_alpha.),0.01); CI_upper = round(exp(Estimate + StdErr*&z_alpha.),0.01); se_logHR = round((log(CI_upper) - log(CI_lower))/2/&z_alpha, 0.001); *keep HR CI_lower CI_upper se_logHR; run; -------------------------------------------------------------------------------------------- part 2 data all; length study $32; study = "Brayden C"; hr =1.6; lcl =1.23; ucl =2.02; output; study = "Mary C"; hr =3.50; lcl =2.97; ucl =4.32; output; study = "S_Olive C"; hr =2.36; lcl =2.04; ucl =2.80; output; study ="Panda Cancer"; hr =1.48; lcl =1.10; ucl =1.98; output; run; data _all; set all; est = log(HR); se = (log(ucl)-log(lcl))/2/quantile('NORMAL',0.975); v=se*se; run; proc print; title "Estimates in Different Population"; run; data intercept; length study $64; study = "intercept"; v = 0.001; run; data var_all; set intercept _all(keep=study v); rename v = est; run; ods listing close; ods output SolutionF=out_all; proc mixed data=_all method=reml; class study; model est = / cl solution ; random study / solution; repeated / group = study; parms / parmsdata=var_all eqcons=2 to 5; run;
... View more