How to calculate standard rebooted panels using R?

I recently changed from STATA to R and somehow tried to find some relevant commands. I would like to get standard panel errors downloaded from the Fixed Effect model using the plm library as described here for plm users here :

  • My questions are about the whole approach (whether the download is the appropriate library or library (meboot))

  • How to solve this specific error using download:

First enter some panel data:

 library(plm) data(EmplUK) # from plm library test<-function(data, i) coef(plm(wage~emp+sector,data = data[i,], index=c("firm","year"),model="within")) 

Secondly:

 library(boot) boot<-boot(EmplUK, test, R = 100) > boot<-boot(EmplUK, test, R = 100) duplicate couples (time-id) Error in pdim.default(index[[1]], index[[2]]) : Called from: top level Browse[1]> 
+5
source share
1 answer

For some reason, boot will pass the index (original here) to plm with duplicate values. You must remove all duplicate values ​​and claim that the index is unique before passing it to plm .

 test <- function(data,original) { coef(plm(wage~emp+sector,data = data[unique(original),], index=c("firm","year"),model="within")) } boot(EmplUK, test, R = 100) ## ORDINARY NONPARAMETRIC BOOTSTRAP ## Call: ## boot(data = EmplUK, statistic = test, R = 100) ## Bootstrap Statistics : ## original bias std. error ## t1* -0.1198127 -0.01255009 0.05269375 
+3
source

All Articles