[R] plm function & plm r.squared error

fay constanze constanze_fay at yahoo.de
Mon Feb 16 23:25:25 CET 2015


 
DearGiovanni,Congratulationsfor the truly helpful plm package! Being new to R, I have a problem with the plm function for financial markets timeseries data: After having defined a large, unbalanced panel pdata.frame (https://www.dropbox.com/s/2r9t1cu9v65gobk/Database_CN_2004.csv?dl=0)and running a simple OLS model of two variables regressing company returns(Perf) on index returns (PerfIn)synch <-plm (Perf ~ PerfIn , data=pCN04, na.action = na.omit, index=c("Unit", "Week"), model="pooling") I keepreceiving the following error:Error in model.matrix.pFormula(formula, data, rhs =1, model = model,  :   NA in theindividual index variableIn addition:Warning message:In `[.data.frame`(index, as.numeric(rownames(mf)),) :  NAsintroduced by coercion
There aremuch more NAs in y (Perf) than in x (PerfIn) and I have tried to get rid ofthem with na.omit. Another error I have is with the same model for the r.squaredfunction r.squared(pCN04,model=NULL, Perf ~ PerfIn, type= "ess")Error in tss.default(object, model = model) :   unused argument (model = model)In addition: Warning message:In mean.default(haty) : argument is not numeric or logical: returning NAMany thanks in advance,your help is very precious to me!Constanze



	[[alternative HTML version deleted]]



More information about the R-help mailing list