Skip to content
Back to formatted view

Raw Message

Message-ID: <1050891304.3ea354281c3e2@webmail.fas.harvard.edu>
Date: 2003-04-21T02:15:04Z
From: langensk@fas.harvard.edu
Subject: To create a Panel and run a Pooled OLS

Dear all,

I have tried to merge two cross sections (crossA and crossB) as follows, both 
crossA and crossB include the same variables, e.g., ID,y,x1,x2:

Panel <- merge(crossA,crossB,by="ID")

I have, thereafter, tried to run the following pooled OLS:

OLS <- lm(Panel$y~Panel$x1+Panel$x2)

and have received the following error message "Error in model.frame(formula, 
rownames, variables, varnames, extras, extranames,  : invalid variable type"

I would be very grateful for help. At the moment, I believe that I have tried 
everything.

Thanks in advance,
Sophie