good morning I am trying to calculate the total factor productivity (TFP) for companies in the manufacturing industry through the Levinsohn-Petrin model. To do so, I use the prodest package in R. Unfortunately, it does not calculate the coefficient of materials. I am trying with the estprod package but I get an error. Could anyone help me please ? The database is here.
library(readxl)
library(plm)
library(dplyr)
library(ggplot2)
library(estprod)
library(broom)
data0=read_excel("C:/Users/Greissly/Documents/UIS/Maestria/TESIS/Bases_de_datos/Libro1.xlsx", col_names=T)
names(data0)
PData <- pdata.frame(data0, index = c("ID","Year"))
pdim(PData)
mod1LP = estprod::levinsohn_petrin(data = PData, Y ~ L | C | M,
id = "ID", time = "Year", bootstrap = TRUE, gross = TRUE)
The error is the following:
mod1LP = estprod::levinsohn_petrin(data = PData, Y ~ L | C | M, id = "ID", time = "Year", bootstrap = TRUE, gross = TRUE)
Error in if (nrow(index_e1) >= nrow(index_e2)) index_e1 else index_e2 : argumento tiene longitud cero