Hi, I am getting slightly different values for percentiles of a continuous variable when I use proc surveymeans vs. proc means. I meant to calculate crude geometric means for my variable (Serum_conc) and also get percentiles of its distribution, so I did not enter any sampling weights, stratum, cluster or finite population correction into proc surveymeans. The reason to use proc surveymeans is to calculate survey-method adjusted GMs and compare them to the crude estimates, so I started with the crude GM calculations and also included percentiles. I expected proc surveymeans to calculate identical percentiles for the same variable as proc means, but the values differ slightly in the decimals -- do the two procedures use different default calculations for percentiles? My code is below. PROC MEANS DATA=datafile n nmiss min p25 p50 p75 p90 p95 max; var Serum_conc; RUN; PROC SURVEYMEANS DATA=datafile GEOMEAN GMCLM NMISS percentile=(25,50,75,90,95) max; VAR Serum_conc; ODS OUTPUT Statistics=dataset1 GeometricMeans=dataset2; *Specify ODS table names as output datasets; RUN; *Print temporary datasets/tables; PROC PRINT data=dataset1; RUN; PROC PRINT data=dataset2; RUN; Thank you in advance.
... View more