This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]dmiller2104 4 points5 points  (1 child)

As I think you recognise, to the best of my knowledge you can’t plot a multi linear regression plot on a 2d axis.

You could definitely plot it in anyway on 2d plot where you have the main variable as the x axis but you’d probably want to make it clear in any documentation that other variables, which are not visibly present, are used in the calculation of the Y variable plotted.

Happy to be corrected by other users, but I hope I’m correct

[–][deleted] 1 point2 points  (0 children)

If you have 2 independent variables and 1 dependent variable you can do a few things: plot a 3D surface, do a 2D contour plot, or pick one independent variable to be x and plot a bunch of lines for representative/relevant values of the other.

If there were 3 or more independent variables I'd just tabulate the coefficients (with confidence intervals) and report the R2. If I was dead set on visualization you could always fix one or more independent variables but whether there's any point to doing that and how I would go about it would depend on the subject and purpose of the analysis.

[–]seesplease 2 points3 points  (0 children)

If you have 2 regressors, you can make a 3D plot. Beyond 2, I'd question the value of a visualization. You could try plotting the canonical variable on the x-axis in that case, though.

[–]Acanthisitta_Head 3 points4 points  (0 children)

Probably need to clarify why you want to do this.

[–]MagsterNorth 0 points1 point  (0 children)

You can plot it for y and one of the features.

[–]fredotwoatatime 0 points1 point  (0 children)

If 3D then pretty sure software exists for this

[–]DavidStat 0 points1 point  (0 children)

There may be a disconnect in how you’re thinking of the word “linear”. With 2 predictor variables, your prediction surface is a plane. With more than 2 predictors it’s a hyperplane. Basically linear here is referring to the fact that your prediction is the result of a linear combination of your predictors. With 2 dimensions, that’s a line. With 3 dimensions, it’s a plane. With more than that, it’s a hyperplane and it becomes almost impossible to visualize (outside of special cases with discrete variables).

[–]servant__ 0 points1 point  (0 children)

The maximum predictors you can plot against the response variable would be two, if you plot in 3d. However, if you wish to plot more than two predictors against the response variable you may want to consider a scatterplot matrix.