1 Preliminaries: Data importation

library("readxl")
my_data <- read_excel("mydatax.xlsx")
m = my_data$Markup
hist(m, probability = TRUE, col = "lightgrey")
mm = seq(from = min(m), to = max(m), length.out = 10^4)
lines(mm, col = 2, lwd = 2)

Minimum markup in the data \(m_{min}\):

(mmin = min(m))
## [1] 1.001387

Maximum markup in the data \(m_{max}\):

(mn = max(m))
## [1] 9.977231

Number of observations \(n\):

(nn = length(m))
## [1] 2457

2 Markup estimation

2.1 Underlying productivity distribution: Pareto

We assume that firm productivities follow a Pareto distribution \(\phi\sim \mathcal{P}(\underline{\phi}, k)\) with CDF: \[\begin{equation} G_{P}(\phi) = 1 - \underline{\phi}^k \phi^{-k} \label{pareto} \end{equation}\]

Parameters of Pareto distribution: lower bound \(\underline\phi>0\) and shape \(k>0\).

2.1.1 CREMR demand

The CDF of the markup distribution implied by the assumptions of Pareto productivity and CREMR demand \(p(x)=\frac{\beta }{x}\left( x-\gamma \right)^{\frac{\sigma-1}{\sigma}}\) is:

\[\begin{align} B(m)={}&1 - \underline{\phi}^k \left(\frac{1}{\beta}\frac{\sigma}{\sigma-1}\left(\frac{\frac{\sigma-1}{\sigma}m}{1-\frac{\sigma-1}{\sigma}m}\gamma\right)^{\frac{1}{\sigma}}\right)^{-k}\;\;\; \text{with} \;\;\; m \in \left[\underline{m}, \frac{\sigma}{\sigma - 1}\right]\\ ={}&1-\omega^{k}\left(\frac{(\sigma-1)m}{m+\sigma-\sigma m}\right)^{-\frac{k}{\sigma}} \end{align}\]

where \(\omega=\frac{\underline{\phi}\beta}{\gamma^{\frac{1}{\sigma}}}\frac{\sigma-1}{\sigma}=\left(\frac{(\sigma-1)\underline{m}}{\underline{m}+\sigma-\sigma \underline{m}}\right)^{\frac{1}{\sigma}}\)

Let \(b(m)\) denote the the pdf of \(B(m)\):

\[\begin{align} b(m) &= \frac{k\omega^k}{m(m+\sigma-m\sigma)}\left(\frac{(\sigma-1)m}{m+\sigma-\sigma m}\right)^{-\frac{k}{\sigma}}\\ &=\left(\frac{\underline{m}}{\underline{m}+\sigma-\sigma \underline{m}}\right)^{\frac{k}{\sigma}}\frac{k}{m(m+\sigma-m\sigma)}\left(\frac{m}{m+\sigma-\sigma m}\right)^{-\frac{k}{\sigma}} \end{align}\]

The log-likelihood function is:

\[\begin{align} L(\theta) = \sum_{i = 1}^n \log(b(m_i))={}&\sum_{i = 1}^n\log\left(\left(\frac{\underline{m}}{\underline{m}+\sigma-\sigma \underline{m}}\right)^{\frac{k}{\sigma}}\frac{k}{m(m+\sigma-m\sigma)}\left(\frac{m}{m+\sigma-\sigma m}\right)^{-\frac{k}{\sigma}}\right)\\ ={}&n\left(\log k+\frac{k}{\sigma}\log\underline{m}-\frac{k}{\sigma}\log(\underline{m}+\sigma-\sigma\underline{m})\right)+\sum_{i = 1}^n\left(-\frac{\sigma+k}{\sigma}\log m_i+\frac{k-\sigma}{\sigma}\log(m_i+\sigma-m_i\sigma)\right) \end{align}\]

The log-likelihood function is monotonically increasing in \(\underline{m}\), hence \(\hat{\underline{m}}=m_{min}\).

Differentiating the log-likelihood with respect to \(k\) yields:

\[\begin{align} \frac{dL}{dk} &=n(\frac{1}{k}+\log\omega-\frac{1}{\sigma}\log(\sigma-1))+\sum_{i = 1}^n\left(-\frac{1}{\sigma}\log m_i+\frac{1}{\sigma}\log(m_i+\sigma-m_i\sigma)\right)\\ &\Rightarrow \hat k=\frac{\sigma}{\frac{1}{n}\sum_{i = 1}^n(\log m_i-\log(m_i+\sigma-m_i\sigma))+\log(\sigma-1)-\sigma\log\omega} \end{align}\]

And differentiating the log-likelihood with respect to \(\sigma\) yields:

\[\begin{align} \frac{dL}{d\sigma} &=\frac{nk}{\sigma^2}\left(\log(\sigma-1)-\frac{\sigma}{\sigma-1}\right)+\sum_{i = 1}^n\left(\frac{k}{\sigma^2}\left(\log m_i+\log(m_i+\sigma-m_i\sigma)\right)-\frac{(k-\sigma)\sigma(m_i-1)}{m_i+\sigma-m_i\sigma}\right) \end{align}\]

It is not obvious to get a closed-form solution for \(\hat{k}\) and \(\hat{\sigma}\), but we can optimize numerically.

We define the objective function (i.e. minus log-likelihood) for \(b(m)\) (to be minimized):

log_likelihood_b_CREMR = function(theta, m){
  k = theta[1]
  sigma = theta[2]
  -sum(log((k*(mmin/(mmin+sigma-sigma*mmin))^(k/sigma)/(m*(m+sigma-m*sigma)))*(m/(m+sigma-m*sigma))^(-k/sigma)))
}

For the first optimization, we use the following starting values. Let \(m_{max}\) denote the largest markup value (in the data), we have that

\[m_{max} < \frac{\sigma}{\sigma - 1},\]

and

\[\sigma < \frac{m_{max}}{m_{max} - 1}.\]

Therefore, we propose using

\[k_{\text{start}} = 2 \;\;\; \text{and} \;\;\; \sigma_{\text{start}} = \frac{1}{2} \left( 1 + \frac{m_{max}}{m_{max}-1} \right).\] The estimation of \(\sigma\), \(k\) is simply:

# Estimation (CREMR+Pareto)
(theta_startCREMR = c(2, 0.5*(1 + mn/(mn-1))))
## [1] 2.000000 1.055696
(estimCREMR = optim(par = theta_startCREMR, log_likelihood_b_CREMR, m = m))
## $par
## [1] 1.232891 1.111174
## 
## $value
## [1] 3021.716
## 
## $counts
## function gradient 
##       87       NA 
## 
## $convergence
## [1] 0
## 
## $message
## NULL

The estimated parameters are therefore:

(kCREMR=estimCREMR$par[1])
## [1] 1.232891
(sigmaCREMR=estimCREMR$par[2])
## [1] 1.111174
(omegaCREMR=((sigmaCREMR-1)*mmin/(mmin+sigmaCREMR-sigmaCREMR*mmin))^(1/sigmaCREMR))
## [1] 0.1386922

To illustrate this estimation, we plot the empirical distribution (using a histogram) and the estimated pdf:

hist(m, probability = TRUE, col = "lightgrey")
mm = seq(from = min(m), to = max(m), length.out = 10^4)
yy = (kCREMR*((sigmaCREMR-1)*mmin/(mmin+sigmaCREMR-sigmaCREMR*mmin))^(kCREMR/sigmaCREMR)/(mm*(mm+sigmaCREMR-mm*sigmaCREMR)))*((sigmaCREMR-1)*mm/(mm+sigmaCREMR-mm*sigmaCREMR))^(-kCREMR/sigmaCREMR)
lines(mm, yy, col = 2, lwd = 2)

We calculate the Akaike Information Criterion (AIC): \(AIC=2p-2\log(\hat L)\) where \(p\) is the number of estimated parameters and \(\hat L\) is the maximum value of the likelihood function.

#Three estimated parameters
pCREMR = 3
(AIC_CREMR = 2*pCREMR - 2*(-estimCREMR$value))
## [1] 6049.433

2.1.2 Linear demand

Assume the demand is linear \(p(x)=\alpha-\beta x\). Maximum output is \(\bar x=\frac{\alpha}{2\beta}\). The markup is \(m(x)=\frac{\alpha-\beta x}{\alpha-2\beta x}\). Maximum markup is infinite: \(m(x)\to\infty\) as \(x\to\bar x\). Minimum markup \(\underline{m}\).

The CDF of the markup distribution implied by the assumptions of Pareto productivity and linear demand is:

\[\begin{align} B(m) &=1-\left(\frac{2m-1}{\alpha\underline{\phi}}\right)^{-k} \;\;\; \text{with} \;\;\; m \in \left(\underline{m}, \infty\right), \end{align}\]

where \(k > 0\), \(\underline{\phi}>0\), \(\alpha > 0\), and \(\underline{\phi}=\phi(\underline{m})=\frac{2\underline{m}-1}{\alpha}\).

Let \(b(m)\) denote the the pdf of \(B(m)\):

\[\begin{align} b(m) &= 2k(2\underline{m}-1)^k\left(2m-1\right)^{-k-1} \end{align}\]

The log-likelihood function is:

\[\begin{align} L(\theta) = \sum_{i = 1}^n \log(b(m_i))=\sum_{i = 1}^n\log\left(2k(2\underline{m}-1)^k\left(2m_i-1\right)^{-k-1}\right)&=\sum_{i = 1}^n\left(\log(2k)+k\log(2\underline{m}-1)-(k+1)\log(2m_i-1)\right)\\ &=n\left(\log(2k)+k\log(2\underline{m}-1)\right)-(k+1)\sum_{i = 1}^n\log(2m_i-1) \end{align}\]

The log-likelihood function is monotonically increasing in \(\underline{m}\), hence \(\hat{\underline{m}}=m_{min}\).

Differentiating \(L\) with respect to \(k\), we obtain a closed-form expression for the MLE estimator of \(k\):

\[\begin{align} \frac{dL}{dk} &=\frac{n}{k}+n\log(2\underline{m}-1)-\sum_{i = 1}^n\log(2m_i-1)=0\Rightarrow \hat k=\frac{1}{\frac{1}{n}\sum_{i = 1}^n\log(2m_i-1)-\log(2\hat{\underline{m}}-1)} \end{align}\]

MLE estimation:

(omegaLIN=2*mmin-1)
## [1] 1.002774
(kkLIN = nn/(sum(log(2*m-1))-nn*log(omegaLIN)))
## [1] 1.001127
hist(m, probability = TRUE, col = "lightgrey")
mm = seq(from = min(m), to = max(m), length.out = 10^4)
xx = 2*kkLIN*(omegaLIN^kkLIN)*(2*mm-1)^(-kkLIN-1)
lines(mm, xx, col = 3, lwd = 2)

We calculate the Akaike Information Criterion (AIC):

#Two estimated parameters
pLIN = 2
(AIC_LIN = 2*pLIN - 2*(sum(log(2*kkLIN*(omegaLIN^kkLIN)*(2*m-1)^(-kkLIN-1)))))
## [1] 6428.425

2.1.3 LES demand

Assume the demand is LES \(p(x)=\frac{\delta}{x+\gamma}\). The markup is \(m(x)=\frac{x+\gamma}{\gamma}\). Maximum markup is again infinite: \(m(x)\to\infty\) as \(x\to\infty\).

The CDF of the markup distribution implied by the assumptions of Pareto productivity and LES demand is:

\[\begin{align} B(m) &=1-\left(\frac{\gamma}{\delta\underline{\phi}}m^2\right)^{-k} \;\;\; \text{with} \;\;\; m \in \left(\underline{m}, \infty\right), \end{align}\]

where \(k > 0\), \(\underline{\phi}>0\), \(\gamma>0\), \(\delta > 0\), and \(\underline{\phi}=\frac{\gamma}{\delta}\underline{m}^2\).

Let \(b(m)\) denote the the pdf of \(B(m)\):

\[\begin{align} b(m)&=2k\left(\underline{m}\right)^{2k}m^{-2k-1} \end{align}\]

The log-likelihood function is:

\[\begin{align} L(\theta) = \sum_{i = 1}^n \log(b(m_i))=\sum_{i = 1}^n\log\left(2k\left(\underline{m}\right)^{2k}m^{-2k-1}\right)&=\sum_{i = 1}^n\left(\log(2k)+2k\log\underline{m}-(2k+1)\log(m_i)\right)\\ &=n(\log(2k)+2k\log\underline{m})-(2k+1)\sum_{i = 1}^n\log(m_i) \end{align}\]

The estimating pocedure is the same as for linear above. The log-likelihood function is monotonically increasing in \(\underline{m}\), hence \(\hat{\underline{m}}=m_{min}\).

Furthermore, we can get a closed-form solution for the MLE estimator of \(k\). Differentiate \(L\) with respect to \(k\):

\[\begin{align} \frac{dL}{dk} &=\frac{n}{k}+2n\log\underline{m}-2\sum_{i = 1}^n\log(m_i)=0\Rightarrow \hat k=\frac{1}{\frac{2}{n}\sum_{i = 1}^n\log(m_i)-2\log\hat{\underline{m}}} \end{align}\]

MLE estimation:

(omegaLES=mmin^2)
## [1] 1.002776
(kkLES = 1/((2/nn)*sum(log(m))-log(omegaLES)))
## [1] 0.7466883
hist(m, probability = TRUE, col = "lightgrey")
mm = seq(from = min(m), to = max(m), length.out = 10^4)
yy = 2*kkLES*omegaLES^(kkLES)*(mm)^(-2*kkLES-1)
lines(mm, yy, col = 4, lwd = 2)

We calculate the Akaike Information Criterion (AIC):

#Two estimated parameters
pLES = 2
(AIC_LES = 2*pLES - 2*(sum(log((2*kkLES*(omegaLES^(kkLES))*(m)^(-2*kkLES-1))))))
## [1] 6244.631

2.1.4 Translog demand

Assume the demand is translog \(x(p)=\frac{1}{p}(\gamma-\eta\log p)\). The markup is \(m(x)=1+W(\frac{e^{\frac{\gamma}{\eta}}}{\eta}x)\). Maximum markup is again infinite: \(m(x)\to\infty\) as \(x\to\infty\).

The CDF of the markup distribution implied by the assumptions of Pareto productivity and translog demand is:

\[\begin{align} B(m) &=1-\left(\frac{e^{-1-\frac{\gamma}{\eta}}}{\underline{\phi}}me^{m}\right)^{-k} \;\;\; \text{with} \;\;\; m \in \left(?, \infty\right), \end{align}\]

where \(k > 0\), \(\underline{\phi}>0\), \(\gamma>0\), \(\eta > 0\), and \(\underline{\phi}=\phi(\underline{m})=\underline{m}e^{\underline{m}}e^{-1-\frac{\gamma}{\eta}}\)

Let \(b(m)\) denote the the pdf of \(B(m)\):

\[\begin{align} b(m) &= k\left(\underline{m}e^{\underline{m}}\right)^{k}(m+1)m^{-k-1}e^{-km} \end{align}\]

The log-likelihood function is:

\[\begin{align} L(\theta) = \sum_{i = 1}^n \log(b(m_i))=\sum_{i = 1}^n\log\left(k\left(\underline{m}e^{\underline{m}}\right)^{k}(m_{i}+1)m_{i}^{-k-1}e^{-km_{i}}\right)&=\sum_{i = 1}^n\left(\log k+k\log\left(\underline{m}e^{\underline{m}}\right)+\log(m_{i}+1)-(k+1)\log m_{i}-km_{i}\right)\\ &=n\log k +nk\log\left(\underline{m}e^{\underline{m}}\right) +\sum_{i = 1}^n\log(m_{i}+1)-(k+1)\sum_{i = 1}^n\log m_{i}-k\sum_{i = 1}^n m_{i} \end{align}\]

The estimating pocedure is the same as for linear and LES above. The log-likelihood function is monotonically increasing in \(\underline{m}\), hence \(\hat{\underline{m}}=m_{min}\).

Then we can again solve for the MLE estimator of \(k\) in closed form. Differentiate \(L\) with respect to \(k\):

\[\begin{align} \frac{dL}{dk} &=\frac{n}{k}+n\log\left(\underline{m}e^{\underline{m}}\right)-\sum_{i = 1}^n\log m_{i}-\sum_{i = 1}^n m_{i}=0\Rightarrow \hat k=\frac{1}{\frac{1}{n}\sum_{i = 1}^n(m_{i}+\log m_{i})-\log\left(\hat{\underline{m}}e^{\hat{\underline{m}}}\right)} \end{align}\]

MLE estimation:

(omegaTLOG=mmin*exp(mmin))
## [1] 2.72583
(kkTLOG = 1/((1/nn)*sum(log(m)+m)-log(omegaTLOG)))
## [1] 0.4868533
hist(m, probability = TRUE, col = "lightgrey")
mm = seq(from = min(m), to = max(m), length.out = 10^4)
yy = kkTLOG*(omegaTLOG^(kkTLOG))*(1+mm)*mm^(-kkTLOG-1)*exp(-kkTLOG*mm)
lines(mm, yy, col = 5, lwd = 2)