Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Randomness in -areg-: Re-running the command produces different results


From   Alex MacKay <[email protected]>
To   [email protected]
Subject   st: Randomness in -areg-: Re-running the command produces different results
Date   Thu, 5 Sep 2013 08:34:05 -0500

Dear statalist,

I have discovered that by simply re-running the areg command, I get
the results below. In these three examples, the the model degrees of
freedom goes from 48 to 0 to 49. In the second run, there is the
additional warning that the variance matrix is nonsymmetric or
singular. I've also observed as low as 45 and as high as 51 with some
additional runs. Fixing the random seed does not seem to have any
impact.

The model is:

areg ln_price treatment postperiod treatmentXpostperiod
ln_unemployment ln_population ln_income price_index ///
     i.week i.retailer_id i.state, absorb(product) vce(cluster clusterID)

The levels are: 141 (week), 73 (retailer_id),  24 (state_id), 25
(product), and 46 (clusterID), for a total of 309.

Can anyone identify why this is happening, or confirm that it is a bug?

Alex

(This is a branch off of a different thread)

- - -

1.
note: 2599.week omitted because of collinearity
note: 597.retailer_id omitted because of collinearity
note: 866.retailer_id omitted because of collinearity
note: 877.retailer_id omitted because of collinearity
note: 9101.retailer_id omitted because of collinearity
note: 54.state_id omitted because of collinearity
note: 3997.retailer_id omitted because of collinearity
note: 4955.retailer_id omitted because of collinearity
note: 7005.retailer_id omitted because of collinearity
note: 7599.retailer_id omitted because of collinearity


Linear regression, absorbing indicators           Number of obs   =        597
                                                  F(  48,     45) =          .
                                                  Prob > F        =          .
                                                  R-squared       =     0.9256
                                                  Adj R-squared   =     0.8695
                                                  Root MSE        =     0.3082

                         (Std. Err. adjusted for 46 clusters in clusterID)
---------------------------------------------------------------------------------
                |               Robust
       ln_price |      Coef.   Std. Err.      t    P>|t|     [95%
Conf. Interval]
----------------+----------------------------------------------------------------
            treatment |  -4.044072   3.152507    -1.28   0.206
-10.39355    2.305404
     postperiod |  -.5653387   .3338128    -1.69   0.097    -1.237672
  .1069948
 treatmentXpostperiod |  -.0178175   .1210774    -0.15   0.884
-.2616798    .2260448


2.

note: 2599.week omitted because of collinearity
note: 597.retailer_id omitted because of collinearity
note: 866.retailer_id omitted because of collinearity
note: 877.retailer_id omitted because of collinearity
note: 9101.retailer_id omitted because of collinearity
note: 54.state_id omitted because of collinearity
Warning:  variance matrix is nonsymmetric or highly singular
note: 3997.retailer_id omitted because of collinearity
note: 4955.retailer_id omitted because of collinearity
note: 7005.retailer_id omitted because of collinearity
note: 7599.retailer_id omitted because of collinearity

 Linear regression, absorbing indicators           Number of obs   =        597
                                                  F(   0,     45) =          .
                                                  Prob > F        =          .
                                                  R-squared       =     0.9256
                                                  Adj R-squared   =     0.8695
                                                  Root MSE        =     0.2950

                         (Std. Err. adjusted for 46 clusters in clusterID)
---------------------------------------------------------------------------------
                |               Robust
       ln_price |      Coef.   Std. Err.      t    P>|t|     [95%
Conf. Interval]
----------------+----------------------------------------------------------------
            treatment |  -4.044072          .        .       .
   .           .
     postperiod |  -.5653387          .        .       .            .
         .
 treatmentXpostperiod |  -.0178175          .        .       .
   .           .


3.

note: 2599.week omitted because of collinearity
note: 597.retailer_id omitted because of collinearity
note: 866.retailer_id omitted because of collinearity
note: 877.retailer_id omitted because of collinearity
note: 9101.retailer_id omitted because of collinearity
note: 54.state_id omitted because of collinearity
note: 3997.retailer_id omitted because of collinearity
note: 4955.retailer_id omitted because of collinearity
note: 7005.retailer_id omitted because of collinearity
note: 7599.retailer_id omitted because of collinearity

Linear regression, absorbing indicators           Number of obs   =        597
                                                  F(  49,     45) =          .
                                                  Prob > F        =          .
                                                  R-squared       =     0.9256
                                                  Adj R-squared   =     0.8695
                                                  Root MSE        =     0.3085

                         (Std. Err. adjusted for 46 clusters in clusterID)
---------------------------------------------------------------------------------
                |               Robust
       ln_price |      Coef.   Std. Err.      t    P>|t|     [95%
Conf. Interval]
----------------+----------------------------------------------------------------
            treatment |  -4.044072   3.152507    -1.28   0.206
-10.39355    2.305404
     postperiod |  -.5653387   .3338128    -1.69   0.097    -1.237672
  .1069948
 treatmentXpostperiod |  -.0178175   .1210774    -0.15   0.884
-.2616798    .2260448
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index