[R] Panel regression

vincent.deluard vincent.deluard at trimtabs.com
Mon Oct 25 22:59:40 CEST 2010



Hi,

I am trying to run a panel regression where I have a matrix of observations
and a matrix of independant variables - examples would trying to predict
countries's GDP with their data on education, FDI, tax rates, over time.

For the purpose of simplicity, my data would be:

dep = matrix(rnorm(50),ncol=5) 
indep1 = matrix(rnorm(50),ncol=5)
indep2 = matrix(rnorm(50),ncol=5)

>From what I could find, the lme{nlme} function would be the function.
However, after I installed the package and I type in:

> lme(dep~indep1, indep2)
Error in model.frame.default(formula = ~indep1 + dep, data =
c(-0.63665929869261,  : 
  'data' must be a data.frame, not a matrix or an array 

I keep getting error messages even after I transform the data in a data
frame. Any idea on how I could get R to perform a simple panel regression?


Thanks!
-- 
View this message in context: http://r.789695.n4.nabble.com/Panel-regression-tp3012794p3012794.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list