Skip to content
Prev 30892 / 398506 Next

To create a Panel and run a Pooled OLS

On Mon, 21 Apr 2003, Sophie Langenskiold wrote:

            
I think your problem is with the merge() statement. The Panel dataframe
looks like
i Y.x X1.x Y.y X1.y
1 1   3    2   2    5
2 2   2    3   3    6
3 3   2    4   1    7

so it doesn't have X1 or Y variables.

The solution depends on what you want, but my guess is that you need
  Panel<-rbind(Cross1,Cross2)
  lm(Y~X1,data=Panel)

Or perhaps
   Panel<-rbind(cbind(Cross1,time=1),cbind(Cross2,time=2))
   lm(Y~X1,data=Panel)


	-thomas