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
cli
cli
Level I

Linear regression help

Hello,

I am working on a research project and am trying to perform a pretty basic comparison between a few variables in my data.  I have a list of categorical variables (age, initially had pain at onset of symptoms, initially had bladder symptoms at symptom onset, etc) and I am trying to correlate the presence of these variables with a categorical variable at early or late follow up (pain at follow up, need for a gait aid, need for catheter).  

 

I have done a fit X by Y linear regression with the categorical variables and each dependent outcome.  What I am trying to do next is to account for the fact that the time to follow up is different for each subject, and to control for this.  

 

For example, in my set of subjects the presence of bladder symptoms at symptom onset is correlated with the need for catheterization at follow up.  However, the range of time to follow up is variable between subjects, and can be anywhere from 10 days to 300 days, as that was when they were next evaluated.  

 

What would be the easiest way to analyze the correlation between my two categorical variables while controlling for a continuous variable (time to follow up) and to display this as an odds ratio?

 

Thank you.

8 REPLIES 8
ryandewitt
Community Manager Community Manager

Re: Linear regression help

I'd would be happy to take a go at this. I made up some data based on your post and entered the onset pain as a value 1-10, bladder symptom severity 1-10 and entered an improvement percentage 0-100. I then ran a Fit Model without interactions to start.  My goal is to increase improvement values for all patients and also know which gender and age have increased sensitivity. In the Fit Model platform I entered my desired response (improvement), then I  added a Profiler under the Report's Red Triangle>Factor Profiling >Profiler. We can now can interactively discover the correlations between each or all of the variables and maximize anyone of them.  I'm sure other folks here may have a different or more effcient approach.  My fictional patient data and attached Fit Model report is attached, just run the script in the tables panel on right by right-clicking > Run Script or if you have JMP 13 click the green arrow to launch the Model. Have a great day. 

 

Ryan DeWitt - JMP User Enablement | Creative • Video • Design • Learning
cli
cli
Level I

Re: Linear regression help

Thanks for your very detailed response.  For my data, the presence of pain/bladder symptoms is a nominal variable (yes/no) and response time is continuous, as detailed in your explanation.  Would the process be similar, or would there need to be additional steps needed to have a meaningful odds ratio after controlling for response time?

ryandewitt
Community Manager Community Manager

Re: Linear regression help

You bet! You can see in the Profiler, I do have a categorical value, gender, and we can examine it's effect on the other variables, its correlation with the entire model.  I was suggesting Fit Model vs. Fit YX because you have multiple variables influencing your response (Y) which can theoretically interact significantly with the others. .i.e. an older patient (Age) whom does not receive a followup 20+ days post procedure, without new medication intervention is most likely to result in a chronic case long term case. I suggest entering your data using a Fit Model, or wait to see if another Community member has a different approach. My intention of making the pain/bladder a continuous variable was to extract more intel out of the patient and possibly show progression over multiple patient visits, which is beyond your study.  Pain is usually subjective as well as the Bladder symptoms. "Well Doc , they're almost gone (8) however I have no pain (0)" 

 

Cool project. Let us know how we can help further. 

Ryan DeWitt - JMP User Enablement | Creative • Video • Design • Learning
cli
cli
Level I

Re: Linear regression help

One last question.  In my attached example using the fit model shown, I'm just wondering how to report this in my manuscript as an odds ratio?  Essentially, I want to be able to say, "when adjusted for time to follow-up using a multivariate logistic regression, the presence of pain at initial presentation was associated with pain at early follow up (odds ratio [OR]  X, 95% CI Y–Z, p = ?).  Looking at the output in my data, I'm having a hard time with all of the data that's being spit out to plug it into this statement (my understanding of statistics is rudimentary at best).  Thanks for your help.

ryandewitt
Community Manager Community Manager

Re: Linear regression help

Glad to answer. Could you attach your Fit Model to the data table by selecting Save Script to Data Table under red triangle in the Fit Model or use the icon in the tool bar, then re-upload.

Ryan DeWitt - JMP User Enablement | Creative • Video • Design • Learning
cli
cli
Level I

Re: Linear regression help

Here it is.

ryandewitt
Community Manager Community Manager

Re: Linear regression help

You need to answer that question (or Stat formula) with an additional setting turned on in a JMP report.  In both Fit Model and Fit Y by X we can toggle on Odds Ratios under the red triangle to get exactly what you're looking , just right click in that report over hover over items to recieve tools tips.  See annotated images below. 

 

Here is more on Odds Ratios from our JMP Docs

The Library of Medicine has some great content online on this topic. Explaining Odds Ratios

 

odds_ratio_fit_YX.jpegodds_ratio_fit_model.jpegi

 

 

 

 

Ryan DeWitt - JMP User Enablement | Creative • Video • Design • Learning
ryandewitt
Community Manager Community Manager

Re: Linear regression help

Hope these solutions helped with your project. If one of our suggestions worked for you please kindly click the Accept as Solution button.  Good luck with your project.  And let us know how we can further help you. 

Ryan DeWitt - JMP User Enablement | Creative • Video • Design • Learning