<p>Recently, I asked for a recommendation for R packages that were capable of doing latent class analysis with mixed indicator types and were capable of doing latent class regression (i.e. treat the latent class as a multinomial random variable and fit a regression model to it). My rationale for asking it on Cross Validated was that the question requires statistical expertise to answer.</p>

<p>@gung closed the thread, stating that it was mainly about programming and was off topic. His verbatim response to me in comments was:</p>

<blockquote>
  <p>Questions that are only about software (e.g. error messages, code or packages, etc.) are generally off topic here. If you have a substantive machine learning or statistical question, please edit to clarify.</p>
</blockquote>

<p>I protested that I had seen several questions here that similarly asked for package recommendations, but that were not closed. He responded:</p>

<blockquote>
  <p>It's not a programming question, so it should be off topic on Stack Overflow as well (whether it will be closed is another issue, but at any rate, I won't migrate it). I don't necessarily know where it would best be asked. Presumably one of the r-help listservs. There are plenty of questions here where R plays some role, &amp; there was a time when the line was less clear &amp; less enforced, but if you see any questions that only ask for a package recommendation, please flag them &amp; we'll close them. They should all be closed, but we certainly could have missed some.</p>
</blockquote>

<p>I pointed him to two similar questions. To his credit, he closed both; <a href="https://stats.stackexchange.com/questions/95101/r-latent-class-multinomial-logit-model">one is still searchable.</a> However, in my view, that post also required statistical expertise to answer. Moreover, a <a href="https://stats.stackexchange.com/questions/24540/clustering-of-mixed-type-data-with-r">year-old post</a> recently floated to the top of my list because someone provided an answer; again, it asks for recommendations for a package, which requires statistical expertise to answer properly. It has not been closed.</p>

<p>From where I sit, I think this sort of question should be legitimate for Cross Validated, and <a href="https://stats.meta.stackexchange.com/questions/1/how-to-answer-r-questions">it seems that I am not the only one</a> to feel this way.</p>

<p>Gung <a href="https://stats.meta.stackexchange.com/a/2420/148503">has stated his reasoning for the current policy here</a>. However, if my thread was closed, and if Gung closed two similar ones without pushback, then why are threads that ask for package recommendations about a specific statistical technique, and that require some statistical expertise to answer properly, still on the site? If the policy is unclear, and if it can't be clarified, then maybe it's a problem. Alternatively, perhaps the policy is clear enough, it's just that all the moderators just need to get tougher, or to get more lenient. Again, what is the line here?</p>

<p>Edit: Clarifying why I think statistical expertise is needed, using link #2 as an example: you have to know what cluster analysis is, and you have to know what distance metrics can generalize across both continuous and binary data (that would be Gower's distance, correctly identified by several people). The original poster mentioned the R package <code>polca</code>, which is latent class analysis and <strong>not</strong> cluster analysis (although the two methods appear to have similar goals).</p>

<p>If you thought you would recommend that poster an R package for latent class analysis (actually, that was my deleted question), you would obviously have to know what LCA was, and it would probably help if you knew that cluster analysis and LCA may have similar goals but they approach things pretty differently. The poster above might not be willing to learn LCA. I would certainly have said thanks but no thanks to cluster analysis (but if you told me there was a cluster analysis equivalent to latent class regression, I might reconsider).</p>

<p>Sticking to LCA, you would have to know that traditional LCA methods are developed for binary or categorical but <strong>not</strong> continuous indicators; you'd probably want to point the questioner to the <code>flexmix</code> package. However, my question also asked about latent class regression, and it does not seem to me that <code>flexmix</code> can perform this. Again, selecting an R package would require you to know what latent class regression is and how it differs from regular LCA - in LCR, you essentially add covariates to the multinomial part of the model that predicts class probabilities, which is <strong>distinct</strong> from the measurement part of the model (i.e. class predictor isn't an indicator of latent class).</p>

<p>Obviously, you could have tried Googling on CRAN. And you might have found one or more packages that do some or all of what you want. However, if you return a lot of results - for example, <a href="https://cran.r-project.org/web/views/Cluster.html" rel="nofollow noreferrer">this site</a> I found on CRAN describes cluster analysis and LCA packages, and it has a LOT of them - then I think it's justified to return here to see if anyone has specific knowledge. It's true I could read through the manuals for a few packages, and I did indeed read the manuals for <code>polca</code> and <code>flexmix</code>, but doing that many times is difficult. Yes, you can RTFM, but if the manual is so long as to be intractable...</p>
