Hi all, I want to use the estimation method fixed effect on my panel data. I have found plm function but it give me a problem,my model is: 1/5*log(z_{i,t}/r_{i,t})=a+b*r_{i,t}+u_{i,t} , I have 9 individuals and 5 time for each individuals so I have 45 observation
this is what I do: > p <- c("italia","italia","italia","italia","italia","spagna", .....) > t <- c(1980,1985,1990,1995,2000,1980, .....) > y <- 1/5*log(z/r) > x <- log(r) > X <-cbind(p,t,y,x) > X <- data.frame(X) > ooo <- plm.data(X) > ooo p t y x 41 austria 1980 0.0346493597549657 0.179025476619000 42 austria 1985 0.0287375757505195 0.352272275393828 . . . . > vedo<-plm(y~x,data=ooo) Errore in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 0 (non-NA) cases Inoltre: Warning messages: 1: In model.response(mf, "numeric") : using type="numeric" with a factor response will be ignored 2: In Ops.factor(y, y.m) : - not meaningful for factors I do also in other way: > Z <-cbind(p,t,z,r) > Z <-data.frame(Z) > zz<-plm.data(Z) > zz p t z r 41 austria 1980 1.42229572713245 1.19605121512085 42 austria 1985 1.64207412666992 1.42229572713245 . . . > xxx<-plm(1/5*log(z/r)~log(r),data=zz) Errore in Math.factor(c(1L, 5L, 9L, 14L, 17L, 25L, 26L, 27L, 32L, 38L, : log not meaningful for factors Inoltre: Warning message: In Ops.factor(y1, x1) : / not meaningful for factors what I can do? thanks in advance [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.