Announcement

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

  • cnsreg does not allow me to test for heteroskedasticity or autocorrelation

    Dear Stata users,

    I encounter a problem when trying to run cnsreg with several restrictions. An example of my data is shown below.

    Code:
    * Data Example
    clear
    input float dep_value double contiguity float(dist_1 dist_2 dist_3 dist_4 dist_5 dist_6)
    -12.979575 0 0 1 0 0 0 0
     -2.756527 1 1 0 0 0 0 0
    -2.5877166 1 1 0 0 0 0 0
     -3.820597 0 1 0 0 0 0 0
     -7.575688 0 0 0 0 0 1 0
             . 0 0 1 0 0 0 0
     -7.340847 0 0 1 0 0 0 0
     -6.870379 0 1 0 0 0 0 0
    end
    The first couple of restrictions are linear as shown below. These linear restrictions are necessary since Fixed Effects are interpreted.

    Code:
    constraint 1 EXPO_FE1 + EXPO_FE2 + EXPO_FE3 + EXPO_FE4 + EXPO_FE5 + EXPO_FE6 + EXPO_FE7 + EXPO_FE8 + EXPO_FE9 + EXPO_FE10 + EXPO_FE11 + EXPO_FE12 + EXPO_FE13 + EXPO_FE14 + EXPO_FE15 + EXPO_FE16 + EXPO_FE17 + EXPO_FE18 = 0
    
    constraint 2 IMPO_FE1 + IMPO_FE2 + IMPO_FE3 + IMPO_FE4 + IMPO_FE5 + IMPO_FE6 + IMPO_FE7 + IMPO_FE8 + IMPO_FE9 + IMPO_FE10 + IMPO_FE11 + IMPO_FE12 + IMPO_FE13 + IMPO_FE14 + IMPO_FE15 + IMPO_FE16 + IMPO_FE17 + IMPO_FE18 = 0
    Another couple of restrictions is dropping the constant and enforcing to keep collinear variables. Both restrictions must be enforced since I must estimate each Fixed Effect. If a Fixed Effect were dropped, then results couldn't be interpreted.

    Code:
    cnsreg dep_value contiguity dist_* EXPO_FE* IMPO_FE*, constraints(1-2) nocons collinear
    An assumption in the error structure is homoskedasticity and correlation between observations. The tests I am using are described below in code format. However, when I run either test, the following problem appears: estat [test name] not valid. I must point out that the problem is not there when I try the reg command, but I am unable to enforce all my restrictions.

    Code:
    estat imtest, white
    estat hettest
    estat durbinalt

    Could you help me figurate out what I am doing wrong?

    Thanks!
Working...
X