prodest
prodest copied to clipboard
Questions about parallel computing
Hello, first of all, thank you very much, your package has helped us to conduct a lot of empirical analysis on TFP! I have been asking you a question for a long time. Through practice, it is found that when the sample size is large, no matter stata or R, the program runs very slowly. I noticed that you mentioned the problem of parallel computation in the R package, but when I performed it, it did not increase the speed. Excuse me, is there any other solution?
The code is as follows:
nCores=as.numeric(Sys.getenv("NUMBER_OF_PROCESSORS")) cl=makeCluster(getOption("cl.cores", nCores)) set.seed(154673) LP.fit=prodestLP(df$lny, fX = df$lnl, sX=df$lnk, pX=df$lnm, idvar=df$id_num, timevar=df$year)
OP.fit=prodestOP(df$lny, fX = df$lnl, sX=df$lnk, pX=df$lnm, idvar=df$id_num, timevar=df$year) stopCluster(cl)