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
MPK
MPK
Level II

Is there a way in JMP16 to provide a user-defined reference distribution for a one-sample KS test?

Hello JMP users,

 

I'm trying to analyze the distribution of fluorescent cellular features, such as nuclei, along a linear scan through a layered tissue.  In healthy tissue there is a highly reproducible pattern but in diseased areas the pattern is altered.  I'd like to test statistically whether the pattern in a selected region is different than that of healthy tissue.

 

The Kolmogorov-Smirnov test has been suggested as an approach to compare two distributions. I thought it might be useful to create a user-defined reference distribution from many scans of healthy tissue and then compare scans of diseased tissue against this reference distribution in a one-sample KS test.

 

Is there a way in JMP16 to enter a user-defined distribution as the reference distribution?  

 

If not, would repeated two-sample KS tests using the user-defined reference distribution be the best approach?

 

Thanks for your time and help in advance.

3 REPLIES 3
jthi
Super User

Re: Is there a way in JMP16 to provide a user-defined reference distribution for a one-sample KS test?

I'm not exactly sure sure if this is what you are looking for, but the data has to be in specific format for KS to work ( Re: non parametric KS test of two samples )

 

Data is is JMPs Big_Class sample data which looks like this:

jthi_1-1642230370805.png

 

Script to run Kolmogorov Smirnov with height as response and x as factor

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
obj = dt << Oneway(Y(:Height), X(:sex));
obj << Kolmogorov Smirnov Test(1);

Result:

jthi_0-1642230341549.png

 

If this is what you are looking for, you might be able to add the reference data to same column as the the rest of data and then separate them in grouping column:

jthi_2-1642230773881.png

 

-Jarmo
MPK
MPK
Level II

Re: Is there a way in JMP16 to provide a user-defined reference distribution for a one-sample KS test?

 

 

Hi Jarmo,

 

Thanks very much for clarifying the specific format for a two-sample KS test in JMP16 and providing a script for running the analysis.

 

My question was whether I could define my own user-defined distribution to serve as a reference for a one-sample KS test, which as I understand it compares an experimental distribution with a reference distribution (for example, a normal distribution).  My plan was to create a reference distribution based on analysis of healthy tissue that would be compared with experimental distributions from diseased tissue in a one-sample KS test.

 

Is it possible in JMP16 to add a user-defined distribution as the reference distribution for a one-sample KS test?

 

Cheers,

Mark

 

txnelson
Super User

Re: Is there a way in JMP16 to provide a user-defined reference distribution for a one-sample KS test?

You can add the normal data to the data table as a new column, and then simply stack the data and run the Oneway platform.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "Normal",
	formula( Random Normal( Col Mean( :height ), Col Std Dev( :height ) ) )
);
dtStack = dt << Stack(
	columns( :height, :Normal ),
	Source Label Column( "Label" ),
	Stacked Data Column( "Data" )
);
obj = dtStack << Oneway( Y( :data ), X( :label ) );
obj << Kolmogorov Smirnov Test( 1 );
Jim