Announcement

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

  • rifhdreg issues: Insufficients Observations, is N==1?

    Hi, I am trying to estimate an unconditional quantile regression with with individual fixed effects as described in Rios-Avila and Maroto. Indeed, I follow their code closely:

    Code:
    global m4vars time1 time2 c.time1#c.group2 c.time1#c.group3 c.time2#c.group2 c.time2#c.group3 controlvar
    
    global dvars y1 y2 y3 y4
    
    foreach i in $dvars {
        
    rifhdreg `i' $m4vars , rif(q(10)) abs(id) keepsingletons
    outreg2 using qreg_`i'_results.doc, replace ctitle(10th) label dec(2) title(Results for `i')
    
    rifhdreg `i' $m4vars , rif(q(25)) abs(id) keepsingletons
    outreg2 using qreg_`i'_results.doc, append ctitle(25th) label dec(2) title(Results for `i')
    
    rifhdreg `i' $m4vars , rif(q(50)) abs(id) keepsingletons
    outreg2 using qreg_`i'_results.doc, append ctitle(50th) label dec(2) title(Results for `i')
    
    rifhdreg `i' $m4vars , rif(q(75)) abs(id) keepsingletons
    outreg2 using qreg_`i'_results.doc, append ctitle(75th) label dec(2) title(Results for `i')
    
    rifhdreg `i' $m4vars , rif(q(90)) abs(id) keepsingletons
    outreg2 using qreg_`i'_results.doc, append ctitle(90th) label dec(2) title(Results for `i')
    
    }
    I have a subsample of the data. time2 is the squared version of time.

    When I estimate try to estimate the model for y2 at the 10th quantile, none of the parameters are computed

    :
    Click image for larger version

Name:	rifreg-error-0.png
Views:	1
Size:	23.9 KB
ID:	1729742


    And I receive the following error right below it.
    Click image for larger version

Name:	rifreg-error.png
Views:	1
Size:	17.6 KB
ID:	1729741


    When I ignore remove y2 from the loop, I receive the insufficient observations warning:
    Click image for larger version

Name:	rifreg-error-2.png
Views:	1
Size:	4.1 KB
ID:	1729743


    When I remove y3 from the loop, the results for y4 at quantile 10 is essentially the same as the results for y2 at quantile 10 (i.e., all the parameters are zero).

    I encounter similar issues when I don't use fixed effects (i.e., omit "abs(id)"). The loop runs until after I estimate the results for y2 at the 90th quantile. After those results are displayed, I get the error below:

    Click image for larger version

Name:	rifreg-error-3.png
Views:	1
Size:	3.8 KB
ID:	1729744



    When I omit y3 from the loop, the loop is able to run without any warning/error messages. However, some of the results for specific quantile-y combinations display zeros for all estimated parameters.

    I've looked through prior posts and have not come up with a solution

    I would appreciate any insight or guidance. FernandoRios any idea what's going on?





    Attached Files

  • #2
    Based on your example, and title, you trying to absorb "id", which has 2375 different values. For a data that has only 3000 observations.
    In other words, you are absorbing all the variation on the data, and what is left is insuficient to do anything like a regression.


    Comment

    Working...
    X