Ulrich Morawetz
2010-Jul-15 11:49 UTC
[R] pgmm error with lags higher than 2 in GMM instruments (package plm)
Hello Giovanni, Hello Yves, Hello R-help-Readers, I re-run an old code of mine which uses the pgmm() function (and which used to work with an older versions) under plm version 1.2-4 and got the following error message Error in cbind(xd, td.model.diff) : number of rows of matrices must match (see arg 2) The error can be reproduced with the example from help when the lag of the GMM-instruments is changed from starting from e.g. 2 to 3 (here for example "...|lag(log(emp), 3:99)..." in stead of "...|lag(log(emp), 2:99)..." ):> pgmm(log(emp) ~ lag(log(emp), 1)+ lag(log(wage), 0:1) ++ lag(log(capital), 0:1) | lag(log(emp), 3:99) + + lag(log(wage), 2:99) + lag(log(capital), 2:99), + data = EmplUK, effect = "twoways", model = "onestep", + transformation = "ld") Error in cbind(xd, td.model.diff) : number of rows of matrices must match (see arg 2) Is this only _my_ problem or is it re-producable by others as well? Is it weird to have the lag 2 not included as gmm-instrument? Did I make an error in the call of the model (there used to be the option of specifying lag.gmm e.g. as "lag.gmm=list("d"=c(2,4),"l"=c(0,99)))" )? As far as I understood it must have to do something with number of rows of td.model.diff (respective with time.lost.level) in the pgmm() function. I am using R 2.11.1 under Windows 7 Thank you for your comments, Uli