0

my question is as simple as that

what is the easiest (dumbest) way of plotting a simple slope for the below linear model

'''lm(Y~ X1 + X2 + X3)'''

Thanks!

  • I forgot to say Hello :") – Mudar Saied Dec 15 '20 at 06:55
  • 3
    If you have multiple covariates (X1, X2, X3), you'd need a 4D plot which is pretty hard to create in our universe. So it's not exactly clear what type of plot you are trying to create. It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Dec 15 '20 at 07:25
  • 1
    I appreciate your sense of humor in the morning @MrFlick – jay.sf Dec 15 '20 at 08:12
  • 1
    As @MrFlick is saying, if you have three predictor variables and one outcome variable, then to plot this you would need to have an axis for the outcome variable, and an axis each for the other three variables. The "slope" in this regression is not a slope at all, but a 3-D section of a 4-D hypervolume. There are actually ways to represent this, but they depend very much on your data. If one is a factor, you could use a faceted heatmap. If two are factors, a dodged bar plot would do. If they are all continuous then it's harder but there are still visualization options. We need more info to help – Allan Cameron Dec 15 '20 at 09:09

0 Answers0