0
library(plm)

dat <- read.csv("dat.csv")

z1 <- pgmm(
  nz ~  bs  | pc ,
  dat,
  # subset,
  # na.action,
  effect = c("twoways", "individual"),
  model = c("onestep", "twosteps"),
  collapse = FALSE,
  lost.ts = NULL,
  transformation = c("d", "ld"),
  fsm = NULL,
  index = NULL,

   )


    Error in cbind(yX1[[i]], V1) : 
    number of rows of matrices must match (see arg 2)

I am getting the above error while running pgmm from package plm on my data, I will appreciate any help in resolving this glitch.

The link to my data, is as follows: https://drive.google.com/file/d/19h7TKxMymnZJ4LPJUZAxgnfRrcaiU4h5/view?usp=sharing

Helix123
  • 3,502
  • 2
  • 16
  • 36
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 11 '22 at 13:51

1 Answers1

0

Consider putting in lag as shown below:

nz ~  lag(bs,0:1)  | pc ,
ouflak
  • 2,458
  • 10
  • 44
  • 49