function [H,dH]=gmmh(theta);
%GMMHC A user-supplied function for GMM estimation.
% [H,dH]=gmmhc(theta) is called by GMM and GMMJC if restrict=1.
% H is a nobs x m (or mgmm) matrix with rows containing the
% vectors h(x(t+n),theta(induc)), where it is assumed that
%
% E[ h(x(t+n),theta(induc)) | I(t) ] = 0, t=1,...,nobs.
%
% dH is a nobs x (m*length(induc)) matrix containing the
% derivatives of H with respect to the elements of theta(induc).
% See also GMMH.
%
% Restricted case for:
% Hansen, L.P. and K.J. Singleton, "Generalized Instrumental
% Variables Estimation of Nonlinear Rational Expectations
% Models," ECONOMETRICA, 50:1269-1286, 1982, pp. 1281-1282.
%
beta = theta(1);
alpha = -1.19;
H=beta*xgmm(:,1).^alpha.*xgmm(:,2)-1;
if nargout>1;
dH=(H+1)/beta;
end;