Subscribe Bookmark RSS Feed

changing how many decimal points are displayed

joechicago

Community Trekker

Joined:

Aug 10, 2011

I am working in JMP 8 for Mac, Fit X by Y, doing a contingency analysis, and am most interested in the contingency table.

How do I fix the display of percentaghes so that there are no decimal points, only whole numbers?

Where can i find this sort of informastion in the user manuals?

Thank you for your help!!

- Michael D.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

The contingency table does not appear to be editable (I work in JMP 9 for Mac) but you can export it into a data table by selecting "make into data table" from under the red triangle. The nr of decimals can then be set for the columns. This can also be scripted as in the example below (the first part borrrowed from the example found in Help/Displaybox Scripting/CrossTabBox).

Open( "$ENGLISH_SAMPLE_DATA/Alcohol.jmp" );

c = Contingency(

          Y( :Relapsed ),

          X( :Alcohol Consumption ),

          Freq( :Count ),

          Contingency Table(

                    Count( 1 ),

                    Total %( 1 ),

                    Col %( 1 ),

                    Row %( 1 ),

                    Expected( 0 ),

                    Deviation( 0 ),

                    Cell Chi Square( 0 ),

                    Col Cum( 0 ),

                    Col Cum %( 0 ),

                    Row Cum( 0 ),

                    Row Cum %( 0 )

          )

);

cr = c << report;

ctb = cr[CrosstabBox( 1 )];

Print( ctb << Get As Matrix );


dt=ctb << make into datatable;

for(i=1, i<= ncol(dt), i++, if ((column(dt,i)<<get data type)=="Numeric",column(dt,i)<< format("fixed dec",0)));

2 REPLIES
Solution

The contingency table does not appear to be editable (I work in JMP 9 for Mac) but you can export it into a data table by selecting "make into data table" from under the red triangle. The nr of decimals can then be set for the columns. This can also be scripted as in the example below (the first part borrrowed from the example found in Help/Displaybox Scripting/CrossTabBox).

Open( "$ENGLISH_SAMPLE_DATA/Alcohol.jmp" );

c = Contingency(

          Y( :Relapsed ),

          X( :Alcohol Consumption ),

          Freq( :Count ),

          Contingency Table(

                    Count( 1 ),

                    Total %( 1 ),

                    Col %( 1 ),

                    Row %( 1 ),

                    Expected( 0 ),

                    Deviation( 0 ),

                    Cell Chi Square( 0 ),

                    Col Cum( 0 ),

                    Col Cum %( 0 ),

                    Row Cum( 0 ),

                    Row Cum %( 0 )

          )

);

cr = c << report;

ctb = cr[CrosstabBox( 1 )];

Print( ctb << Get As Matrix );


dt=ctb << make into datatable;

for(i=1, i<= ncol(dt), i++, if ((column(dt,i)<<get data type)=="Numeric",column(dt,i)<< format("fixed dec",0)));

joechicago

Community Trekker

Joined:

Aug 10, 2011

Thank you for your prompt and helpful reply!! 

- Michael D.