cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

Odds ratios for multiway tables

On twitter earlier today, someone asked if the Cochran-Mantel-Haenszel (CMH) odds ratio (OR) test was available in JMP when the stratification variable is not the X in Fit Y by X. Anytime I need to go from two variables to more than two variables, the first place I look is Fit Model. The beauty of fit model is that not only can I use as many variables as I want, but I can consider interactions between the variables. To use Fit Model, choose the (categorical) response as the Y and the all other variables as the Xs. In many cases, your data is aggregated into counts. If this is true, don't forget to identify the count column as Freq. Once you have fit the model, the odds ratios are available under the top hotspot.

I've attached an example using a simple 3-way table from Agresti's Introduction to Categorical Data Analysis. I've analyzed it two ways. First, I treated the additional strata (city) as a factor. When I do this, I can calculate the odds ratios for every possible pair of city combinations. Second, I used city as a by variable. This would treat each city's data as an independent set of data. While I didn't include the City*Smoker interaction (it wasn't significant), I was able to look at it.

0 REPLIES 0