Announcement

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

  • xtfmb function, unknown egen function group()

    Hi there, I am having some issues for xtfmb function.
    My command is xtfmb y x1 x2 x3, verbose.
    Also, I run tsset(firm year) before running xtfmb command.
    Yet, while I run the xtfmb command,
    I get this result:
    unknown egen function group()
    r(133);
    How can I solve this problem?Pls help! Thanks

  • #2
    Variants on this question have appeared several times on Statalist e.g. https://www.statalist.org/forums/for...-function-egen

    https://www.statalist.org/forums/for...568371-psgraph

    The likely diagnosis -- no one to my knowledge has suggested any other -- is this.

    1. xtfmb is a community-contributed command and not the problem.

    2. A copy of Stata purchased from StataCorp or any of its official distributors would not show this problem. At some point, someone pirated Stata, you have a copy of that, and this is a tell-tale sign that your Stata is not installed correctly.

    3. Conversely, if you (or your institution) did purchase Stata directly, get in touch with StataCorp technical support citing your licence|license information to discuss the problem.

    Comment


    • #3
      Please try asreg and see whether you get the same error
      Code:
      ssc install asreg
      webuse grunfeld, clear
      tsset company year
      webuse grunfeld, clear
      tsset company year
      asreg invest mvalue kstock , fmb first
      You should get the following results

      Code:
            +----------------------------------------------------------------------+
            | _TimeVar   _obs       _R2    _adjR2   _b_mva~e   _b_kst~k      _Cons |
            |----------------------------------------------------------------------|
            |     1935     10   .865262    .84842    .102498   -.001995    .356033 |
            |     1936     10   .696394   .658443    .083707   -.053641    15.2189 |
            |     1937     10   .663763   .621733    .076514    .217722   -3.38647 |
            |     1938     10   .705577   .668774    .068018    .269115   -17.5819 |
            |     1939     10   .826602   .804927    .065522    .198665   -21.1542 |
            |     1940     10   .839255   .819162    .095399    .202291   -27.0471 |
            |     1941     10   .856215   .838242    .114764    .177465   -16.5195 |
            |     1942     10   .857307    .83947    .142825    .071024   -17.6183 |
            |     1943     10   .842064   .822322     .11861    .105412   -22.7638 |
            |     1944     10   .875515   .859954    .118164    .072207   -15.8281 |
            |     1945     10   .906797   .895147    .108471    .050221   -10.5197 |
            |     1946     10   .894752   .881596    .137948    .005413   -5.99066 |
            |     1947     10   .891239   .877644    .163927   -.003707   -3.73249 |
            |     1948     10   .788823   .762426    .178667   -.042556    8.53881 |
            |     1949     10   .863257   .846164    .161596   -.036965    5.17829 |
            |     1950     10   .857714   .839928    .176217   -.022096   -12.1747 |
            |     1951     10   .873773   .857995    .183141   -.112057    26.1382 |
            |     1952     10   .846122   .826888    .198921   -.067495    7.29284 |
            |     1953     10   .889261   .875418    .182674    .098753   -50.1525 |
            |     1954     10    .89845   .885756    .134512    .331375   -133.393 |
            |----------------------------------------------------------------------|
       Mean |   1944.5     10   .836907    .81652    .130605    .072958    -14.757 |
            +----------------------------------------------------------------------+
      
      Fama-MacBeth (1973) Two-Step procedure           Number of obs     =       200
                                                       Num. time periods =        20
                                                       F(  2,    19)     =    195.04
                                                       Prob > F          =    0.0000
                                                       avg. R-squared    =    0.8369
                                                       Adj. R-squared    =    0.8165
      ------------------------------------------------------------------------------
                   |            Fama-MacBeth
            invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
            mvalue |   .1306047   .0093422    13.98   0.000     .1110512    .1501581
            kstock |   .0729575   .0277398     2.63   0.016     .0148975    .1310176
             _cons |  -14.75697   7.287669    -2.02   0.057    -30.01024     .496295
      ------------------------------------------------------------------------------
      
      .
      You can find more on asreg here https://fintechprofessor.com/2017/12...ions-in-stata/
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment

      Working...
      X