Announcement

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

  • Alternative to GAM module

    Hi,
    I would like to run generalized additive models in Stata using Mac iOS. Is there an alternative to the GAM module (which only works in Windows)?
    Thanks

  • #2
    Hello Alex. What GAM module are you referring to? Is it a user-written package? If so, please indicate where you found it. As an example of what I mean, info about the -gam- package by Royston & Ambler can be viewed by typing this command:
    Code:
    net describe sg79, from(http://www.stata.com/stb/stb42)
    Output:

    Code:
    . net describe sg79, from(http://www.stata.com/stb/stb42)
    
    -------------------------------------------------------------------------------------------------------
    package sg79 from http://www.stata.com/stb/stb42
    -------------------------------------------------------------------------------------------------------
    
    TITLE
          STB-42 sg79.  Generalized additive models.
    
    DESCRIPTION/AUTHOR(S)
          STB insert by
          Patrick Royston Royal Postgraduate Medical School, UK;
          Gareth Ambler, Royal Postgraduate Medical School, UK.
          Support:  [email protected] and [email protected]
    
    INSTALLATION FILES                                 (type net install sg79)
          sg79/gam.ado
          sg79/gam.hlp
          sg79/gamplot.ado
          sg79/gamplot.hlp
    
    ANCILLARY FILES                                    (type net get sg79)
          sg79/kyph.dta
          sg79/pbc.dta
          sg79/gam.zip
    -------------------------------------------------------------------------------------------------------
    By the way, I found that package by typing -help gam-, then doing a Ctrl-F search on <additive> in the long list of hits that came up. (I could have typed -findit gam- or -search gam- rather than -help gam-.)

    HTH.
    --
    Bruce Weaver
    Email: [email protected]
    Web: http://sites.google.com/a/lakeheadu.ca/bweaver/
    Version: Stata/MP 18.0 (Windows)

    Comment


    • #3
      I think that what Bruce found is the same as what Alex is talking about. The user-written command calls a compiled Fortran executable, which is compatible only for (old) Windows operating systems, and not for those for Macintosh.

      Perhaps something has been implemented in Python that you could call from Stata? There is some discussion of what was available as of three years ago here.

      Comment


      • #4
        Thanks Joseph. Perhaps this thread from 2014 will also be useful.
        --
        Bruce Weaver
        Email: [email protected]
        Web: http://sites.google.com/a/lakeheadu.ca/bweaver/
        Version: Stata/MP 18.0 (Windows)

        Comment


        • #5
          Joseph is correct, the GAM package I am referring to is indeed the one Bruce found, and it is not compatible with Mac iOS. I'll try the python package in the link provided by Joseph. Are there any other ways of carrying out GAMs in STATA that I might have missed?

          Thanks

          Comment


          • #6
            Originally posted by Alex Taikh View Post
            Are there any other ways of carrying out GAMs in STATA that I might have missed?
            If it were my call, I would approach things much as Nick Cox describes in #8 in the thread that Bruce points to, except that I would probably opt for B-splines with the user-written command -bspine-
            Code:
            net describe sg151_2, from(http://www.stata-journal.com/software/sj12-3)
            in conjunction with the official -glm-.

            Comment


            • #7
              Thanks Joseph, I'll start from that.

              Comment


              • #8
                In 2019 my starting point is

                Code:
                help npregress

                Comment

                Working...
                X