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.
@gung closed the thread, stating that it was mainly about programming and was off topic. His verbatim response to me in comments was:
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.
I protested that I had seen several questions here that similarly asked for package recommendations, but that were not closed. He responded:
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, & there was a time when the line was less clear & less enforced, but if you see any questions that only ask for a package recommendation, please flag them & we'll close them. They should all be closed, but we certainly could have missed some.
I pointed him to two similar questions. To his credit, he closed both; one is still searchable. However, in my view, that post also required statistical expertise to answer. Moreover, a year-old post 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.
From where I sit, I think this sort of question should be legitimate for Cross Validated, and it seems that I am not the only one to feel this way.
Gung has stated his reasoning for the current policy here. 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?
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 polca
, which is latent class analysis and not cluster analysis (although the two methods appear to have similar goals).
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).
Sticking to LCA, you would have to know that traditional LCA methods are developed for binary or categorical but not continuous indicators; you'd probably want to point the questioner to the flexmix
package. However, my question also asked about latent class regression, and it does not seem to me that flexmix
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 distinct from the measurement part of the model (i.e. class predictor isn't an indicator of latent class).
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, this site 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 polca
and flexmix
, but doing that many times is difficult. Yes, you can RTFM, but if the manual is so long as to be intractable...
flexmix
but I got X error, what did I do wrong?" would be more a programming question, which is maybe StackOverflow, or I would email the package's authors. The type of question I outlined in the main body seems to be about statistical computing. $\endgroup$