Line of best fit

Hi. I'm doing a multiple linear regression in R with 3 independent variables. How do I draw a line of best fit through that

Here's an article that should help: Multiple Regression Analysis in R - First Steps by Felipe Rego

For future reference, it's easier to help you with this kind of problem if you include a small sample of your code to illustrate what you're talking about.

For pointers specific to the community site, check out the reprex FAQ.

1 Like

Thank you very much . I appreciate

@mara I assume your suggestion is serving the purpose of @WinLamp and without reprex it is almost impossible to guess what is the exact meaning of the original question. However, my thinking is drawing hyper-plane will fit in 3 independent variables case only if one of the independent variable is categorical isn't it?

Yeah—I'm just pointing to a basic multiple regression analysis in R post, since I don't know the specifics.

1 Like