I am writing my Bachelor Thesis and I really need help with the TFP estimation. so far I have a dataset with log values of Value added (va), Labour (l), Capital (k), and Materials (m). The initial dataset is available here: https://drive.google.com/file/d/1aedWYABus1fQjKWxkOmYOmxv-qSja7hF/view?usp=sharing
So far my code is:
remove(list=ls()) library(plm) library(dplyr) library(ggplot2) library(prodest) library(estprod) library(broom) setwd("C:/Users/vadya/Desktop/baka") Data <- read.csv("LV.csv", header=TRUE, sep=",") str(Data) summary(Data) DataA <- Data %>% filter(NACE == 'A') %>% filter(VA > 0, L > 0, K > 0, M > 0) %>% mutate(l = log(L), va = log(VA), k = log(K), m = log(M)) wooldridge(data = DataA, va ~ l | k | m, id = "ID", time = "Year", bootstrap = TRUE, gross = FALSE) levinsohn_petrin(data = DataA, va ~ l | k | m, id = "ID", time = "Year", bootstrap = TRUE, gross = FALSE) olley_pakes(data = DataA, va ~ l | k | m, id = "ID", time = "Year", bootstrap = TRUE, gross = FALSE) mod1 = estprod::levinsohn_petrin(data = DataA, formula = va ~ l | k | m, id = "ID", time = "Year", reps = 20, gross = FALSE) mod1 mod2 = prodest::prodestLP(DataA$va, fX = DataA$l, sX = DataA$k, pX = DataA$m, idvar = DataA$ID, timevar = DataA$Year, opt='optim', exit = FALSE, tol = 1e-100) omega = prodest::omega(mod2)
A saw the same discussion in another theme on StackExchange where a guy was asking the same question, but he had provided some part of his data, and everything worked. But in my case the problems are different.
Does anyone faced the same problem, and is it possible to solve these issues, since I only have begun studying TFP in R, so I would really appreciate your help and any impact provided. Thanks in advance!!!