Announcement

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

  • Is the original version of firthlogit, compatible with Stata 9.2, still available?

    Hello, I am using a Mac (OS 13.3) to run Stata. I have Stata 11.2 but also version 9.2 and would like to run firthlogit. I downloaded it using both versions, but in both cases, when I try to run it, I get an error message stating "this is version ___ of Stata; it cannot run version 13.1 programs. You can purchase the latest version of Stata by visiting http://www.stata.com. r(9);" I'd rather not pay for the latest version of Stata unless necessary. I understand from another post that the original version of firthlogit ran on Stata 9.2. If that old version of firthlogit is still available, can someone point me in its direction? Thanks.

  • #2
    Welcome to Statalist.

    The output of help firthlogit includes the author's name and an invitation to contact him with bugs or other problems - and I'd say that this falls in the "other problems" camp.

    Comment


    • #3
      I sent him an email a day or two ago and hadn't heard back yet so thought maybe someone else had been down this road.

      Comment


      • #4
        Didn't get the e-mail message. I don't have it available.

        Comment


        • #5
          Okay, thanks for the quick response.

          Comment


          • #6
            There have been several improvements to Stata since version 9, so an upgrade may be well worth it. You can request an evaluation copy at

            https://www.stata.com/customer-service/evaluate-stata/


            You can also try tinkering with firthlogit. My guess is you would have to change the version command, and modify or delete code that refers to factor variables.

            You can also check out Gary King's relogit command. I don't think it is as good as firthlogit but it is probably better than nothing.

            https://gking.harvard.edu/relogit
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            Stata Version: 17.0 MP (2 processor)

            EMAIL: [email protected]
            WWW: https://www3.nd.edu/~rwilliam

            Comment


            • #7
              Since you have Stata 11.2, it may be sufficient just to change the version command in firthlogit, since factor variables have been around since version 11.
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              Stata Version: 17.0 MP (2 processor)

              EMAIL: [email protected]
              WWW: https://www3.nd.edu/~rwilliam

              Comment


              • #8
                Generic advice at I have a certain version of Stata and have come across a community-contributed program that is apparently written for a later version of Stata. What are my options?

                https://www.stata.com/support/faqs/p...stata-version/

                Comment


                • #9
                  Originally posted by Joseph Coveney View Post
                  Didn't get the e-mail message.
                  I had sent it to the bigplanet.com address listed in the help file, and today it belatedly bounced back. FYI.

                  Comment


                  • #10
                    Originally posted by Richard Williams View Post
                    You can also try tinkering with firthlogit. My guess is you would have to change the version command...
                    This seemed to work. Aside from the fact that -firthlogit- reported a coefficient for an intercept while -exlogit-, using default settings, did not, the results seemed consistent with one another.

                    There was trial and error involved, so I thought I'd share the steps involved, should there be a future Mac user trying to run -firthlogit- with an older version of Stata.
                    My apologies if all this has been covered elsewhere and I just missed it.
                    Steps:

                    1- ssc install firthlogit

                    2- take note of the directory into which the package was installed (if you've used older versions of Stata, there could well be an old ado folder that is easier to find than the one you want). In my case, running Mac OS 10, it was installed in /Users/[myname]/Library/Application Support/Stata/ado/stbplus/...

                    3- While, in the past, one could readily find the Library folder, in the current system, it is hidden. To find it, following instructions from Where do I find my Library folder? | Official Apple Support ..., in Finder, click on the Go menu. You will NOT see the Library, but when you hold down the Option key, it will appear.

                    4- navigate the pathway shown in #2 to stbplus, then the "f" folder. Within that you will see 2 files, firthlogit.ado and firthlogit_ll.ado

                    5- right-click on -firthlogit-, then Open With, then Other Applications, then navigate to Stata, and click Open

                    6- find the instances where it says "version" (not 1.1, as that's for -firthlogit-). I found 3 instances in firthlogit.ado that I changed from 13.something to 11.2 (my version...based on Richard Williams's earlier comment, earlier versions of Stata might not work).

                    7- Save the ado file (within Stata, of course). (To avoid introducing another possible source of error, I chose not to rename the file, as suggested at the FAQ link provided earlier by Nick Cox.)

                    8- repeat steps 5-7 for firthlogit_ll.

                    9- exit Stata and restart it. (I had tried it without exiting, and got the same old error message.)

                    10- hopefully, you're done, so go to the Command window and run -firthlogit-

                    11- cross your fingers that your output is the same as what it would have been had you been running an "unadulterated" -firthlogit- in a newer version of Stata. See caveat in FAQ document per Nick Cox.

                    Now, when all this was complete, some commands did not run (-viewsource firthlogit- and -type firthlogit-) and returned the error message "file firthlogit not found"--I'm probably missing something here. OTOH, the command -which firthlogit- did run, and, as noted above and most importantly, -firthlogit- itself ran.

                    Perhaps this will be of some help to someone else in the community.

                    Comment


                    • #11
                      Good writeup, thanks for taking the time to contribute the details of getting it to run.

                      I would expect (after having done step 9)
                      Code:
                      viewsource firthlogit.ado
                      to work - did you omit the .ado extension - as I always do in my initial attempt to run viewsource? Or were you just overly terse at that stage of your post? Or did you try it before step 9, but not afterwards?

                      Comment


                      • #12
                        An additional update. Following up on another of the helpful suggestions by Richard Williams, I got an evaluation copy of Stata 15, installed -firthlogit-. (It looks like it went into a the "plus" folder, as opposed to the "stbplus", where it went when I installed using Stata 11, so thinking it did not overwrite the work in the steps listed earlier.) Running my dataset with -firthlogit- in Stata 15 yielded the exact same results as obtained earlier using Stata 11. So perhaps we can delete step #11 above ("cross your fingers...").

                        Comment


                        • #13
                          If you want to try to confirm your results, or just learn more about the topic, see

                          https://www3.nd.edu/~rwilliam/stats3/RareEvents.pdf

                          If all is well, you should be able to exactly replicate the results on pp. 3-4, where I used firthlogit.

                          Also. p. 5 shows you how to use margins and the user-written mcp command (available from SSC; I think it is great), but I can't guarantee they will work in Stata 11. I think mcp requires Stata 12, but you can maybe hack it in ways you did similar to firthlogit.

                          Your problems at the end were probably due to your failure to use the full filename, e.g. you should have said -viewsource firthlogit.ado-

                          I don't use factor variable notation in my examples, but I think it should work in version 11.

                          You didn't rename firthlogit. That may cause you grief if you ever run adoupdate, as your version might get overwritten, Although if I were condemned to using an old version of Stata, I probably wouldn't run adoupdate as programs that worked might get overwritten by programs that don't work because they require a newer version of Stata.

                          Finally, I'll just say again that life might be a lot easier if you had Stata 15. But of course, you may not need all the super-keen features that have been added since 11. Or, it may just be that you have more time than money (which is the case for a lot of people.)

                          For me personally, I think I would want at least Stata 12. Margins and marginsplot were in decent shape by then. But I would still miss many of the things that have been added, including an improved sem command.

                          EDIT: Crossed in cyberspace with William and Erick, who make some of the same points.
                          Last edited by Richard Williams; 19 Feb 2018, 16:50.
                          -------------------------------------------
                          Richard Williams, Notre Dame Dept of Sociology
                          Stata Version: 17.0 MP (2 processor)

                          EMAIL: [email protected]
                          WWW: https://www3.nd.edu/~rwilliam

                          Comment


                          • #14
                            Originally posted by William Lisowski View Post
                            did you omit the .ado extension...?
                            Ah, yes, that's exactly what I did. Thanks.
                            I just switched back over to Stata 11, ran that command, and it worked like a charm. What's more, it allowed me to confirm that the "manual" version change was not overwritten during the installation of Stata 15.

                            Comment


                            • #15
                              What's more, it allowed me to confirm that the "manual" version change was not overwritten during the installation of Stata 15.
                              Installations of new versions of Stata will not overwrite user-written commands you have installed. But adoupdate could.

                              Incidentally, you can have multiple versions of Stata installed on the same machine. I have everything from 7 on. It would come in handy if, say, I was working with you, and I had to be careful that the stuff i did in Stata 15 would be usable for you on Stata 11.
                              -------------------------------------------
                              Richard Williams, Notre Dame Dept of Sociology
                              Stata Version: 17.0 MP (2 processor)

                              EMAIL: [email protected]
                              WWW: https://www3.nd.edu/~rwilliam

                              Comment

                              Working...
                              X