In this post, a user was regressing car price on mileage. The user wrote:
I'm trying to modelize a simple use case : predicting the price of a car based on its mileage, with RStudio. I know it's a really naive model, juste one variable but it's for comprehension purpose.
Thus, explicitly acknowledging the shortcomings of their naïve approach.
The problem that the user was experiencing was that with a simple linear regression, they obtained negative predictions. They asked:
How to get a curve instead of a straight line ? I suppose that lm can only generate straight lines (ax1+bx2+....+A)
and also showed what they were looking for:
I'd like to get such visreg (red curve) :
I answered saying that you can easily get curves in R by including quadratic (or higher) terms in the
lm command. I also suggested nonparametric regression, as that can also yield smoother and curved regression lines.
What surprised me was that my answer was downvoted because I didn't supply a warning about heteroscedasticity, and I was told that
On this site, even if OP asks for it, you should not give advice that would get them into trouble; at least not without a warning.
Is this really a formal rule of this site? It seems to me utterly pointless in this situation to point out possible modeling problems when the OP herself starts out by pointing out that this is a naïve approach. I think it is quite obvious that a good model with good possibilities for making inference is not the objective -- the question is about how you get a curved line! Was my answer insufficient and/or misleading and not meeting the standards of this site?