Hi @txnelson and @SDF1 , I can hopefully clarify the request and maybe focus the scope a bit. I work with @LinkageBee996 so he asked me to help clarify.
The current workflow is as follows:
1) Start with the data table that @LinkageBee996 shared. To simplify things I'm going to ignore the year column and focus only on BMI.
2) Perform a simple two-sample t-test comparing each of the Subject ID's that are labelled as 'No' for reference to the Subject ID (A1454) that is labelled as 'Yes' for reference for a total of 5 comparisons (there's a reason we're doing this vs. doing something like a dunnetts test). We currently do this one-by-one by using the local data filter in the oneway platform under 'Fit Y by X'
3) Currently the results of the t-test (p-values and such) are then manually transcribed to a blank file (CSV or JMP table). Since we're doing one test at a time, using the 'Make into Data Table' is not practical as you end up with as many data tables as you have comparisons, then would need to combine into single data table.
We'd like to automate this part of the analysis that is future proof for any new subject ID's that we may be testing, so the script should (in whatever order makes the most sense) do the following. This is what makes sense in my head from doing similar analyses in python and other software:
1. Create a list of the 'Non-reference' IDs
2.For each non-reference ID, perform a one-way analysis and two-sample t-test comparing it to the Subject ID that is labelled as 'Yes' for Reference (and let us assume that there will always be exactly one of these)
3. Save the results of the t-test to a data table. One note here: the default formats of 'make into data table' and 'make combined data table' don't save some of the metadata of the comparison - e.g., it'll tell your column header (X is subject ID, Y is BMI) but it won't tell you what the two values for X are like is shown at the top of the t-test results UI in the analysis ( 'A1454-B8565'). We would want to capture this information - you're comparing two things, what are the two things you're comparing?
4. Combine all the t-test results of every comparison in the dataset into a single data table. From there it'll just be a data manipulation problem that we can probably figure out to get it into whatever format is most useful
Hopefully this will provide some more clarity, let us know if there's still ambiguity around this