BookmarkSubscribeRSS Feed
tmm
Fluorite | Level 6 tmm
Fluorite | Level 6

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

1 REPLY 1
tmm
Fluorite | Level 6 tmm
Fluorite | Level 6

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 589 views
  • 0 likes
  • 1 in conversation