Announcement

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

  • Stata19 Plugins Compatibility with MAC ( M4chip)

    Hi. I completed my dissertation on HP/Windows using Stata 18 and 19. Now I have to switch to a new laptop, most probably MAC -M4 chip series. I read with some plugins I may face issues. I used plugins like "rangestate" and "reghdfe" heavily in my coding .Also I read for other windows only plugins there may be compatibility issues with the Stata for Mac. I cannot say I am highly technical person so I just wanted to check here before switching to a MAC. I would appreciate if you could also enlighten me regarding any issues I face when I migrate my codes written on HP to MAC-M4chips series. Thank you.
    Last edited by Neslihan Yilmaz; 04 Jul 2025, 05:59.

  • #2
    the commands that you mention are standard ado files and will work fine; there are a few user-written commands (.e.g, gam) that require an external program and will not work but the vast majority of user-written software works on a Mac just as it does on Windows

    Comment


    • #3
      Thanks for replying so promptly. I would appreciate if you could clarify one more thing for me. I read on some sources that I may lose performance quality on MAC M4Pro (Silicon chip) as it will have to work through Rosetta. I also read on Stata website that Stata 19 will run natively on Macs with Apple Silicon as a universal application. So if I migrate to MAC as long as I am on Stata 19 for MAC I will not lose performance quality since it is a universal application. Have I understood that correctly? And I also read that the major change shall be file pathnames and how some plugins are installed may be different from the Windows version. Anything else I need to be careful about? Thank you.

      Comment


      • #4
        Yes, Stata 19 runs natively on Macs with Apple Silicon. Whether your processing speed improves or decreases will depend on other details, like RAM, which processor you were using on a Windows machine, etc. Personally in practice, I would expect you are will see speed improvements, if anything. And as #2 indicated, what you are calling "plugins" are just regular Stata programs contributed as commands by the user community. They rarely if ever depend on any Windows-specific programs and will work on a Mac just as well as on Windows -- this is certainly true of reghdfe and rangestat, which you mention. I should add that the latest version, i.e. Stata 19, has improved support for high-dimensional fixed effects (see this announcement) so you probably don't even need to use reghdfe any more.

        Yes, folder paths on Macs (as also all Linux-based systems) are specified with forward slashes instead of backslashes as on Windows, and so your file paths will now need to use forward slashes. But this is, if anything, an improvement: even on Windows machines, you should probably specify paths with forward slashes in Stata code. Stata on Windows understands how to deal with forward slashes, and this prevents errors arising from the backslash acting as an escape character in Stata. Suppose you have a setup where your files sit on the same relative path across two machines (perhaps your desktop vs laptop, or perhaps your computer and a collaborator's computer), of which one is on Windows and the other is a Mac, then a relative file path specified with forward slashes in a Stata do-file will work correctly across both machines.

        I don't know what you mean by "how some plugins are installed may be different". The process of installing community-contributed programs remains identical. For instance, to install rangestat, you would type
        Code:
        ssc install rangestat
        on both Windows and Mac machines. The exact location (paths) of the installed files of course are different, but that is an internal matter for Stata and will usually not concern you. In general, the system folders are different on Windows vs Macs. For instance, on my machine:
        Code:
        . sysdir
           STATA:  /Applications/StataNow/
            BASE:  /Applications/StataNow/ado/base/
            SITE:  /Applications/StataNow/ado/site/
            PLUS:  /Users/hemanshu/Library/Application Support/Stata/ado/plus/
        PERSONAL:  /Users/hemanshu/Library/Application Support/Stata/ado/personal/
        OLDPLACE:  ~/ado/
        If you are referencing these system folders in your code, you can make your code more portable by using Stata's system constants instead of referencing the folder location explicitly. For instance:
        Code:
        . creturn list
        
        <most output omitted, just showing the system folders>
        
        Directories and paths
        
            -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                c(sysdir_stata) = "/Applications/Sta.."      (sysdir)
                 c(sysdir_base) = "/Applications/Sta.."      (sysdir)
                 c(sysdir_site) = "/Applications/Sta.."      (sysdir)
                 c(sysdir_plus) = "/Users/hemanshu/L.."      (sysdir)
             c(sysdir_personal) = "/Users/hemanshu/L.."      (sysdir)
             c(sysdir_oldplace) = "~/ado/"                   (sysdir)
        Last edited by Hemanshu Kumar; 04 Jul 2025, 22:13.

        Comment


        • #5
          Ok thank you for further clarification.

          Comment

          Working...
          X