0

I have my data-frame Alist500HB1, 10 variables i.e date, cls, log ROA, Log TA etc. I am running a simple panel regression.

plm(Alist500HB1$`Log Q`~Alist500HB1$`CLASSIFIED_BOARD_SYSTEM`+Alist500HB1$`Log TA`+Alist500HB1$`Log ROA`+Alist500HB1$`Log Capex`+Alist500HB1$`onethirdRD`+Alist500HB1$`RD dummy `+Alist500HB1$`onethirdInsider`+Alist500HB1$`PCT_FLT_SHARES_INSTITUTIONS`+Alist500HB1$`onethirdsalesgrowth`+Alist500HB1$`TOT_DEBT_TO_TOT_ASSET`+Alist500HB1$`Logprofit margin`+Alist500HB1$`onethirdassetgrowth`+Alist500HB1$`Log Age`,
    data = `Alist500HB1`, index=c("GICS"), model = "random"
)

When I running the regression I am getting this:

Error in [[<-.data.frame(tmp, time.name, value = c(1L, 2L, 3L, 4L, : replacement has 2473 rows, data has 2475

I understand some posts saying this is due to the N/A data, however, I don't wish to clean them up (if so i can do data <- na.omit(data)) but this will largely reduce my sample size which I don't want to see.

Can someone please give any suggestion how to deal with this? Should I keep cleaning NA data or other reasons?

Many thanks

Here is the screenshot of the data: enter image description here

Guo Yijin
  • 25
  • 6
  • 1
    This is impossible to tell without a reproducible example or with your data. Are you using the most recent version of plm? – Helix123 Jul 26 '19 at 17:36
  • Could you please see the attached sample data? – Guo Yijin Jul 29 '19 at 10:17
  • Well... screenshot data. Could you please see this thread about a reproducible example: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Helix123 Jul 31 '19 at 21:06

0 Answers0