Announcement

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

  • Estat ovtest

    Hello everyone,

    I regress a fixed effect model with heteroscedastic consistent and autocorrelation adjusted standard errors. After the regression, I performed the command -ovtest- and the following message appeared:

    powers of fitted values collinear with explanatory variables
    (typically because all explanatory variables are indicator variables)

    Is this something bad?

    Thank you.

  • #2
    Mary:
    nothing bad indeed; this message simply states that all your preditors are categorical.
    It's easy to see from the following toy-example why -estat ovtest- cannot work in this instance:
    Code:
    . use "C:\Program Files\Stata16\ado\base\a\auto.dta"
    (1978 Automobile Data)
    
    . regress price i.foreign
    
          Source |       SS           df       MS      Number of obs   =        74
    -------------+----------------------------------   F(1, 72)        =      0.17
           Model |  1507382.66         1  1507382.66   Prob > F        =    0.6802
        Residual |   633558013        72  8799416.85   R-squared       =    0.0024
    -------------+----------------------------------   Adj R-squared   =   -0.0115
           Total |   635065396        73  8699525.97   Root MSE        =    2966.4
    
    ------------------------------------------------------------------------------
           price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
         foreign |
        Foreign  |   312.2587   754.4488     0.41   0.680    -1191.708    1816.225
           _cons |   6072.423    411.363    14.76   0.000     5252.386     6892.46
    ------------------------------------------------------------------------------
    
    . predict fitted, xb
    
    . estat ovtest
    powers of fitted values collinear with explanatory variables
    (typically because all explanatory variables are indicator variables)
    test not possible
    r(499);
    
    . pwcorr foreign fitted
    
                 |  foreign   fitted
    -------------+------------------
         foreign |   1.0000
          fitted |   1.0000   1.0000
    
    .
    Deafult or non-default standard errors have no bearing on that.

    As an aside, I assume that you ran a fixed effect regression via -regress- plus -i.panelid- plugged in the right-hand side of your regression equation, as -estat ovtest- cannot be invoked after -xtreg,fe- (that is way more advisable if you have a panel data set to deal with).
    Last edited by Carlo Lazzaro; 16 Oct 2021, 02:34.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Carlo,

      My mistake. I did a multiple linear regression, not a fixed effect (sorry for the confusion, it was really late when I wrote that post).
      My problem is that my predictors are not categorical, but continuous. I already put "c." before continuous variables on the regression but the message still appears.

      Thank you for your help.

      Comment


      • #4
        Mary Anne:
        thanks for clarifying.
        Putting a -c.- before the predictor may be not enough:
        Code:
        . use "C:\Program Files\Stata16\ado\base\a\auto.dta"
        (1978 Automobile Data)
        
        . regress price c.foreign
        
              Source |       SS           df       MS      Number of obs   =        74
        -------------+----------------------------------   F(1, 72)        =      0.17
               Model |  1507382.66         1  1507382.66   Prob > F        =    0.6802
            Residual |   633558013        72  8799416.85   R-squared       =    0.0024
        -------------+----------------------------------   Adj R-squared   =   -0.0115
               Total |   635065396        73  8699525.97   Root MSE        =    2966.4
        
        ------------------------------------------------------------------------------
               price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
             foreign |   312.2587   754.4488     0.41   0.680    -1191.708    1816.225
               _cons |   6072.423    411.363    14.76   0.000     5252.386     6892.46
        ------------------------------------------------------------------------------
        
        . estat ovtest
        powers of fitted values collinear with explanatory variables
        (typically because all explanatory variables are indicator variables)
        test not possible
        r(499);
        That said, sharing an example/excerpt of your data via -dataex- can help enormously more positive replies. Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Originally posted by Carlo Lazzaro View Post
          Mary Anne:
          thanks for clarifying.
          Putting a -c.- before the predictor may be not enough:
          Code:
          . use "C:\Program Files\Stata16\ado\base\a\auto.dta"
          (1978 Automobile Data)
          
          . regress price c.foreign
          
          Source | SS df MS Number of obs = 74
          -------------+---------------------------------- F(1, 72) = 0.17
          Model | 1507382.66 1 1507382.66 Prob > F = 0.6802
          Residual | 633558013 72 8799416.85 R-squared = 0.0024
          -------------+---------------------------------- Adj R-squared = -0.0115
          Total | 635065396 73 8699525.97 Root MSE = 2966.4
          
          ------------------------------------------------------------------------------
          price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
          -------------+----------------------------------------------------------------
          foreign | 312.2587 754.4488 0.41 0.680 -1191.708 1816.225
          _cons | 6072.423 411.363 14.76 0.000 5252.386 6892.46
          ------------------------------------------------------------------------------
          
          . estat ovtest
          powers of fitted values collinear with explanatory variables
          (typically because all explanatory variables are indicator variables)
          test not possible
          r(499);
          That said, sharing an example/excerpt of your data via -dataex- can help enormously more positive replies. Thanks.
          So what is the solution for this problem Carlo? I have the same problem with Mary

          Comment


          • #6
            Su.
            welcome to this forum.
            You may want to take a look at -linktest-.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment

            Working...
            X