kylebutts / vcovSUR

Seemingly-unrelated regressions
GNU General Public License v3.0
8 stars 0 forks source link

Degree of Freedom alternatives #1

Closed kylebutts closed 1 year ago

kylebutts commented 1 year ago

Currently, vcovSUR(est) matches vcov(est, "hc1", ssc = ssc(adj = FALSE, cluster.adj = FALSE)) which uses 1/n adjustment. I believe that is Stata's default in sur.

Currently, I think I will check if n matches across estimates and use the dof/dof2 options, otherwise ignore that option and display a note.

@jonathandroth, can you think of a solution when different samples are used?

jonathandroth commented 1 year ago

I am not sure. Maybe try working out a simple case where you have like

Y1 ~ constant Y2 ~ constant

and Y1 and Y2 can each be missing at random.

On Wed, Jul 12, 2023 at 11:22 AM Kyle F Butts @.***> wrote:

Currently, vcovSUR(est) matches vcov(est, "hc1", ssc = ssc(adj = FALSE, cluster.adj = FALSE)) which uses 1/n adjustment. I believe that is Stata's default in sur.

-

I could make the normal X/n small sample adjustment where X is sqrt((n

  • k_1)(n - k_2)) or mean(c(n - k_1, n - k_2)) which correspond to Stata's dof/dof2 adjustment options.
  • However, it's not clear to me what to do when different datasets are used in each regression, one uses a subsample, etc. because then n does not match across regressions.

Currently, I think I will check if n matches across estimates and use the dof/dof2 options, otherwise ignore that option and display a note.

@jonathandroth https://github.com/jonathandroth, can you think of a solution when different samples are used?

— Reply to this email directly, view it on GitHub https://github.com/kylebutts/vcovSUR/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE6EXFAX7IBBLHSJB7FZIX3XP26LHANCNFSM6AAAAAA2HU5ZYY . You are receiving this because you were mentioned.Message ID: @.***>

kylebutts commented 1 year ago

Update (more-so for my notes, than for you in particular Jon).

The suest command uses a degree of freedom adjustment that I can not for the life of me figure out what adjustment they are making; it's too quite a bit too small relative to $\frac{n}{n - k}$. I believe it's just an incorrect adjustment (as the documentation notes in a "technical note").

The stackreg command does the following (suest also applies a different adjustment for each block):

The element-specific adjustment factors are $\sqrt{c{g} * c{h}}$, with $c{g}$ and $c{h}$ denoting the equation-specific adjustment factors and $g$ and $h$ indexing the equations $1, \dots, G$.

This strikes me as reasonable since (1) you match the standard errors from each regression and apply a degree of freedom adjustment that matches dfk from sureg (though that estimates via FGLS), (2) it applies a small-sample adjustment in the case of clustered SEs (e.g. states).

It's not particularly theoretically rigorous form of a small-sample adjustment, but even without an adjustment, the estimates are consistent...