Hi SAS community,
I have a number of variables that include a variety of sub-groups nested within for each that I would like to separate out and evaluate.
A concrete example, is a dataset I have for lab samples. Each variable includes a different set of lab tests, or associated lab results, units and reference ranges etc. I would like to analyze the lab results and lab units for each set of lab tests. What is the best approach to analyze this data?
Here is a snapshot of my data:
As you can see I will also need to clean the data to make the units consistent as well... next item.
I was considering generating a new variable for each lab test but it still would not solve my problem with also capturing the other data parameters such as lab result, unit of measure and low and high ref ranges.
My SAS code is as follows:
TITLE "Type of Lab Test ";
PROC FREQ DATA=WORK.LB;
TABLE LBTESTCD_DEC * OVERALL;
RUN;
TITLE "Lab Result ";
PROC FREQ DATA=WORK.LB;
TABLE LBORRES * OVERALL;
RUN;
TITLE "Lab Result Unit ";
PROC FREQ DATA=WORK.LB;
TABLE LBORRESU_DEC * OVERALL;
RUN;
TITLE "Lab Low Reference Range";
PROC FREQ DATA=WORK.LB;
TABLE LBORNRLO * OVERALL;
RUN;
TITLE "Lab High Reference Range";
PROC FREQ DATA=WORK.LB;
TABLE LBORNRHI * OVERALL;
RUN;
I would like to evaluate basic descriptive data for each of the 4 lab tests (C4, C1-INH antigenic levels, C1-INH functional levels and C1q). I would like to look for items like out of range values for the corresponding results and units and compare to low and high reference ranges.
Any assistance would be greatly appreciated.
Thank you,
T.