data(Produc, package="plm")
data(usaww)
usalw <- spdep::mat2listw(usaww)
fm <- log(gsp)~log(pcap)+log(pc)+log(emp)+unemp+slag(log(pcap),
listw=usalw)
slxmod <- spreml(fm, data=Produc, w = usaww,
model="pooling", lag=FALSE, errors="ols")
Run the code above in your browser using DataLab