When I do the two ways model in the plm
package, my understanding is that it should have fixed effects for group and time, but when I manually look at the fixed effects it only produces fixed effects for the group variable. For example, using the canned data in the plm package:
> data("Produc", package = "plm")
> zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
data = Produc, index = c("state","year"),model='pooling')
> qq <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
data = Produc, index = c("state","year"),model='within',effects='twoways')
> length(fixef(zz))
Error in fixef.plm(zz) : fixef is relevant only for within models
> length(fixef(qq))
[1] 48
> length(unique(Produc$state))+length(unique(Produc$year))
[1] 65
My expectation is that the last two lines should be equal, i.e. that there should be year and state fixed effects. Why are they different?