You can find the data here: https://copy.com/9JVKUV9FWd4p , it's taken from the book "A guide to modern econometrics" by Verbeek. The way I understand I need to build the matrix:

First create an empty matrix and then fill it by columns. For the first column, fill it with the moment condition for the intercept, and for the rest of the columns, fill them one by one with each moment condition for each parameter theta

*.*

Any comment or remark is appreciated.

P.S.: The goal is not the estimate this model per se. I'm working on a paper where I need to use gmm to estimate the parameters of an utility function, but I wanted to first know how to use it on a toy data set.

P.P.S.: I did of course the examples that come in the vignette of the package, but they are very simple and don't explain clearly what you ought to do when you try to estimate more parameters than just one or two.

Any comment or remark is appreciated.

P.S.: The goal is not the estimate this model per se. I'm working on a paper where I need to use gmm to estimate the parameters of an utility function, but I wanted to first know how to use it on a toy data set.

P.P.S.: I did of course the examples that come in the vignette of the package, but they are very simple and don't explain clearly what you ought to do when you try to estimate more parameters than just one or two.