Announcement

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

  • Robust regression error

    Dear all,

    I was wondering what the following error meant when using rreg:

    "All weights went to zero"
    "No observations"

    What does it mean? And for future reference, how can I find error documentation in Stata if I encounter a unkown error?

    Thanks!

  • #2
    You will have to give us a bit more detail to get a useful answer. Show us the code you ran. How did you request robust standard errors? What weight is Stata referring to? Also, please refer to the FAQ for information on using your full name when joining Statalist.
    Richard T. Campbell
    Emeritus Professor of Biostatistics and Sociology
    University of Illinois at Chicago

    Comment


    • #3
      rreg is actually a program for dealing with outliers. I discuss it starting on p. 12 of

      http://www3.nd.edu/~rwilliam/xsoc63993/l24.pdf

      It has been condemned to an appendix of the handout because nobody seems to think much of it, The end of that appendix suggests checking out

      https://lirias.kuleuven.be/bitstream...1/KBI_0823.pdf

      mmregress and robreg are both suggested as superior alternatives to rreg. Use -findit- to find them.

      What rreg does is assign weights to cases. A really extreme outlier might get assigned a weight of 0, basically causing it to be dropped from the analysis. It seems quite peculiar that every case would be assigned a weight of 0, so I am guessing there is something unusual about the data or maybe the problem is not set up correctly. You can spend time trying to figure out what it is, but then again you might just be better off learning a better method.

      Before you go to any outlier-type program, I think you should see if you can make the outliers stop being outliers, e.g. add more variables to the model, do some sort of transformation to the variables, fix coding errors. My handout discusses such options, as do numerous other sources.
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      Stata Version: 16.1MP (2 processor)

      EMAIL: rwilliam@ND.Edu
      WWW: https://www3.nd.edu/~rwilliam

      Comment


      • #4
        Dear prof R. T. Campbell and prof. R. Williams,

        thank you for your kind response. As for the code I was referring to was
        Code:
        rreg
        , which is a Stata command for robust regressions using M-estimators as I believed, so therefore I thought additional information was not necessary. In addition the regression takes 120 observations and I did not know how to reproduce the error.

        prof. R. Williams, thank you for your explanation and additional information. I really appreciate the notes and the superior alternatives. I will look into them both.

        Comment


        • #5
          rreg needs at least a dependent variable. I am not sure how useful it is if you don't also have one or more independent variables. I suppose a constant only model might identify univariate outliers, but a univariate outlier isn't necessarily a multivariate outlier, e.g. somebody with an exceptionally high income might have exceptionally high values on other variables as well.
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          Stata Version: 16.1MP (2 processor)

          EMAIL: rwilliam@ND.Edu
          WWW: https://www3.nd.edu/~rwilliam

          Comment


          • #6
            Oh, I have exactly one dependent variable. I am trying to use different estimation techniques on the CAPM model. One of them was a robust regression technique.

            Comment


            • #7
              bsc, I do have the same problem: when I run the rreg command, I receive the message "all weights went to zero; no observations." Did you resolve this problem? Anyone else can help? For some more details, I am replicating the same model first with one dependent variable, and then with another one. It works very well in the first case, but then, when I replace the dependent variable with another one (measured the same way), I receive the "all weights went to zero; no observations" message. Anyone can suggest a solution?

              Comment


              • #8
                Also, Prof. Williams, do you have any suggestion?

                Comment


                • #9
                  This is what I execute and receive:

                  . rreg FTHo Education Age Sex i.Religion PracticeRel Employed MeetGr SuppEUMem TrustPol

                  Huber iteration 1: maximum difference in weights = .87929576
                  Huber iteration 2: maximum difference in weights = .49528019
                  Huber iteration 3: maximum difference in weights = .44463424
                  Huber iteration 4: maximum difference in weights = .31902659
                  Huber iteration 5: maximum difference in weights = .21319413
                  Huber iteration 6: maximum difference in weights = .15169346
                  Huber iteration 7: maximum difference in weights = .10763534
                  Huber iteration 8: maximum difference in weights = .08911619
                  Huber iteration 9: maximum difference in weights = .04286794
                  Biweight iteration 10: maximum difference in weights = .29639603
                  Biweight iteration 11: maximum difference in weights = .70410264
                  Biweight iteration 12: maximum difference in weights = .66173534
                  Biweight iteration 13: maximum difference in weights = .75296458
                  Biweight iteration 14: maximum difference in weights = .80715763
                  Biweight iteration 15: maximum difference in weights = .42310001
                  all weights went to zero;
                  no observations
                  r(2000);

                  Comment


                  • #10
                    Dear Ridvan,

                    Would you be willing to share your data? Anyway, you should not use -rreg-

                    Best wishes,

                    Joao

                    Comment


                    • #11
                      I can think of only one good reason to use rreg which is that someone else did and you need to compare your results with theirs.

                      What was said a while back http://www.stata.com/statalist/archi.../msg00416.html I think remains candid but valid.

                      What's the problem to which you think rreg is the solution? Whatever it is, there is a better solution, possibly

                      1. Robust standard errors, in Eicker-Huber-White-sandwich sense, a quite different idea.

                      2. Poisson regression or more generally GLMs.

                      3. Quantile regression.

                      4. Transformation of one or more predictors.

                      5. A more modern flavour of robust regression.

                      Code:
                      search verardi, author

                      Comment


                      • #12
                        Joao Santos Silva and Nick Cox, you are right; I should use tobit models...
                        Last edited by Ridvan Peshkopia; 04 Nov 2017, 06:44.

                        Comment


                        • #13
                          Joao Santos Silva and Nick Cox, you are right; I should use tobit models...
                          Last edited by Ridvan Peshkopia; 04 Nov 2017, 06:45.

                          Comment


                          • #14
                            Anyway, again, I have received an R&R from a journal, and the reviewers' want evidence that my probabilistic simple random sample truly reflects the main demographic stratification of my native Albania. Comparing the main demographic stratification in my sample with the patchy data from the Albanian Institute of Statistics (INSTAT), I have found out that my cellphone RDD technique produces two major discrepancies: first, women are underrepresented in my sample, apparently because they use less cellphone. Second, people below the age of 30 are over represented whereas people above the age of 70 are underrepresented. My sample's other major demographic strata seem to match those of the INSTAT.

                            My question: is there any command that would adjust, say, my respondents' feeling temperatures toward, say, Greeks, by weighting one or more variables so they can match the INSTAT strata?

                            Comment


                            • #15
                              Ridvan:
                              you may want to take a look at -help weight-.
                              Kind regards,
                              Carlo
                              (Stata 16.0 SE)

                              Comment

                              Working...
                              X