This question is clearly off-topic on Stack Overflow (it asks for package recommendations). However, as the answer shows it should be (possibly with some minor revision) a good fit for CV. So why was it migrated?

• I think the part where it says "..or some R code available to compute standard errors for LASSO predictions" played a major role for the decision made. Also, the custom closing reason on SO: "questions asking for code" does not exist anymore. However, I also believe there is room for discussion about if it should be migrated or not. – Andre Silva Mar 26 '14 at 13:54
• @AndreSilva The relevant closing reason is "Questions asking us to recommend a tool, library, or favorite off-site resource are off-topic for Stack Overflow ..." – Roland Mar 26 '14 at 14:04

I think the decision to migrate my question reflects an over-zealous concern by the moderators for maintaining a strict separation from SO. Questions about software are appropriate on CV. The FAQ (I wrote the first version) includes "statistical and data-driven computing". Asking what package implements a specific procedure falls directly into that category.

Also, the question is not appropriate on SO because I wasn't asking a programming question.

I disagree with @gung that CV questions should only be asking about "a statistical (machine learning, etc.) concept / principle". That is clearly too restrictive according to the FAQ (or whatever it is now called at https://stats.stackexchange.com/tour).

If it is inappropriate to ask a question about software on SO or CV, where should it be asked? I think it is reasonable to think that all (good) questions should have a home on the SE network, and so I do not agree that the question needs to be shunted off to one of the R lists.

I could have written the question differently as @gung has suggested, but then it would be a different question, and not the one I wanted answering.

So my view, for what it is worth, is that the question is a good fit for CV and does not need revising.

• In this case I agree that the question belongs on CV, but the wider issue remains difficult. I think it is easy to identify questions that fall between CV and SO. For example, someone posts a project description and then asks for complete code. Or someone posts a long program and then asks for debugging. On the other hand, those who think that any question on statistical computing belongs somewhere on either site should advise on what happens to kinds of questions that in practice no-one wants to answer. As we don't ever promise that all questions will be answered, they could just lie there. – Nick Cox Mar 27 '14 at 1:02
• Since even relatively new users like me can vote to close pending migration (I voted against migration in your question's case), I'm not sure blame rests with the mods, as to some extent I expect they try to act on the votes of other users like us. Because the issue is very debatable as we've seen lately, I'm afraid there's some lack of clarity on where to draw the line. This probably most affects non-mod users like me who don't fully understand the issue and tend to vote in support of those who seem to. More reason for us to work harder at defining a line clearly so we can resolve confusion. – Nick Stauner Mar 27 '14 at 2:16
• I have only been here for about a year, but no topic seems to arise so much on meta and elsewhere. Long debates about six months ago produced no change in the policy encapsulated at stats.stackexchange.com/help/on-topic; namely, ask software authors directly about possible bugs; if it needs statistical expertise to understand or answer, ask it here; if it's about an algorithm, routine data processing, or details of the language, ask elsewhere. But it still takes close reading to distinguish questions like Rob's from code review or tell me the code or package to use questions. – Nick Cox Mar 27 '14 at 13:22
• @NickS As a moderator I pay attention to how others are voting and use that to understand how the community feels about issues. However, I make decisions independently and do not "try to act" on your votes; sometimes I find my vote is in the minority. Over time and with experience my view has evolved to where it is pretty closely aligned with what Rob Hyndman expresses here: we should be allowing a broad definition of on-topic questions. I still draw the line at "write code for me" or "what did this program/app/script do wrong" or "what is the command to do x in system y" questions. – whuber Mar 27 '14 at 15:07
• @whuber: Glad to hear it, but not at all surprised. Your process sounds exactly like what I'd meant by "to some extent" :) Thanks for your perspective. It seems the third class is most contentious. Arguably, x $=$ standard errors for LASSO prediction and y $=$ R. If you agree with @Rob but draw your line before this, I wonder if this means you think there is a truly off-topic element in the OP-linked question (the last sentence), but feel the question is on-topic overall. Maybe because it required statistical expertise to provide a negative but useful answer? – Nick Stauner Mar 27 '14 at 20:26
• I'll have to follow up on this later, but I don't see any meaningful difference between What is the code to do ROC analysis in R?, which everyone seems to agree would be off-topic, & What is the package to do ROC analysis in R?, which I think is equally off-topic. – gung - Reinstate Monica Mar 27 '14 at 22:45
• @gung I perceive a subtle distinction between the two. "What is the code" is asking for commands or operations within a computing system or application that is known to provide a particular service or computation. "What is the package" is seeking a new capability that is presently unavailable. Although the relationship is extremely close, I believe the knowledge needed to answer, as well as the nature of the potential answers, differs distinctly. The latter bears a close relationship to questions about books or Internet resources, which are on topic. – whuber Mar 28 '14 at 15:28
• @whuber, the analogy to books is interesting, but I don't think I agree. The answer to the 1st question is pred = prediction(predict(mod, type="response"), y); perf = performance(pred, "tpr", "fpr"); plot(perf). The answer to the 2nd question is "Try ROCR". Both answers are accurate, complete, & include no statistical information at all. W/ books, the OP presumably doesn't know or understand something about statistics & answers pointing the OP towards specific references convey statistical information indirectly. – gung - Reinstate Monica Mar 28 '14 at 20:07
• I see what you're saying. I could stretch the point a little and note that "Try XXX" can say a lot, because (1) the existence and name of "XXX" are useful information for the statistician and (2) "XXX" likely comes with documentation; at a minimum, it is a useful tool to supply statistical information. I think the best way to press your point would be to focus on how broad or narrow the information might be: an add-on to a statistical package is useful and understandable only to people using that package, whereas books and Web sites should be universally intelligible and useful. – whuber Mar 28 '14 at 20:18

Software-specific questions have always been a touchy subject here. When questions are only about how to do something in R, or what does this error message mean, or what is the code for, or what is the package for, are off-topic for CV. However, it can be tricky. For what it's worth, my rule is simple: what does the OP need explained? If it is a statistical (machine learning, etc.) concept / principle, then it belongs here; if it is something about the language / software, it doesn't. In the case of that thread, the answer was ultimately about the current state of statistical science on the topic, so I would agree that it belongs on CV. But, that was presumably not known to the migrators of the thread.

In addition, another point about migration of R-related threads needs to be made clearer here on CV. In the little that I follow SO, and in the discussions about migration of R questions, it has become apparent that any R-related question needs to have a reproducible example to be on-topic on SO. That is, it needs some minimal data and code that will allow potential answerers on SO to reproduce the issue. That question did not have such, so I wouldn't have voted to migrate (I would have voted to close, though--mistakenly given the true nature of the answer). I think that question was tricky in that it seems to be of such a nature that it doesn't need a reproducible example. But my understanding of on- / off-topic criteria for R questions on SO is that they construe programming questions quite narrowly. That is, since it wouldn't need a reproducible example, it is off-topic.

Another issue, I think, is that people seem to believe that all questions should have a home somewhere in the SE system. This belief leads people to think, 'it's either on-topic here or on SO, and it's not on-topic here, thus by disjunction, it must be on-topic on SO'. However, many R (Stata, SAS, SPSS) related questions will not be on-topic on either site, but should be asked on the r-help-listserv (statalist, etc.). That is where I would have encouraged the OP to ask.

As far as I know, the requirement of having a reproducible example on SO is not so rigid for other languages (e.g., Python, SAS, Stata, MATLAB, etc.).

Personally, I would be fine, given the answer, if the question were migrated back to CV. (I might edit the question to say something like, 'why doesn't there seem to be a package for LASSO standard errors, are they difficult to compute?', though, to make it easier to find, and easier to see it's statistical nature.)

• There is not exactly a requirement for a reproducible example on the SO R-tag. It's only encouraged rather strongly to include one. But that only concerns the quality of a question and not if it is on-topic. – Roland Mar 26 '14 at 14:30
• +1 (more) for "people seem to believe that all questions should have a home somewhere in the SE system". For example, many, perhaps most, Stata questions on SO are learner-users wanting code. They tend to get tolerated, but people are often warned that they should try writing code. – Nick Cox Mar 26 '14 at 19:10
• I would consider 'or what is the package for' as on topic here. It is part of domain knowledge for a statistician. – user603 Oct 19 '16 at 7:58

This is not a particularly great question for Stack Overflow. I wouldn't necessarily have closed it if it had been asked there, but given it was originally asked here and arguably isn't wholly inappropriate I'm not going to waste time trying to re-write it to fit somewhere else - y'all can edit / answer / close / continue discussing as you feel appropriate.

Since it did collect an additional answer on Stack Overflow (from a member of this site), I migrated it back and closed the original as a duplicate (and then deleted the original just to simplify things - all outstanding links will now redirect to the most recent version of this question).

Remember: migrations are fairly permanent unless you get moderators from multiple sites involved in cleaning them up. Generally you'll want to avoid migrating borderline questions, since it just makes things difficult.

• +1, most especially for the caution on not migrating borderline questions. I think it's been a particular problem lately - questions which look to me to have at least an on-topic element are being migrated because they mention code, when often all they need is a minor edit to make them clearly on topic here; often the OP is more than happy with that and will make changes themselves if encouraged to do so. – Glen_b Mar 28 '14 at 0:41