I have fitted a multiple linear regression model with three continuous independent variables and one independent categorical variable. How to visualize or display the fit?
Hello Supratim Guha. I am not a useR, so I will not be able to give you technical advice about how to create graphs using R. However,
I think the useRs who read this will be better able to advise you if you provide a bit more information. E.g., does your model include any interaction terms or polynomial terms, etc.? Or does it have first-order terms only? And are any of the variables focal (i.e., of primary interest) with the others included mainly because you wish to adjust for them? Thanks for clarifying, and best of luck with your work.
It's obviously going to be difficult to try to display all those variables in a single plot.
A) A simple approach is to plot the observed values vs. the predicted values from the model.
B) You could plot the dependent variable vs. one continuous independent variable grouped by the categorical variable. Three plots like this may be informative (e.g. : https://rcompanion.org/rcompanion/images/e_04_04.jpg )
Thanks for your response. I have fitted a multiple linear regression model where three continuous variables and one categorical variable are significantly correlated with the dependent variable. Now I want to show the relationship between them using an attractive plot.
Another approach would be in the form of partial dependency plots (pdps). It is similair to added-variable plots. You can for example display the marginal change of x1 an x2 under the categorical predictor variable. Yet, plotting the observed data becomes tricky and only possible when displayed in one predictor variable, which becomes similair to the added-variable plots (Article pdp: An R package for constructing partial dependence plots