cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
sunbears
Level II

Can JMP automatically dichotomize continuous variables while making contingency tables?

This data table contains hypothetical values from a method comparison between two quantitative tests. You can see that I dichotomized the quantitative values in columns "Test A" and "Test B" at a setpoint of 4, resulting in columns "Test A dich4" and "Test B dich4", respectively. This facilitated fitting {y by x} of the resultant columns into a 2x2 contingency table (script “Split at 4”).

  • Can JMP automatically calculate the typical characteristics from such an analysis? (e.g. overall percent agreement)
  • Is there a way to get a 2x2 contingency table without manually performing dichotomization? e.g. I’d prefer to ask for a contingency table of the two columns containing continuous variables (herein "Test A" and "Test B") with automatic dichotomization at a point that I provide. This would facilitate quicker review of tables splitting the data at different levels relevant to a given measurement system, such as 1, 2, 3.5, 4, 4.5, etc.
5 REPLIES 5

Re: Can JMP automatically dichotomize continuous variables while making contingency tables?

Hi,

Using a "table variable" is one way this can be done. Using the table's red triangle menu, add a Table Variable. I called mine "Split Value". Set it to some initial value. Then, when entering your dichotomizing formula, use this variable name (you can double-click on it in the editor's interface) instead of a hard-coded value.

 

When you want to change the split value, just double-click on its value--it will appear in the data table window's upper left corner--and change the value. The categories will update when you've accepted the new value.

 

I've attached a table where this approach is used.

 

Cheers,

Brady

 

 

brady_brady_0-1620334240368.png

 

sunbears
Level II

Re: Can JMP automatically dichotomize continuous variables while making contingency tables?

This is a good option. I didn't know about table variables! One thing that I like to do is save a script for each of the analyses; in this case, that would be at the different values of variable "Split Value". So there'd be a script for when it's set to 3, 4, 5, etc.  Is there a way to achieve this? I'm not afraid of a little light scripting if that's what would be required.

Re: Can JMP automatically dichotomize continuous variables while making contingency tables?

The answer is "yes", but before you go that route, try this:

1) Implement the table variable and formulas as described above.

2) Run the analysis you want. In the ensuing report, click in the upper-left-most red triangle menu and select Redo > Automatic Recalc. By selecting this option, you are telling JMP to refresh the report whenever the data table changes.

3) Leaving the report open, update the table variable to various values. Since this changes the data table, it also updates the report... so you can run a single report and interact with it just by changing table variable(s).

4) If you like this approach, save the report's script to the data table using the red triangle menu, and you're done.

sunbears
Level II

Re: Can JMP automatically dichotomize continuous variables while making contingency tables?

Also, can JMP automatically calculate the typical inter-rater reliability characteristics from such an analysis? (e.g. overall percent agreement, percept positive agreement)

sunbears
Level II

Re: Can JMP automatically dichotomize continuous variables while making contingency tables?

I found percent agreement (completed with 95%CI) on my own. It’s under Variability / Attribute Gauge Chart. It took some careful review to figure out that the “Grouping” characteristic is fulfilled by Sample name for our design. Seems like this could be under the contingency section of the Fit Y by X analysis, but at least we’ve got the function somewhere.