Hello, I am a new and unexperienced user of JMP working on my PhD thesis. I simply cannot find out how to compare a part of my data and I need assistance. My data consists of 146 columns with either 1 or 0 (yes/no) for 146 medical conditions respectively. I have about 14000 rows (patients) to compare this data from. I need to find out the order for the most common combinations for two medical conditions in the same person. How can I do that?
very grateful for help,
Emma
I have created a sample script, that generates an example data table to run the analysis on. I only am creating 100 rows of data because it takes a while to create the pairs of data. The resulting table provides the count of the number of patients each combination of medical conditions were found in.

The script will take a good bit of time if you run it on all 14000 patients at once. You can easily run it on subsets of the data, and then combine the resulting tables.
Names Default To Here( 1 );
dt = New Table( "raw Data" );
dt << add rows( 100 );
dt << New Column( "Patient", set each value( Row() ) );
Try( dt << delete columns( "Column 1" ) );
For( i = 1, i <= 146, i++,
dt << New Column( "Med Cond " || Char( i ),
set each value( Round( Random Uniform( 0, 1 ), 0 ) )
)
);
// Create the paired data table
dtPair = New Table( "Pairs",
New Column( "Patient" ),
New Column( "First Med Cond", Character ),
New Column( "Second Med Cond", Character )
);
//Populate the Pairs Table
For( theRow = 1, theRow <= N Rows( dt ), theRow++,
For( theFirstCond = 2, theFirstCond <= N Cols( dt ), theFirstCond++,
If( Column( dt, theFirstCond )[theRow] == 1,
thePatient = dt:Patient[theRow];
firstCond = (Column( dt, theFirstCond )) << get name;
For( theSecondCond = theFirstCond + 1, theSecondCond <= N Cols( dt ),
theSecondCond++,
If( Column( dt, theSecondCond )[theRow] == 1,
dtPair << add row( 1 );
pairRow = N Rows( dtPair );
dtPair:Patient[pairRow] = thePatient;
dtPair:First Med Cond[pairRow] = firstCond;
dtPair:Second Med Cond[pairRow] = (Column( dt, theSecondCond )) << get name;
)
);
)
)
);
dtSummary = dtPair << Summary(
Group( :First Med Cond, :Second Med Cond ),
Freq( "None" ),
Weight( "None" )
);
dtSummary << sort( by(N Rows), order(descending), replace table(11));Hi @EmmaLT ,
I think I have an idea of how to do what you're asking about, but it would help if you could share some of your data -- you can anonymize it if need be. It doesn't need to be the whole data set, just a subset so that I can better understand how the data is structured as that might impact how to do the analysis.
DS