Questions about cmh chiSQ and p values

Reply
N/A
Posts: 1

Questions about cmh chiSQ and p values

Hi all,

I am currently a student learning about SAS programming, i came across a question that i was unable to figure out. If anyone would be so kind to give me some pointers would be great! here is the question:

The worksheet ‘record’ shows two variables - disease and habit. Write a program that calculates Cochran-Mantel-Haenzel Chi-square and corresponding p-value. The output data set must have variables names:  cmh_chi for Cochran-Mantel-Haenzel Chi-square and cmh_p for

        p value of Cochran-Mantel-Haenzel Chi-square.


Here is the actual data, Do i have to turn it into numbers in order to compute the value? There should be 4 variables? Thank you in advance!

diseasehabit
cancersmoking
cancerno smoking
no cancerno smoking
cancersmoking
cancersmoking
no cancersmoking
cancerno smoking
cancersmoking
cancersmoking
cancerno smoking
cancersmoking
cancersmoking
cancerno smoking
cancersmoking
cancersmoking
cancerno smoking
cancersmoking
cancersmoking
cancerno smoking
cancersmoking
cancersmoking
cancerno smoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancerno smoking
no cancersmoking
cancerno smoking
no cancersmoking
cancerno smoking
no cancersmoking
cancersmoking
cancerno smoking
cancersmoking
cancersmoking
no cancersmoking
cancerno smoking
no cancersmoking
cancerno smoking
cancerno smoking
no cancersmoking
cancerno smoking
no cancersmoking
cancersmoking
cancersmoking
cancerno smoking
no cancersmoking
cancersmoking
no cancersmoking
cancerno smoking
no cancersmoking
cancerno smoking
no cancersmoking
cancerno smoking
cancerno smoking
cancerno smoking
no cancersmoking
cancersmoking
cancerno smoking
no cancersmoking
cancersmoking
cancersmoking
no cancersmoking
cancerno smoking
cancersmoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
no cancerno smoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
cancersmoking
Super User
Posts: 19,770

Re: Questions about cmh chiSQ and p values

look up proc freq

Ask a Question
Discussion stats
  • 1 reply
  • 166 views
  • 1 like
  • 2 in conversation