- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to create a linear regression graph from this table?
Or you could use the Fit Y by X platform and compare the 2 drugs
It is not possible to perform a linear regression on the data since there is not a defined numerical measurement used to define the difference between Drug 1 and Drug 2. Some statistical camps might suggest setting drug A to 0 and drug B to 1, however I believe what you really want is to know if there is a statistical difference between the drugs. The Oneway Analysis will show if there is a statistical difference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.