1
$\begingroup$

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

$\endgroup$
1
  • 2
    $\begingroup$ It is advisable to post text as text rather than as image. This helps visually impaired readers, as text can be read out loud while an image cannot. Text can also be copied and pasted on a search engine to look for similar cases and their solutions. $\endgroup$ Commented Oct 28, 2022 at 17:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.