TFP in R via estprod package I want to calculate the TFP by using the estprod function (I use R 4.0.2). As far as I understood the only way to calculate the TFP is manual following this logic .
omega_1 = (data$Y - data$Labor*coefs$statistic[1] - data$Capital*coefs$statistic[2] - data$Materials*coefs$statistic[3]) - this is basically the approach other author on StackExchange suggested to use in order to calculate the TFP. However, after running the regressions (LP, OP, Wooldridge) I get only 2 coefficients in the output, for capital and fo labor only, while for materials the coefficient is missing.
Would really much appreciate any comments and support, the dataset is available here:  https://drive.google.com/file/d/1aedWYABus1fQjKWxkOmYOmxv-qSja7hF/view?usp=sharing
The code is the following so far:
remove(list=ls())

library(plm)
library(dplyr)
library(ggplot2)
library(prodest)
library(estprod)
library(broom)

# Set the working directory
setwd(&quot;C:/Users/vadya/Desktop/baka&quot;)

# Downloading the survey data
Data &lt;- read.csv(&quot;LV.csv&quot;, header=TRUE, sep=&quot;,&quot;)
str(Data)

Data$ID&lt;-as.numeric(as.factor(Data$ID))

summary(Data)

# Creating a panel data frame
PData &lt;- pdata.frame(Data, index = c(&quot;ID&quot;,&quot;Year&quot;))

pdim(PData)
pvar(PData)

DataA &lt;- Data %&gt;% 
  filter(NACE == 'A') %&gt;% 
  filter(VA &gt; 0, L &gt; 0, K &gt; 0, M &gt; 0) %&gt;%
  select(ID, Year, L, VA, K, M) %&gt;% 
  summarise(ID = ID,
            Year = Year,
            l = log(L),
            va = log(VA),
            k = log(K),
            m = log(M))

####################################################################################################################################
mod1LP = estprod::levinsohn_petrin(data = DataA, va ~ l | k | m, id = &quot;ID&quot;, time = &quot;Year&quot;, bootstrap = TRUE, gross = FALSE)
summary(mod1LP)

mod1OP = estprod::olley_pakes(data = DataA, va ~ l | k | m, id = &quot;ID&quot;, time = &quot;Year&quot;, bootstrap = TRUE, gross = FALSE)
summary(mod1OP)

mod1W = estprod::wooldridge(data = DataA, va ~ l | k | m, id = &quot;ID&quot;, time = &quot;Year&quot;, bootstrap = TRUE, gross = FALSE)
summary(mod1W)
In order to get coefficient for the materials in the Levinsohn-Petrin model you need to set the gross option true.
 mod1LP = estprod::levinsohn_petrin(data = DataA, va ~ l | k | m, id = &quot;ID&quot;, time = &quot;Year&quot;, bootstrap = TRUE, gross = TRUE)
     summary(mod1LP)

    Call
estprod::levinsohn_petrin(data = DataA, formula = va ~ l | k | 
    m, gross = TRUE, id = &quot;ID&quot;, time = &quot;Year&quot;, bootstrap = TRUE)

Coefficients
   Estimate Std. Error z value  Pr(&gt;|z|)    
l 0.1033754  0.0067384  15.341 &lt; 2.2e-16 ***
k 0.5859219  0.0048667 120.394 &lt; 2.2e-16 ***
m 0.4808831  0.0143580  33.492 &lt; 2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

#Bootstraped standard errors.

The other two functions unfortunately don't collect the coefficients for proxy variables.
An alternative is to find some different proxy and use $m$ as a control (I do not necessarily endorse such option from scientific perspective but if you are hell bent on having coefficient for $m$ its an option). In your dataset you don't have any additional variables beside $l$, $k$ and $m$ (aside from COGS that is always N/A) so I will just create a new variable to show it would work:
 DataA$m2&lt;-(DataA$m)^2

mod1OP = estprod::olley_pakes(data = DataA, va ~  l |  k | m2 |  m, id = &quot;ID&quot;, time = &quot;Year&quot;, bootstrap = TRUE, gross = TRUE)
 summary(mod1OP)
 
     
    Call
estprod::olley_pakes(data = DataA, formula = va ~ l | k | m2 | 
    m, id = &quot;ID&quot;, time = &quot;Year&quot;, bootstrap = TRUE, 
    gross = TRUE)

Coefficients
    Estimate Std. Error z value  Pr(&gt;|z|)    
l  0.1057613  0.0040007 26.4360 &lt; 2.2e-16 ***
k  0.4643984  0.0308697 15.0438 &lt; 2.2e-16 ***
m -0.0458770  0.0048684 -9.4234 &lt; 2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

#Bootstraped standard errors.
 


   mod1W = estprod::wooldridge(data = DataA, va ~ l | k | m2 | m, id = &quot;ID&quot;, time = &quot;Year&quot;, bootstrap = FALSE, gross = TRUE)
     summary(mod1W)

Call
estprod::wooldridge(data = DataA, formula = va ~ l | k | m2 | 
    m, gross = TRUE, id = &quot;ID&quot;, time = &quot;Year&quot;, bootstrap = FALSE)

Coefficients
   Estimate Std. Error t value  Pr(&gt;|t|)    
l 0.1210159  0.0075386  16.053 &lt; 2.2e-16 ***
k 0.4670722  0.0135809  34.392 &lt; 2.2e-16 ***
m 0.2595440  0.0158134  16.413 &lt; 2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Again such course of action does not seem to make sense to me but it gives you the desired output.