5.8. CATMOD Coding of Categorical Variables
In the analysis of the wallet data, we treated PUNISH—which has values of 1, 2, and 3—as a quantitative variable. This assumes that the effect of changing from 1 to 2 is the same as the effect of changing from 2 to 3. How can we test this assumption? The simplest way is to remove PUNISH from the DIRECT statement, thereby telling SAS to treat it as a categorical variable. When I did that, I got a likelihood ratio statistic of 31.92 with 34 degrees of freedom. Subtracting that result from the likelihood ratio in Output 5.2 yields a chi-square of .03 with 2 degrees of freedom. In other words, the fit hardly improved at all when the linearity constraint was relaxed. We conclude that treating PUNISH as ...
Get Logistic Regression Using SAS®: Theory and Application now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.