Announcement

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

  • multinomial logit model with fixed effect

    I am runing the following model: femlogit BM_classification logGDP type_shv type_comm type_nat type_stv type_coop type_savings eq_tancomm2at type_public zscore logassets crisis2008 crisis2011 reg_tier1, group(obs_nr) b(1).

    I got the following Error, any suggestions please.
    invalid freeparm argument;
    only "on" or "off" is allowed
    r(3498);


  • #2
    Welcome to Statalist.

    I believe this problem is related to a change in Stata 15.

    The first thing we should check is whether you are running the latest version of Stata. Please use the about command
    Code:
    . about
    
    Stata/SE 15.0 for Mac (64-bit Intel)
    Revision 05 Sep 2017
    Copyright 1985-2017 StataCorp LLC
    and confirm from the output that you are running the version shown. If not, you need to update to this version, by issuing the update all command (assuming you are running on a system on which you have administrator permissions).

    If this error occurs using the latest version of Stata, I would like you to test the following possible solution and report back if it works. I have looked at the code for femlogit (both the ado and the mata code) and do not believe it should be necessary, but it is worth a try to see if we can get you on your way.

    If you are running your code from a do-file, please add the following to your do-file before the femlogit command, and then run the entire do-file. Do not just select a line or two at a time to run it piece-by-piece; it's important that the version command and the femlogit command run be run together.
    Code:
    version 14.2
    If you are running commands interactively, just run the version command before running your femlogit command.

    Again, pease let us know if it works or not. This appears to be a subtle problem with an enhancement in Stata 15 that may need to be reported to Stata technical support.

    NOTE for other members reading this:

    The following URL shows a search of Statalist for "freeparm" that turns up two other reports of this problem, both since Stata 15 was released.

    https://www.statalist.org/forums/search?q=freeparm

    The other two reports are not related to femlogit; both involve multiple imputation.

    The output of help whatsnew14to15 turns up much about changes to free parameters, both in Stata and in Mata. In theory version control can revert the new behavior to the former behavior. However, examination of the .ado and .mata files for femlogit shows appropriate version control on both of those. There is also a .mo Mata library file which is of course opaque to me.

    I hoped to recreate the problem by running the first example in help femlogit; the problem did not occur. My working hypothesis is some circumstances dependent on the model and perhaps the data trigger this problem.

    If you have any ideas, please share them!

    Comment


    • #3
      Lobna: This is the forum to discuss Mata, Stata's special purpose matrix language.

      William:

      Perhaps this should be reported to Tech Support and transferred to the General Forum. I fear that many people will not see it here.

      (I am one of those who would like to see the forums merged.)
      Last edited by Steve Samuels; 23 Sep 2017, 09:18.
      Steve Samuels
      Statistical Consulting
      [email protected]

      Stata 14.2

      Comment


      • #4
        After my response above, I also placed on post on the General forum pointing to this post to try to generate more coverage, and also as a heads-up that this is a problem that occurs in other settings.

        https://www.statalist.org/forums/for...5-mata-related

        After seeing the results of the test I suggested, I do intend to report this to Tech Support pointing to this post and the post in the General Forum. Or perhaps one of the Stata folk who occasionally participate will see one or the other and step forward.

        Comment


        • #5
          Dear william,
          I tried all the steps that you suggested however, I still have the same problem: invalid freeparm argument;
          only "on" or "off" is allowed. What is the next step please.I appreciate your help.

          Even as suggested trying to work from a do file as bellow. I still have a same problem, bellow is my Do file

          version
          xtset obs_nr year

          encode country_code, gen(countryID4)
          generate crisis32008=0
          replace crisis32008=1 if year==2008
          generate crisis32011=0
          replace crisis32011=1 if year==2011

          generate logassets3=log(ass_total)
          generate logGDP3=log(country_gdp)

          femlogit BM_classification logGDP3 logassets3 type_shv type_comm type_nat type_stv type_coop type_savings eq_tancomm2at
          type_public zscore crisis32008 crisis32011 reg_tier1, group(countryID4, obs_nr) b(1)

          close


          Regards
          Dr.Lobna

          Comment


          • #6
            I have reported this problem to Stata Technical Services following the email link on the following page
            https://www.stata.com/support/tech-support/contact/
            You may want to submit a report of your own. I directed them to this Statalist topic for details, and to another posted earlier. The earlier problem may be more to their liking; it involves only commands from base Stata - no user-written commands like femlogit.

            If you do submit a report, you might consider whether you could share your dataset (limited to the variables needed to run your do-file) with Stata Technical Services. If you could provide the data and code that reproduces the problem, you would aid their efforts. Of course I recognize that a lot of us work with data whose dissemination is restricted, and you may not be able to share your data. Nevertheless, if you submit a report yourself, Stata Technical Services will be able to contact you directly.

            Comment


            • #7
              thank you so much for your response.

              Comment


              • #8
                In my work, i have to control for time and country effect using multionominal variable, this is why Femlogit was the best to use, however if there is no

                differences between mlogit with dummy independent variables and femlogit, for example, Model1 and Model2 in the following code?. I can use mlogit to avoid all the problem with femlogit.

                encode v1, gen(country)
                encode v2, gen(firm)
                xtset firm year

                Model1: mlogit y size i.country i.year
                Model2: femlogit y size, group(country year)
                Regards

                Comment


                • #9
                  The error message "invalid freeparm argument" is returned when an update for Stata 15 was not properly completed. For example, this can happen due to firewall or antivirus restrictions, Internet connection issues, or others. We recommend forcing and update by typing:
                  Code:
                  update all, force

                  Comment

                  Working...
                  X