cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
ezorlo
Level IV

print p-values of statistical analysis to a column

Dear Community,

My data table has ~5000 rows with three columns: OTU ID, condition, Relative abundance

I performed a one way Y - X analysis with the designations: condition (X), Relative Abundance (Y) and OTU ID (By) 

In the one-way analysis report I have to manually check each of the OTU ID for significance effect of condition in e.g. ttest or ANOVA

Is there a way to make JMP print a new column in my workbook with the p-value for the desired statistical test without going through the entire report (there are hundreds or even thousands of tests to look through)

Thank you     

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: print p-values of statistical analysis to a column

JMP generally makes it very easy to do this kind of thing, though (if you want to use a script) the details will depend on which test you want to use (more specifically, on the structure of the report that the platform generates). The script below is a simple example:

 

NamesDefaultToHere(1);

// Sample Data
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");

// One way ANOVA with a 'By' group
ow = dt1 << Oneway(	Y( :height ), X( :age ), Means( 1 ), Mean Diamonds( 1 ), By( :sex ));

// Find the table you want in the report, do a right-click and select 'Make Combined Data Table'
dt2 = Report(ow[1])[TableBox(2)] << makeCombinedDataTable;
dt2 << setName("Oneway ANOVA Results");

But just because something is easy does not make it good practice. If you are doing lots of statistical tests, I strongly recommend that you read about Response Screening

View solution in original post

4 REPLIES 4
ian_jmp
Level X

Re: print p-values of statistical analysis to a column

JMP generally makes it very easy to do this kind of thing, though (if you want to use a script) the details will depend on which test you want to use (more specifically, on the structure of the report that the platform generates). The script below is a simple example:

 

NamesDefaultToHere(1);

// Sample Data
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");

// One way ANOVA with a 'By' group
ow = dt1 << Oneway(	Y( :height ), X( :age ), Means( 1 ), Mean Diamonds( 1 ), By( :sex ));

// Find the table you want in the report, do a right-click and select 'Make Combined Data Table'
dt2 = Report(ow[1])[TableBox(2)] << makeCombinedDataTable;
dt2 << setName("Oneway ANOVA Results");

But just because something is easy does not make it good practice. If you are doing lots of statistical tests, I strongly recommend that you read about Response Screening

ezorlo
Level IV

Re: print p-values of statistical analysis to a column

Thank you I basically went with response screening using my "By" column as a grouping variable and it printed a table with P-values for each grouping variable that I was able to filter for <0.05

This immensely helped!!

However... what is the default statistical test that is being run, i.e. what does the p-value correspond to if I dont select any options and just run the dialog?

Re: print p-values of statistical analysis to a column

Adding to @ian_jmp , just right-click on one of the tables with p-values and select Make Into Combined Table.

ezorlo
Level IV

Re: print p-values of statistical analysis to a column

Hi Mark,

This did not work for me, it made a data table with only five of the several hundred tables, also the p-values were not organized properly