How to create a linear regression graph from this table?I have a table like this:
Patient Drug Result
Patient 1 Drug A 15.0
Patient 1 Drug B 5.2
Patient 2 Drug A 13.1
Patient 2 Drug B 6.0
Patient 3 Drug A 14.5
Patient 3 Drug B 5.0
I basically want to create a linear regression between Drug A and Drug B using all my patient samples. My actual table is a bit more complicated - for example, I have some patients and drugs that I don't want to include. How do I set this graph up in JMP?
Basic Data Analysis and ModelingRe: How to create a linear regression graph from this table?

Re: How to create a linear regression graph from this table?These weren't the solutions I was looking for and I sincerely apologize for not being clearer. My issue was that I didn't know how to put split the numerical data and put each drug on the X and Y axis against each other...without manually copying the data to create a new table. My actual table comes from thousands of .csv files with hundreds of columns. I finally figured it out on my own, however.
As you can see in my screenshots, all I needed to do was to use the Tables>Split function.


Re: How to create a linear regression graph from this table?Hi @BigScientist : Adding to @txnelson suggestion, be careful here. The two drugs are not independent (requirement for 1-way ANOVA). i.e., Patient 1 took both, patient 2 took both, and patient three took both. So, it is the within patient comparison that is appropriate here. This is a paired t-test. You can do this via Matched Pairs, or Fit Model. If your data is organized as above, the Fit Model with Result as "Y" and Patient and Drug as Model Effects will do the trick. And set Patient as Random (highlight Patient then click on Attribute and choose Random Effect).