# estimate a panelmodel
data("Produc", package = "plm")
z <- plm(log(gsp)~log(pcap)+log(pc)+log(emp)+unemp,data=Produc,
model="random", subset = gsp > 5000)
nobs(z) # total observations used in estimation
pdim(z)$nT$N # same information
pdim(z) # more information about the dimensions (no. of individuals and time periods)
Run the code above in your browser using DataLab