0
$\begingroup$

I have the following issue: each time I run the estimation of the TFP by using prodest package in R 4.0.3, I obtain different coefficients before the variables as well as omega variable is different:

The dataset is here: https://drive.google.com/file/d/11cZ4ozUOtKxlXR3fLtjaQjsr9G-z54yN/view?usp=sharing

The code is the following:

remove(list=ls())

library(plm)
library(dplyr)
library(ggplot2)
library(prodest)


pckg<-c("plm","readxl","dplyr","ggplot2","prodest")
install.packages(c("plm","readxl","dplyr","ggplot2","prodest"))
lapply(pckg, require, character.only = TRUE)

# Set the working directory
setwd("------")

# Downloading the survey data
Data <- read.csv("test.csv", header=TRUE, sep=",")
str(Data)

Data$ID<-as.numeric(as.factor(Data$ID))

summary(Data)

# Creating a panel data frame

DataA <- Data %>% 
  filter(NACE == 'A') %>% 
  filter(VA > 0, L > 0, FA > 0, M > 0, Turn > 0, TFA > 0) %>%
  mutate(ID = ID,
         Year = Year,
         l = log(L),
         va = log(VA),
         k = log(TFA),
         m = log(M),
         turn = log(Turn),
         ta = log(TA))


  
####################################################################################################################################
mod2LP <- prodest::prodestLP(DataA$va, fX = DataA$l, sX = DataA$k, pX = DataA$m, idvar = DataA$ID, timevar = DataA$Year, 
                             R = 100, cX = NULL, opt = "optim", theta0 = NULL, cluster = NULL, tol = 1e-100, exit = FALSE)  
mod2LP
omegaLP <- prodest::omega(mod2LP)
summary(mod2LP)
summary(omegaLP)

DataA$omega <- prodest::omega(mod2LP) 

hist(omegaLP)


mod2OP <- prodest::prodestOP(DataA11$turn, fX = DataA11$l, sX = DataA11$k, pX = DataA11$m, idvar = DataA11$ID, timevar = DataA11$Year, 
                             R = 100, cX = NULL, opt = "optim", theta0 = NULL, cluster = NULL, tol = 1e-100, exit = FALSE)  

mod2OP
omegaOP <- prodest::omega(mod2OP)
summary(mod2OP)
summary(omegaOP)



mod2ACF <-  prodest::prodestACF(DataA$va, fX = DataA$l, sX = DataA$k, pX = DataA$m, idvar = DataA$ID, timevar = DataA$Year, 
                                R = 100, cX = NULL, opt = 'optim', theta0 = NULL, cluster = NULL)  

mod2ACF
omegaACF <- prodest::omega(mod2ACF)
summary(mod2ACF)
summary(omegaACF)

DataA$omega <- prodest::omega(mod2ACF) 



mod2W <-  prodest::prodestWRDG(DataA$va, fX = DataA$l, sX = DataA$k, pX = DataA$m, idvar = DataA$ID, timevar = DataA$Year, 
                                   cX = NULL)  
mod2W
omegaW <- prodest::omega(mod2W)
summary(mod2W)
summary(omegaW)

####################################################################################################################################

Now if you run ACF or Wooldridge methods several times, you will obtain different coefficients as well as TFP measures.

Any ideas on how to solve it?

$\endgroup$
3
  • 1
    $\begingroup$ what do you mean you get different results? I tested the code and every model you include always gives the same coefficient estimates when the code is rerun. Of course the models you test are not the same model so their individual results will not be the same - thats not by accident since they are representing different methods but they do not change on re-running of the code as far as I can see. Can you pls provide some example of what you mean by this? $\endgroup$ – 1muflon1 Nov 23 '20 at 12:44
  • $\begingroup$ Now I run ACF model and get 0.537 and 0.404 coefficients with mean omega 0.9904. Second time I run ACF code, I get 0.406 and 0.378 coefficients and mean omega 1.466. Third time -0.046 and 0.508 and mean omega 1.912 $\endgroup$ – Wadim iLchuk Nov 24 '20 at 16:05
  • $\begingroup$ @1muflon1 Do you have any ideas, why that can happens? Maybe it is because theta0 variable, that could be added to the formula of ACF, to run the same optimization? $\endgroup$ – Wadim iLchuk Dec 1 '20 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.