# Giving advice without warnings

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?

## 3 Answers

I think it is incumbent on the more knowledgeable, when they give advice, to also inform the asker when their choices may not be particularly suitable.

It's certainly possible to take the position "I just answered the question as asked", and to an extent, I can sympathize with that, but (to take it to an extreme, in order to illustrate a point) imagine someone goes to the doctor with a question like "which is more likely to lead to an improvement in my sore neck - arsenic or cyanide?". The doctor might simply answer the question (presumably by reasoning that since arsenic should kill you more slowly, your neck might well improve before you died), but most people would regard that as very poor advice from the doctor, and argue that in fact the doctor should focus on pointing out that both those options are extremely bad ideas.

So, somewhere between someone asking a question about an innocuous activity, and someone asking about a dangerous one, there's a large spectrum of more or less inadvisable ones, and there are times when we should be saying so.

It's certainly not our job to try to generate some optimal analysis every time; indeed, often simple (if somewhat suboptimal) analyses - if they contain no dangerous surprises - may be actually good advice.

So we have to figure out where to draw the line and when to say "wait, this may not be such a great idea as is". I'd certainly have mentioned something about the issue in that particular case (if I was answering the question), but given the details of the question (it's for "comprehension purposes") I wouldn't have downvoted your earlier answer (and didn't when I read it). The OP doesn't appear to be attempting inference (tests, CIs, standard errors, etc), so the issue of heteroskedasticity is more about efficiency. I don't think it's necessarily that huge a deal; suitability (or unsuitability) of the model for the mean would worry me more.

So while I wouldn't downvote in your case, there is some further point along the spectrum of questionable actions at which I'd say "actually, that's not good advice"

Ideally someone comments about what the problem is when they think there's a big enough problem to downvote, but it doesn't always happen (and you have no way to know who downvoted you if they don't tell you they did). The best thing you can do is try to understand people's comments and where it makes sense, try to accommodate them.

I'm quite sure it's not a formal rule. Though it's clearly a sound principle (& recall that answers are for all future readers, & not just the original asker of a question) it can be hard to know where to draw the line in particular cases. At any rate people are entitled to down-vote according to their own opinion of which side of the line an answer falls on. Common practice here (again, not a formal rule) is for down-voters to explain their reason & to reverse the down-vote if the answer is edited to remove that reason.

Note that the commenter in this case didn't explicitly say he down-voted your answer, so there's a possibility it may have been someone else.

My opinion on this particular case, for what it's worth, is that the evident heteroskedasticity in the example data set merits a mention at least, & that your edit in response to criticism does improve your answer (+1).

To echo others: the comment was not presented as a formal rule, and is not a formal rule. It's itself advice, and good advice so far as it goes, but clearly more could be said.

My own view for the question discussed is that advising people to consider quadratics, let alone higher-order polynomials, is advice somewhere between dubious and misguided. That's naturally a judgment call. Positively, I say that because fitting exponential decline seems a much, much more natural starting place. Negatively, I say that because quadratics and cubics may be non-monotonic and may predict negative prices and may even do either within the range of the data. That's difficult to defend when better models appear to be better starting places. Indeed, to my eye a quadratic is predicting negative prices within the range of the data.

Otherwise put, in this specific case, quadratics and cubics won't even necessarily solve the perceived problem of negative predictions.

More generally, recurrent issues:

1. It may be advisable to tailor advice to the perceived level of the question or questioner. That is always tricky, and not just because it may be hard to estimate. (In this specific case, the OP does not seem to grasp exactly what logarithms imply.) The stance of the forum is that questions and answers of real value should always be of interest to people other than the OP, much though many posters have interest only in their own immediate question. So, often there is a judgment call on addressing a very specific question directly or trying to broaden it, or even to shift it in more interesting or useful directions. (But advising that the OP needs help from a professional with greater expertise is often the right thing to do.)

2. Imparting caution is advisable, almost always. Often a question can be answered at least in part, but a complete answer on what should be done depends on any or all of (a) knowledge of the real goals of the analysis (b) explanation of the underlying scientific or practical context (c) access to a dataset. It is common that any or even all of those are not given adequately to allow a full answer.

3. Rewriting the question may be needed. Sometimes the question needs even to be turned around completely if the OP is not to remain wrong or confused. For example, it is common for posters to focus on some detail of significance testing when the larger unstated question implies that the test they are using is inappropriate or some quite different focus is needed.