Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can you do Machine learning In Stata ? Or is this silly ?

    Hello, perhaps a bit daft to post on Statalist

    What are your thoughts on doing machine learning in Stata ?
    this is not often mentioned in courses on ML as most frequently courses use Pyton or R

    why is this ? Is it because Stata doesn’t have the capacity to do so ?

    also, if I want to create a dynamic interactive prediction risk calculator for a disease such as: interactively predicting risk of a heart attack based on patient age, comorbidity using ML techniques what platform would you use?

  • #2
    Stata has an okay amount of ML methods. Kmeans clustering for example is a kind of unsupervised learning. Even regression is a form of what ML engineers would say is supervised learning.

    It depends on what your needs are though. If you need a simple Lasso logit or something similar, then you're in good luck. Stata can certainly do ML (especially if you'd like to be brave and get into the guts of Mata, Stata's matrix programming language). Issue is, Mata is hard to learn (for me anyways, depending on how much time you have). ML is used more in Python and R (in about that order) because both are free, are backed by a massive statistician and programmer community, and are easier to write functions with and do other things that Stata lacks (such as, dictionaries, tuples). In other words, they make it easier in a sense.

    I work on econometrics. Synthetic control methods specifically, for causal inference. Synth in Stata is a few thousand lines if I'm not mistaken. In Python (even if I had to get into the messy business of adding covariates into the method) takes far less (with adequate programming skills), requires no special plug-ins (as Stata's does, a C plugin).

    I suppose my point is, Stata likely has a method that does what you seek (I know nothing about the prediction tasks you mention, my best first guess is a lasso logit), but other programs do similar things, and much more. I know it's a little more than you asked for, but I hope it answers the question😂😂

    Comment


    • #3
      Rose Matthews Start with -search machine learning- and scroll through the output. There is a large amount of "machine learning" functionality in Stata, including community-contributed materials. As Jarad says, it all depends on what your needs are. "Machine learning" is a label de jour that encompasses many many methods

      Comment

      Working...
      X