Announcement

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

  • -gmm-: Getting the Omega in the GMM Sandwich Formula

    Hello all,

    I am writing a -gmm- moment-evaluator program. I want to get (an estimate of) Ω in the GMM sandwich formula in order to manually construct the variance-covariance matrix. That is, I want the (sample version of) Ω found in (GTWG)-1GTWΩWTG(GTWTG)-1, where Ω=E[g(...)g(...)T] is the expected value of the outer product of the moment function vector with itself. Is there a nice way to do this in Stata with some sort of command or something similar?

    (I know I can supply analytical derivatives to get the analytical sample vcov matrix, and I've asked an earlier question related to this: https://www.statalist.org/forums/for...-observation-i. However, my G turns out to have a "nice" formula, so it's probably more efficient to directly construct the vcov matrix. Thus, I'm interested in whether it's possible to get Ω from some sort of built-in functionality because that allows a user to easily change the assumed structure of Ω through the -vce()- option.)
    Last edited by William Liu; 15 Jun 2023, 14:58.

  • #2
    I actually has a similar discussion with ppl from Stata when I was working on writing the first code for csdid. And the short answer is no.
    You will have to derive omega manually
    F

    Comment

    Working...
    X