<p>The question <a href="https://stats.stackexchange.com/q/234809/22228">R/mgcv: Why do te() and ti() tensor products produce different surfaces?</a> has had a very interesting history. It was asked by a new user who may not be quite so aware of where we draw the (controversial!) on-topic/off-topic line on questions with substantial coding content. The question itself is about generalized additive models, but included substantial R code using the <code>mgcv</code> package.</p>

<p>What I find particularly interesting about this question is that it was answered in some detail (not a lengthy answer but one in which significant thought had clearly been invested) by a highly experienced user, who felt the question touched on underlying statistical questions and was on-topic.</p>

<p>Five other users, also very experienced, voted to close as off-topic, presumably unhappy with how much the question turned on R code.</p>

<p>The answerer argued that the question should be reopened, arguing the level of implementation details in <code>mgcv</code> was unsurprising since he was "unaware of <em>any</em> other off-the-shelf software for GAMs that allows this ANOVA-like decomposition of bivariate smooths".</p>

<p>The question ultimately gathered four reopen votes before its time in the review queue was ended by a "leave-closed" vote from a moderator. Of course this doesn't preclude the question being reopened (a "leave-closed" vote from a moderator on a reopen review doesn't have the same finality as a "close" vote on a close review, since any earlier "reopen" votes are not wiped out) but falling off the review queue does make accruing sufficient reopen votes less likely.</p>

<p>I'm not here to protest the decision (I was one of the reopen-voters, but don't know nearly enough about GAMs to argue the technical points in anything resembling an authoritative way) but the fact that many experienced, high-reputation users were so split on this suggests this is worthy of further discussion. It reminds me to some extent of questions on <code>lme4</code> or <code>nlme</code> which we're generally fairly tolerant of because there tends to be an underlying model specification issue, or questions on coding in JAGS/Stan - the sheer fact you are coding in JAGS or Stan indicates there must be something statistical lurking in the background! But even these are not <em>cartes blanches</em> and such questions can and do get closed, if the "underlying issue" is ultimately deemed to be non-statistical in nature.</p>

<p>Does anybody have any thoughts on which side of our dividing line this question should fall, or whether we should take special care with our treatment of <code>mgcv</code> questions in general?</p>

<p><strong>Edit:</strong> the question was reopened as a result of the attention brought to it by this Meta question, but the issue of how to review questions with substantial code content is still relevant and it would be good to see what we can learn from the episode. Clearly a difficulty here is that not all reviewers on the Review Queue felt comfortable with the rather "niche" statistical material involved &mdash; it's not a topic many of us know much about, and even fewer could answer, which can make it hard to judge the borderline between a "primarily code" and "primarily statistical" question. Since there aren't that many active reviewers, this is bound to be a recurring problem here.</p>
