Announcement

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

  • Data are mi set when trying to perform xtset

    Hello,

    my current data set is panel data based on year (Year) and firm (companynumber). When trying to tell Stata that my data is panel data using
    Code:
    xtset companynumber Year, yearly
    I get the following error message: no; data are mi set. Use mi xtset to set or query these data; mi xtset has the same syntax as xtset. Perhaps you did not type xtset. Some commands call xtset to obtain information about the settings. In that case, that command is not appropriate for running directly on mi data. Use mi extract to select the data on which you want to run the command, which is probably m=0.

    Then I used
    Code:
    mi xtset companynumber Year, yearly
    and it worked fine.
    Click image for larger version

Name:	mi xtset.png
Views:	1
Size:	15.6 KB
ID:	1660813


    Is this the same thing? Do I need to pay attention to anything further?

    Thank you and have a nice day,
    Robin

  • #2
    Robin:
    did you previously perform a -mi- on that dataset?
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo, no, I did not. To be honest, I am not quite sure what a -mi- is.

      Comment


      • #4
        Robin:
        click on the -mi unset- link available from -help mi set- and follow the suggested commands to fix this isssue.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Great Carlo, it worked!
          Enjoy your day,
          Robin

          Comment


          • #6
            Hello, #Carlo_Lazzaro....i am facing the same problem. but what differentiates my problem from Robin is that i had
            Code:
            mi_set
            my data but later on dropped _mi_m out of sheer ignorance when i though i no longer need to mi set my data. now when i need to run RESET test i get the same error message as Robin's. i tried everything like mi unset, mi extract 0 but every time i get the same error message as
            _mi_m not found
            . Please help....Thanks
            Last edited by Dr. Iqra Yaseen; 27 Oct 2022, 02:57.

            Comment


            • #7
              Sybil:
              you may want to try something along the following lines:
              Code:
              use https://www.stata-press.com/data/r17/mheart1s20.dta
              
              . regress age i.female bmi if _mi_m==0
              
                    Source |       SS           df       MS      Number of obs   =       132
              -------------+----------------------------------   F(2, 129)       =      0.50
                     Model |  135.980445         2  67.9902227   Prob > F        =    0.6074
                  Residual |  17523.2124       129  135.838855   R-squared       =    0.0077
              -------------+----------------------------------   Adj R-squared   =   -0.0077
                     Total |  17659.1928       131  134.802998   Root MSE        =    11.655
              
              ------------------------------------------------------------------------------
                       age | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
              -------------+----------------------------------------------------------------
                  1.female |   1.312981   2.343827     0.56   0.576    -3.324337    5.950299
                       bmi |  -.2053083    .252977    -0.81   0.419    -.7058295    .2952128
                     _cons |   61.59589   6.509568     9.46   0.000     48.71655    74.47523
              ------------------------------------------------------------------------------
              
              . estat ovtest
              
              Ramsey RESET test for omitted variables
              Omitted: Powers of fitted values of age
              
              H0: Model has no omitted variables
              
              F(3, 126) =   0.27
               Prob > F = 0.8469
              
              .
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Carlo Lazzaro i used #7 command but still get the same error message of _mi_m not found.. please help...what if i do not xtset my panel data and run regression command as such does it make any significant difference

                Comment


                • #9
                  Sybil:
                  while I cannot help about the cause of the error you're complaining about, you cannot go -xtreg- without -xtset-ing your dataset before.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    thanks Carlo Lazzaro what if i intend to use ppmlhdfe instead of xtreg...may i go without xtsetting????

                    Comment


                    • #11
                      Sybil:
                      unfortunately, I'm not familiar with the community-contributed module you mention.
                      Kind regards,
                      Carlo
                      (Stata 19.0)

                      Comment


                      • #12
                        Carlo Lazzaro thanks for your concern

                        Comment

                        Working...
                        X