Hello,
I am running a two-step dynamic difference GMM with a pilot Stata command. This command calculate estimates and standard errors but does not calculate the Hansen j test of overidentifying restrictions. The pilot command builds on xtabond2 in terms of syntax. I am estimating something like this:

Code:
 newabond y l.y l.x l.k yeardum*, gmm(y k x, lag(2 6) collapse) iv(yeardum*) noleveleq small two noconstant
I am not a statistician, nor an expert of any kind, I am trying to compute the Hansen j test of overidentifying restrictions by hand, to see whether my instruments are endogenous. Unfortunately, the
Code:
estat overid
does not work on this command.

I have access to the original data and the following information, do you believe it is possible to calculate the Hansen j statistic and p-value with this information?

HTML Code:
Scalars

      e(N)                 Number of complete observations in untransformed data (system GMM) or transformed data (difference GMM)
      e(N_g)               Number of included individuals
      e(g_min)             Lowest number of observations in an included individual
      e(g_max)             Highest number of observations in an included individual
      e(g_avg)             Average number of observations per included individual
 
      e(iterations)        Number of iterations after iterated GMM estimation
 
      e(chi2)              Wald statistic (if small not specified)
 
      e(chi2p)             p-value of Wald statistic (if small not specified)
 
      e(F)                 F-statistic
 
      e(Fp)                p-value of F-statistic
 
   Macros
      e(ivinstsi)          Variables listed in ivstyle group i
 
      e(gmminstsi)         Variables listed in gmmstyle group
 
      e(tvar)              Time variable
 
      e(ivar)              Individual (panel) variable
 
      e(depvar)            Dependent variable
      e(xvars)             List of regressors
 
      e(properties)        "system" or "difference"
      e(small)             "small" for small

Matrices
      e(b)                 Coefficient vector
      e(V)                 Variance-covariance matrix of the estimators

If anyone could tell me the steps I need in order to calculate the Hansen j I would be extremely grateful.

I thank you a lot in advance for your help