Economics Asked by Herr K. on January 27, 2021
The CES utility function has the form
begin{equation}
u(x_1,dots,x_n)=left[sum_{i=1}^nalpha_ix_i^rhoright]^{1/rho},
end{equation}
where $alpha_i$ is the consumption share parameter and $sigma=frac{1}{1-rho}$ is the elasticity of substitution.
I’m interested in estimating the $alpha_i$‘s and $sigma$. Since we do not directly observe utility levels, I think we can instead use data to estimate the Marshallian demand functions implied by the utility function:
begin{equation}
x_i(p_1,dots,p_n,M)=frac{M(alpha_i/p_i)^sigma}{sum_{j=1}^nalpha_j^sigma p_j^{1-sigma}},quad i=1,dots,n.
end{equation}
Clearly, the function is highly nonlinear in the parameters of interest. So a nonlinear estimation procedure would be required.
Say we have data consumption $x_i$, prices $p_i$ and income $M$. How do we go about estimating the parameters $alpha_i$‘s and $sigma$?
I can find a lot of papers on estimating the CES production function, but I don’t find them helpful since I don’t observe the dependent variable ($u$). Given that the CES utility is a common functional form used in the literature, I suspect its estimation must be somewhere in the literature.
I managed to find the nonlinear least squares estimation in Stata, but I don’t know how susceptible such a procedure is to misspecification and how much confidence one should put on the statistics (e.g. t-stat or p-value) produced by the program.
Any pointer to the papers/textbook chapters on the topic, as well as statistical packages that implement the estimation procedure will be greatly appreciated.
It may be interesting to exploit the homothetic separability of the CES utility function in $x$. It implies that $$frac{x_i}{x_j} = left( frac{alpha_i}{alpha_j}frac{p_j}{p_i} right)^sigma $$ and after $log$-transformation: $$ln(x_i) - ln(x_j) = beta_{ij} + sigma (ln(p_j) - ln(p_i)). $$
After adding a random term, this specification could be used to estimate the $beta_{ij} equiv sigma (ln(alpha_i)-ln(alpha_j))$ and $sigma$ parameters by OLS and in a second step identifying the $alpha_i$ by minimum distance:
$$ widehat{alpha} = arg min_alpha Big(widehat{beta}-widehat{sigma}(ln(alpha)-ln(Palpha)) Big)'Omega^{-1} Big( widehat{beta}-widehat{sigma}(ln(alpha)-ln(Palpha)) Big), $$ where $P$ represents the adequate permutation matrix.
Some references estimating parameters of CES preference parameters include Diewert and Feenstra (2017) or Redding and Weinstein (2020), with a different approach, however, based on the unit expenditure function.
Most empirical contributions reject the validity of homothetic utility functions (like the CES). There are some propositions on how to built nonhomothetic CES production functions that could easily extended to utility functions, see Shimomura (1999) and the references therein. A simple extension of the above specification is:
$$ln(x_i) - ln(x_j) = beta_{ij} + sigma (ln(p_j) - ln(p_i)) + gamma_{ij} M/p + varepsilon, $$ where $p$ denotes a consumer and time specific aggregate price index (over all commodities). Notation $ij$ stands for commodities $i$ and $j$ and not for the observations (I skipped the $n,t$ subscripts for clarity).
This relationship is compatible with nonhomothetic preferences. The homothetic case is obtained for $gamma_{ij}=0$ which can be tested.
Regarding the computer software... I fully switched to R few years ago, it would "easily" allow to code the minimum distance estimator, and the link between the utility and demand functions.
References:
Diewert, Erwin and Robert Feenstra (2017), “Estimating the Benefits and Costs of New and Disappearing Products,” mimeo, University of California at Davis.
Redding Stephen J and David E Weinstein (2020), "Measuring Aggregate Price Indices with Taste Shocks: Theory and Evidence for CES Preferences," The Quarterly Journal of Economics, 135, 503-560.
Shimomura, K., 1999, "A simple proof of the Sato proposition on non-homothetic CES functions," Economic Theory, 14, 501–503.
Correct answer by Bertrand on January 27, 2021
This answer closely follows the logic of estimation of translog cost function presented in Section 4.7 of Fumio Hayashi's "Econometrics".
Define for convenience the CES aggregate price index $P:=(sum_i alpha_i^sigma p_i^{1-sigma})^frac{1}{1-sigma}$. Then the Marshallian demand system in log form can be written as a system of linear equations
$$ begin{cases} ln x_1 &= ln alpha_1^sigma -sigmaln p_1 - (1-sigma)ln P + ln M ... ln x_n &= ln alpha_n^sigma -sigmaln p_n - (1-sigma)ln P + ln M. end{cases}$$
Note that we are dealing with a multiple regression model. If we estimate these equations separately, data will necessarily make estimates of $sigma$ vary depending on the equation we estimate, therefore, we have to impose the common coefficient restriction from the start.
Further, a regression model necessarily needs error terms:
$$ begin{cases} ln x_1 &= ln alpha_1^sigma -sigmaln p_1 - (1-sigma)ln P + ln M + epsilon_1 ... ln x_n &= ln alpha_n^sigma -sigmaln p_n - (1-sigma)ln P + ln M + epsilon_n. end{cases}$$
The error terms $epsilon_i$ must have an economic interpretation for us to understand the statistical properties of chosen estimators. In other words, the uncertainty expressed in $epsilon_i$ must be attributed either to $alpha_i$ or to $sigma$ (assuming $x_i,p_i,M$ are free of measurement/observation errors).
The most accessible and common interpretation goes as follows :
In reality the weights $tilde alpha_i$ are not constant across individuals, but may fluctuate a little around the population average $alpha_i$, with $epsilon_isimmathcal{N}(0,sigma_epsilon^2)$ being a proxy for this noise: $$ tilde alpha_i = exp(epsilon_i/sigma) alpha_i. $$
Replacing $alpha_i$ by $tilde alpha_i$ in the initial Marshallian demand system and taking logarithms gives exactly the stated regression equation system.
Remark: relating $epsilon$ to the cross-sectional differences in $sigma$ makes things more complicated, as in this case we get heteroskedasticity of the error term in the regression (after taking logarithms, the error term is necessarily multiplied by some function of $p_i$).
Now, another problem is that without knowledge of $alpha_i,sigma$, $P$ is not really observed. This problem is solved by subtracting equation $j$ from equation $j$, as suggested in the answer by @Bertrand. We get a smaller system of equations ($n(n-1)/2$ against $n$ in the beginning):
$$ ln frac{x_i}{x_j} = sigma ln frac{alpha_i}{alpha_j} -sigmaln frac{p_i}{p_j} + epsilon_i - epsilon_j,quad forall iin{1,..n}, jin{1,..n}setminus {i}$$
Now this new multiple regression model has two new restrictions besides the common coefficient inherited from the original one:
Correlation in the error terms is not a problem for consistency, but it certainly affects your estimate of the covariances and confidence intervals.
Pair effect consistency on the other hand allows us to reduce the number of coefficients to estimate at the model formulation stage.
In vector form our multivariate regression can be represented as
$$ y_t = Z_t delta + u_t $$
where (for $n=3$ without loss of generality)
$$ y_t = begin{bmatrix} ln(frac{x_{1t}}{x_{2t}}) ln(frac{x_{1t}}{x_{3t}}) ln(frac{x_{2t}}{x_{3t}})end{bmatrix},quad Z_t = begin{bmatrix} 1 & 0 & &ln(frac{p_{1t}}{p_{2t}}) 0 & 1 & & ln(frac{p_{1t}}{p_{3t}}) -1 & 1 & & ln(frac{p_{2t}}{p_{3t}}) end{bmatrix}, quad delta = begin{bmatrix} sigma ln frac{alpha_1}{alpha_2} sigma ln frac{alpha_1}{alpha_3} sigma end{bmatrix}, u_t = begin{bmatrix}epsilon_1-epsilon_2 epsilon_1-epsilon_3 epsilon_2-epsilon_3end{bmatrix}.$$
The above system yeilds easily to the random-effects estimation (treated extensively in Section 4.6 of Hayashi).
The estimate of CES elasticity of substitution $hat sigma$ is obtained directly, whereas $hatalpha_i$ can be pinned down with some simple normalizaton (e.g. $sum_i alpha_i = 1$).
Answered by Konstantin on January 27, 2021
In this comment I simply show that
Under certain assumptions the problem is not an estimation problem, there is an exact solution for $sigma$ and a solution for the structural errors $alpha_i$ up to a normalisation.
The demand system considered is described by the Marshall demand function
$$x_k^star(p,M) = left(frac{alpha_j}{p_j}right)^{sigma}frac{M}{sum_j p_j^{1-sigma}alpha_j^sigma},$$
which implies that the expenditure shares are given as
$$s_k(p,I) := frac{p_k x_k^star(p,I)}{sum_j p_j x_j^star(p,I)} = frac{p_k^{1-sigma}alpha_k^sigma}{sum_j p_j^{1-sigma}alpha_j^sigma}.$$
I then define $K(p,alpha) := sum_j p_j^{1-sigma}alpha_j^sigma$ where $p = (p_1,...,p_N)$ and $alpha := (alpha_1,...,alpha_N)$ and log linearize expenditure shares to get
$$(1) log s_k = (1-sigma) p_k + sigma log alpha_k + K(p,alpha)$$
Single cross section of aggregate data: Given data on ${s_k,p_k}_{k=1}^N$ this equation can be estimated using OLS under the assumption that $mathbb E[p_k,ln alpha_k] =0$.
Consider now the situation where two time periods are observed $t=1,2$ and prices are assumed to show some variation while it is assumed $alpha$ the comsumer demand parameters are time constant
$$(1') log s_{kt} = (1-sigma) p_{kt} + sigma log alpha_k + K_t(p_t,alpha),$$
where I have added time index to $K$ because the price-vector is varying across time. It is clear that this is a standard two-way fixed effects regression with no good-time specific error term. Using methods of demeaning know from fixed effects estimation methodology one can find the exact solution for $(1-sigma)$.
First take averages over goods to get
$$frac{1}{N}sum_k log s_{kt} = (1-sigma) frac{1}{N}sum_kp_{kt} + frac{1}{N}sum_k sigma log alpha_k + K_t(p_t,alpha),$$
substract from equation (1) to get
$$(2) ds_{kt} = (1-sigma) dp_{kt} + sigma dalpha_k,$$ where the $d$ in from of the variable simply signifies it has been demeaned in log-version so $ds_{kt} := log s_{kt} - frac{1}{N}sum_k log s_{kt}$.
Second take first differences over time to get
$$(3) ds_{k2} - ds_{k1} = (1-sigma) [dp_{k2} - dp_{k1}]$$
such that
$$(4) forall k: (1-sigma) = frac{ds_{k2} - ds_{k1}}{dp_{k2} - dp_{k1}}$$
having found $sigma$ one can find $alpha_i$'s using equation (2). This means that one has to solve for $dalpha_k = alpha_k$ under normalisation that $frac{1}{N}sum_k log alpha_k = 0$. So the average of the structural errors cannot be recovered.
Under the assumption that $alpha_k$'s are time invariant one with data ${p_{jt},s_{jt}}_{j=1,...N, t=1,2}$ recover $sigma$ using exactly using (4) and the structural errors $alpha_k$ up to a single normalization using (2).
To illustrate the calculations I provide a small simulation:
#set.seed(1)
N <- 50
M <- 100000
sigma <- 4
# Simulate structural errors assumed time-constant
phi <- 2*runif(N)+2
phi <- phi/((prod(phi))^(1/N))
# Simulate prices
p1 <- 2*runif(N)+2
p2 <- 2*runif(N)+2
s1 <- (p1/phi)^(1-sigma)
s1 <- s1/sum(s1)
E1 <- M*s1
s2 <- (p2/phi)^(1-sigma)
s2 <- s2/sum(s2)
E2 <- M*s2
x1 <- E1/p1
x2 <- E2/p2
library(data.table)
dt <- data.table(good=rep(1:N,2),time=rep(c(1,2),each=N),price=c(p1,p2),x=c(x1,x2))
dt[,E:=sum(price*x),by=time]
dt[,share:=price*x/E]
dt[,ds:=log(share)-mean(log(share)),by=time]
dt[,dp:=log(price)-mean(log(price)),by=time]
1-coef(lm(ds~dp+as.factor(good),data=dt))[2]
1-coef(lm(log(share)~log(price)+as.factor(good)+as.factor(time),data=dt))[2]
sigma
# Or from a single instead of all N
temp <- as.matrix(dt[good==2,.(ds,dp)])
1-(temp[2,1] - temp[1,1]) / (temp[2,2]-temp[1,2])
The calculations in this post are based on Stephen J. Redding and David E. Weinstein paper A UNIFIED APPROACH TO ESTIMATING DEMAND AND WELFARE.
Answered by Jesper Hybel on January 27, 2021
These other answers seem to be citing some methods I haven't quite heard about yet however they all touch upon the idea developed by Czech economist named Jan Kmenta which has come to be known as the Kmenta approximation (an in depth explanation as well as detailed derivation can be found in the documentation of the R package,MicEconCES.
A general form of a CES utility function is:
$$u(x_1,...,x_n)=gammaleft(sum_i delta_i x_i^{-rho}right)^frac{v}{rho}$$
To estimate this we have: $$ln y=alpha_0+sum_ialpha_i ln x_i+frac{1}{2}sum_isum_j beta_{ij}ln x_i ln x_j$$ where $y$ is our index of utility (note that we can recover an organic index of utility through estimating an expenditure system and using our principles of duality).
To obtain the parameters of the CES function we have the following forms: $$gamma=exp(alpha_0)$$ $$v=sum_ialpha _i$$ $$delta_i=frac{alpha_i}{sum_i alpha_i}$$ $$rho=frac{beta_{ij}}{alpha_i alpha_j}sum_i alpha_i forall i,j$$
I'd heavily recommend using the R package for any empirical work you may be doing. Hope this helps.
Answered by EconJohn on January 27, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP