To create a Panel and run a Pooled OLS
Have you tried the following: OLS <- lm(Panel$y~Panel$x1+Panel$x2, data=Panel) If yes, could you replicate the error with a small data set that you send with your help request? It can make it easier for others to diagnose. Hope this helps. spencer graves
langensk at fas.harvard.edu wrote:
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
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help