Announcement

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

  • Panel Regression

    Hello

    At the moment I'm trying to do regressions with panel data.
    If I make a OLS regression with the panel data it works without any problem. My used codes are as follows:
    Code:
    regress D.(viol_crime_rate asylum_pop a8_pop) i.Year [aw=adult_pop], vce(cluster panel_id)



    However, if I try to make a fixed-effect panel regression, I get as a result "negative weights encountered". My used codes are as follows:
    Code:
    xtreg viol_crime_rate asylum_pop a8_pop i.Year [aw=avg_adult_pop], fe vce(cluster panel_id)
    Does anybody know, how to solve this problem?

    Thank you very much for your help.

    Best
    LM










  • #2
    In the first regression your weights are adult_pop, in the second they are avg_adult_pop. It appears that some values of avg_adult_pop are negative, but no values of adult_pop were negative, which is why the OLS regression did not have this problem.

    Comment


    • #3
      Thank you so much William.

      Comment

      Working...
      X