9
$\begingroup$

If an OP asks for a R library recommendation (policy under debate in another meta thread, I realize), and no acceptable recommendation exists, what is the policy regarding writing and posting code that accomplishes what the OP needs? In case this is out-of-bounds, what is the in-bounds way of suggesting that the conversation move off CV?

This pertains to a recent request for survival analysis software to support data not (obviously) supported by the R library $survival$. There is now a bounty on this request, so I'm being egged on to do something.

$\endgroup$
  • 5
    $\begingroup$ It would help if you would link to the threads that motivate your questions here for context. Are you referring to: Is there a standard way to treat events with unknown times (missing survival time data)? $\endgroup$ – gung - Reinstate Monica Mar 6 at 21:52
  • 2
    $\begingroup$ +1, to whuber & Tim's answers below. Be aware, however, that you are still free to attempt to help the OP & provide an answer in the interim anyway. Eg, you can vote to close as off topic, & nonetheless post an answer. (Nb, this advice pertains to off-topic Q's, not, say, unclear Q's, where an interim answer may make everything worse.) $\endgroup$ – gung - Reinstate Monica Mar 6 at 21:54
  • $\begingroup$ @gung, yes, I am referring to that one, but my question is (I think appropriately) general so that it qualifies as a meta. $\endgroup$ – Peter Leopold Mar 6 at 22:18
  • 2
    $\begingroup$ Your question certainly qualifies for asking on Cross Validated Meta. But it still helps to provide more specific context. You can ask the general question & link to the thread that motivates it. $\endgroup$ – gung - Reinstate Monica Mar 6 at 22:26
  • 3
    $\begingroup$ A bounty doesn't make a question on-topic or even good. It just means, usually, that the OP is willing to spend reputation in pursuit of an answer. (I've been frustrated sometimes that votes to close as off-topic or otherwise deficient aren't allowed while a bounty is on offer.) Note: Sometimes generous people offer a bounty on someone else's question, which they think is a good question. In those cases, it usually is a good question. $\endgroup$ – Nick Cox Mar 7 at 9:52
  • 1
    $\begingroup$ @NickCox, be aware that you can flag such questions. If they need to be closed, we can refund the offered bounty to the OP & close the Q. $\endgroup$ – gung - Reinstate Monica Mar 7 at 12:29
  • $\begingroup$ @gung Wait! Wait! It seems to be the will of the community that the pedagogical quality of the ANSWER is what saves the question. You really shouldn’t close such questions until the answers have come in. Some answers take longer than others. Please don’t leave me stranded with an answer and no question. (That’s a Jeopardy nightmare. Shall we call that a Jeopardy case?) You can refund the reputation, but you can’t refund the time spent on a quality answer. $\endgroup$ – Peter Leopold Mar 7 at 13:23
  • $\begingroup$ @gung Indeed. But the thinking behind the inhibition seems to be that bountied questions should be left as is to take their chance, so I tend to hold back. If -- as has not happened in my experience, but it's a thought experiment -- someone posted an offensive question and bountied it, I would not hold back. $\endgroup$ – Nick Cox Mar 7 at 13:31
  • $\begingroup$ @PeterLeopold That's a grey area. I agree with you that a good answer can save a thread. But how long are we supposed to wait for a good answer to do that? The main principle behind zapping poor questions -- and fairly promptly -- is that if the OP has a better question if they try harder to be clear and specific, then that's fine; otherwise we are not missing anything valuable. $\endgroup$ – Nick Cox Mar 7 at 13:34
  • $\begingroup$ @NickCox How long to wait? The bounty period? Well, I’m new here, and if I find myself in a Jeopardy state (answer with no question) then I expect the moderators would encourage me to ask-answer a new question so I’m not all-dressed-up-with-nowhere-to-go. ;) $\endgroup$ – Peter Leopold Mar 7 at 13:48
  • $\begingroup$ Are you asking specifically about bountied questions? Or generally? I think you're asking about bountied questions and I am confusing the issue by commenting generally. As said, I wouldn't want to close a bountied question unless it was offensive or really bizarre. I once had, as a hypothetical and private example of a completely off-topic question, a question about personal relationships. But then one really did appear; it didn't last long and I wish sometimes I had kept a copy. $\endgroup$ – Nick Cox Mar 7 at 14:02
  • $\begingroup$ @PeterLeopold, it is possible for an answer to save a question, but generally questions should be judged on their own merits. The time & effort to post an answer aren't necessarily wasted. 1) They can help the OP. 2) For off topic Qs that are migrated (eg, to Stack Overflow), the rep transfers there. 3) For off topic Qs that are closed, but stay here, you keep the rep, & if there is an upvoted answer, the thread is not deleted. The only way to lose is if the Q is subsequently closed w/o any upvotes or comments & the answer has no upvotes, then Q's that stay here will be automatically deleted over time. $\endgroup$ – gung - Reinstate Monica Mar 7 at 14:20
  • 1
    $\begingroup$ @Peter Waiting tends to be counterproductive, because during the wait period there is a relatively high likelihood that misleading or irrelevant answers will be posted. Experience teaches that putting a question on hold immediately is the best action to take when there is any concern about what a question is asking. On rare occasions users have flagged questions where they can offer a compelling interpretation and claim they have a good answer to offer; in such cases I have reopened those threads and I imagine other moderators have acted similarly to such flags. $\endgroup$ – whuber Mar 7 at 15:57
15
$\begingroup$

If code is the full answer to a question, then the question is off-topic. When the code illustrates or implements a statistical answer, such as a procedure or algorithm offered in response to a question about statistics or machine learning, then it is almost always warmly welcomed.

$\endgroup$
  • 2
    $\begingroup$ OK, I will focus on how I can teach survival analysis by hand: minimize -log(likelihood) w.r.t. the parameters of the cumulative hazard function, which is should be on-topic, and then illustrate with code, etc. I indicated in my original answer that this is easier than making sense of poorly written manpages, anyway. $\endgroup$ – Peter Leopold Mar 6 at 22:31
12
$\begingroup$

A question asking for software referral is not on-topic, unless it needs some kind of statistical expertise. The same applies to questions about code. So, for example, a question asking about R packages for reading Excel files, plotting social network data, or asking how to implement linear regression in Python, etc. would be off-topic.

On the other hand, asking how to translate some theoretical paper to some practical problem, including implementing it, would be on-topic.

The distinction is often blurry, but the general rule pivots on whether the question asks about programming or about statistics. For me, the easiest way to tell what kind of question it is would be to consider if the question could be answered using pseudocode, ignoring all the language-specific and implementational details. If it can't, it's about programming.

$\endgroup$
  • 5
    $\begingroup$ I like your pseudo-code test, and as @whuber suggests, I will keep the focus on the pedagogy. $\endgroup$ – Peter Leopold Mar 6 at 22:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .