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

Looping ANOVA to determine most similar group

Hi all, 

I'm looking to loop a procedure that would otherwise be tedious. Potentially, someone may have a better workflow and I'm all ears if you do. For my dataset, I have 5 ethnicities and I'm trying to figure out what ethnicity 2 and ethnicity 5 match best to so I can combine the ethnicities. What I want to do is run an ANOVA and Welche's Test between 2 and the rest of the ethnicities and see if they match and which one matches best. This would only be 4 Tests, but I have 40 different groups as well so this would be a tedious tast to repeat manually. Would there be a way to loop this and somehow automate a formula where is ethnicitiy 2 matches lets say ethnicity 3 best there is a column indicator for that? 

If there are better statistical methods in JMP that can facilitate this as well, I'm all ears. 

Screen Shot 2022-02-17 at 5.02.29 PM.png

M. Dereviankin
3 REPLIES 3
txnelson
Super User

Re: Looping ANOVA to determine most similar group

What you need to do, is to run the steps that need to be done for 1 group.  Then, taking those steps and looping through all of the groups should be a very easy task.

Jim

Re: Looping ANOVA to determine most similar group

I generally avoid dividing the data into separate groups. (There are situations that call for separating data, of course.) I think about a model that might use all the data for the most power and sensitivity, but also account for group differences, if they exist. So what about a linear model that includes ethnicity and the group as effects?

 

Another consideration is the partition method. This model will tend to find the levels that should not be split.

 

Have you tried using two-dimensional hierarchical clustering?

 

Finally, ANOVA is useful when you are testing for a difference. it is not intended when you are testing for similarity. Lack of a significant ANOVA is not evidence for similarity. Equivalence testing is also a one direction test, but in the opposite direction.

Byron_JMP
Staff

Re: Looping ANOVA to determine most similar group

Mike,

Restating the problem. You have lots of levels for one variable, and you would like to combine them to reduce the complexity.

The partition platform does what you are trying to do manually.  It will help you find groups with similar means and then give you the ability to either automatically or manually subgroup by recursively partitioning the data according to a relationship between the predictors and response. Classically it has been used to create diagnostic heuristics. 

 

Analyze>predictive modeling>partition

There is an option to save the leaf numbers. (new group ID's)

 

https://www.jmp.com/support/help/en/16.1/#page/jmp/overview-of-the-partition-platform.shtml#

 

 

JMP Systems Engineer, Health and Life Sciences (Pharma)