ycroissant / plm

Panel Data Econometrics with R
GNU General Public License v2.0
49 stars 13 forks source link

`I()` in LHS #17

Closed tappek closed 2 years ago

tappek commented 2 years ago

I() in the LHS can lead to an error. See below reproducible example

data(Produc)
fm1 <-   diff(log(gsp))  ~ log(pcap) + log(pc) + log(emp)
fm2 <- I(diff(log(gsp))) ~ log(pcap) + log(pc) + log(emp)

plm(fm1, Produc) # runs
plm(fm2, Produc) # errors
## plm version 2.2-5
# Error in is.pbalanced.default(x) :
#   argument "y" is missing, with no default

## plm version 2.6-0
# Error in fwithin.default(x, g = effect, w = NULL, na.rm = na.rm) :
#   length(g) must match nrow(X)
tappek commented 2 years ago

fixed in commit 6d9ea4a687e95eaf59b852d9a12d6434941d84f7 fixed in 2.6-1 on CRAN as of 2022-03-05