Help using Base SAS procedures

CHI INCLUDE 0 TOO

Reply
Regular Contributor
Regular Contributor
Posts: 238

CHI INCLUDE 0 TOO

PROC FREQ DATA = ReAdm.CHI ORDER = DATA; BY COMPARISON;

WEIGHT COUNT;

TABLES SVRTY_LVL_CD*WHO*ADMISSION/OUT=READM.FINAL1 EXPECTED OUTEXPECT;

EXACT OR;

RUN;

The above code is not including anything that has a zero. Example data:

who     comparison            svrty                admission                       count

1111         1111                  1                      readmit                            1

1111         1111                  1                    noreadmit                          66

1111          ntl                     1                     readmit                            955

1111          ntl                    1                     noreadmit                       33812

1111         1111                 4                     readmit                               1

1111         1111                 4                     noreadmit                           0

1111         ntl                    4                      readmit                           39

1111        ntl                      4                    noreadmit                        219

I have a lot like this and need the above CHISQ to include in the expected output the ones with 0's too. when I run this it will only include those that have anything but a 0

Regular Contributor
Regular Contributor
Posts: 238

Re: CHI INCLUDE 0 TOO

found my answer. have to put weight count/zeros;   to give it the zeros option

Ask a Question
Discussion stats
  • 1 reply
  • 119 views
  • 0 likes
  • 1 in conversation