Please, i have a data set for hospital records, there are many patients that have a particular diagnosis. i am aked to provide the average length of stay of the patients per diagnosis. Is there a way i can have a table that shows the mean of the patients per diagnosis?
i tried this and it did not work, the codes in the parentheses are the diangosis codes in the variable Admitting_diag. i am to findthe mean legth of stay per the admitting diagnoses
PROC MEANS DATA = WEEK6.QUES3B1 MEAN MIN MAX MAXDEC = 1;
VAR LENGTH_OF_STAY;
WHERE ADMITTING_DIAG IN ('V3000') OR ADMITTING_DIAG IN ('V221') ;
RUN;
i also tried where admitting_diag in WHERE ADMITTING_DIAG IN ('V3000' 'V221' 'V3001' '650' '78650')
all it gave me is the cummulative mean for all diagnoses in the parenthesis
WHERE ADMITTING_DIAG IN ('V3000' 'V221' 'V3001' '650' '78650');
RUN;