Hi everyone,

I have an issue while running command "random" in the package plm.

library(plm)

library(pwt9)

data("pwt9.1")

#creating log of variables

lnrgdpo<- log(pwt9.1$rgdpo)

lnrkna<-log(pwt9.1$rkna)

lnhc<-log(pwt9.1$hc)

lnlabsh<-log(pwt9.1$labsh)

lnemp<-log(pwt9.1$emp)

ap<-(pwt9.1$rgdpo/pwt9.1$emp)

lnap<-log(ap)

pwtdata<-cbind(pwt9.1, lnrgdpo, lnrkna, lnhc, lnlabsh, lnemp, lnap)

penndata <- pdata.frame(pwtdata, index=c("country","year"))

Y <- cbind(lnrgdpo)

X <- cbind(lnrkna, lnhc, lnemp, lnemp, lnlabsh)

# Random effects estimator

random <- plm(Y ~ X, data=penndata, model= "random")

swar <- plm(Y ~ X,

data = penndata, model="random", effect = "twoways")

while I run the command I receive the following error.

Error in solve.default(crossprod(ZBeta)) :

Lapack routine dgesv: system is exactly singular: U[5,5] = 0

Can someone help me to solve this issue?