8
$\begingroup$

I'm fairly new to stackexchange so bear with me.

I have a code review for some lines of matlab over at https://codereview.stackexchange.com/questions/8165/code-to-generate-graph-in-matlab-review-for-best-practice-or-speedup. It's not had any replies, for whatever reason, and that's fine, of course. My instinct was to post it at stats.stackexchange originally because then it's much more likely to be seen my people who know their matlab (and r) but I went with code review because it appeared to be the sensible option - was this the correct action or would matlab/R based code-reviews be acceptable at stats.stackexchange?

$\endgroup$
9
$\begingroup$

I hope our FAQ is clear on this: purely programming-related questions belong elsewhere. Our site is for questions of statistical interest. If that seems ambiguous, then we would be very glad of any suggestions to clarify it.

Nevertheless, sometimes a little creative thinking can re-cast a question from one form to another. If the issue concerns, say, running a simulation or visualization to answer a statistical question and the simulation (or whatever) is too slow to be practicable, then a question of the form "I'm trying to solve this statistical question with a simulation (or whatever) but it's too slow; what can I do?" would be on-topic here and in fact would be likely to elicit some out-of-the-box answers that might be far better than you would get just by trying to speed up the code. In your case, the question you reference doesn't even tell us what statistical problem the code may be trying to solve, so you definitely need to rewrite it before it could be construed as statistically interesting.

$\endgroup$
5
$\begingroup$

In agreement with whuber, a base "code review" with no other information is probably off-topic, and more appropriate for Stack Overflow.

That being said, I can think of some code review/debugging questions that feel much more on topic for CrossValidated. Just off the top of my head:

  • As whuber said, questions involving really large data sets, slow code, etc. that might get at trying different methods that should approximate each other might be on topic.
  • Similarly, methods to get around convergence issues. There are whole types of regression that are notorious for convergence issues - binomial regression models and survival models using the generalized gamma distribution come to mind. Yet there are methods to getting around those.
  • Am I simulating/modeling what I think I'm simulating/modeling? This question would have to go beyond just "have I done the code right", but I think could be on topic.
  • "I'm getting the wrong answer, is it a code problem or a genuine statistical concern" could, I think if written correctly, also be on topic.
$\endgroup$

You must log in to answer this question.

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