Announcement

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

  • Counting the # of factors when using "i.index"

    I am running ols with individual fixed effects and year fixed effects by including "i.index" and "i.year". I cannot use xtreg because I need to use 'iweight' option.

    Is there a way to compute # of index that were included in the regression? I have more than 9,000 individuals thus manually counting is not feasible.

  • #2
    Maybe something along these lines
    Code:
    sysuse auto
    regress headroom i.rep78
    
    *
    * Begin here
    *
    preserve
    quietly keep if e(sample)
    contract rep78
    count
    restore

    Comment

    Working...
    X