TransWikia.com

Prodest package in R for TFP estimation, gives different results

Economics Asked by Wadim iLchuk on December 16, 2020

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?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP