楼主: tulipsliu
8590 294

[学科前沿] [QuantEcon]MATLAB混编FORTRAN语言 [推广有奖]

161
tulipsliu(未真实交易用户) 在职认证  发表于 2020-12-20 14:29:53
The limits of the four-input nested CES function
for $\rho_1$, $\rho_2$, and/or $\rho$ approaching zero are:
$$\begin{align}
\lim_{\rho \rightarrow 0} y
   =&\gamma \, e^{\lambda \, t} \, \exp \left\{ -\nu \left( \frac{\delta \ln ( B_1 ) }{ \rho_1 }
      + \frac{(1-\delta) \ln ( B_2 ) }{ \rho_2 } \right) \right\}\\
\lim_{\rho_1 \rightarrow 0} y
   =& \gamma \, e^{\lambda \, t} \, \left( \delta
      \exp \{ - \rho \; L_1 \}
   + ( 1 - \delta )
   B_2^{\frac{\rho}{\rho_2}} \right)^{ -\frac{\nu}{\rho}}\\
\lim_{\rho_2 \rightarrow 0} y
   =& \gamma \, e^{\lambda \, t} \,
      \left( \delta B_1^{\frac{\rho}{\rho_1}}
         + ( 1 - \delta ) \exp \{ - \rho \; L_2 )
         \} \right)^{ -\frac{\nu}{\rho} }\\
\lim_{ \rho_2 \rightarrow 0} \, \lim_{\rho_1 \rightarrow 0} y  =&
      \gamma \, e^{\lambda \, t} \, \left( \delta \exp \left\{ - \rho \; L_1 \right\}
      + ( 1 - \delta ) \exp \left\{ - \rho \; L_2 \right\} \right)^{-\frac{\nu}{\rho}}\\
\lim_{ \rho_1 \rightarrow 0} \, \lim_{\rho \rightarrow 0} y =&  
      \gamma \, e^{\lambda \, t} \, \exp \left\{ -\nu \left( - \delta \; L_1 +
      ( 1 - \delta ) \frac{\ln ( B_2 )}{\rho_2} \right) \right\}\\
\lim_{ \rho_2 \rightarrow 0} \, \lim_{\rho \rightarrow 0} y =&  
      \gamma \, e^{\lambda \, t} \, \exp \left\{ -\nu \left( \delta \frac{\ln ( B_1 )}{\rho_1}
      - ( 1 - \delta ) L_2 \right) \right\}\\
\lim_{\rho_1 \rightarrow 0} \, \lim_{\rho_2 \rightarrow 0} \, \lim_{\rho \rightarrow 0} y =&
      \gamma \, e^{\lambda \, t} \, \exp \left\{ -\nu \left( - \delta \; L_1
      - ( 1 - \delta ) L_2 \right) \right\}
\end{align}$$

162
tulipsliu(未真实交易用户) 在职认证  发表于 2020-12-20 14:30:51
$$
\begin{align}
\frac{\partial y}{\partial \gamma} =& e^{\lambda \, t} \, B^{-\nu/\rho}\label{eq:derivY4Gamma}\\
\frac{\partial y}{\partial \delta_1} =& \gamma \, e^{\lambda \, t} \, \left( -\frac{\nu}{\rho} \right) B^{\frac{-\nu - \rho}{\rho}}
          \frac{\rho}{\rho_1} \delta B_1^{\frac{\rho - \rho_1}{\rho_1}}
          ( x_1^{-\rho_1} - x_2^{-\rho_1} )\\
\frac{\partial y}{\partial \delta_2} =& \gamma \, e^{\lambda \, t} \, \left( -\frac{\nu}{\rho} \right) B^{\frac{-\nu - \rho}{\rho}}
          \frac{\rho}{\rho_2} ( 1- \delta )B_2^{\frac{\rho - \rho_2}{\rho_2}}
          ( x_3^{-\rho_2} - x_4^{-\rho_2} )\\
\frac{\partial y}{\partial \delta} =&
         \gamma \, e^{\lambda \, t} \, \left( - \frac{\nu}{\rho} \right) B^{-\frac{\nu}{\rho}-1}
         \left[ B_1^{\rho/\rho_1}
         - B_2^{\rho/\rho_2} \right]
         \\
\frac{\partial y}{\partial \nu} =& \gamma \, e^{\lambda \, t} \, \ln (B) B^{-\nu/\rho} \left( -\frac{1}{\rho} \right)\\
\frac{\partial y}{\partial \rho_1} =& \gamma \, e^{\lambda \, t} \, \left( -\frac{\nu}{\rho} \right) B^{\frac{-\nu - \rho}{\rho}} \\
          & \left[ \delta \ln ( B_1 )
          B_1^{\frac{\rho}{\rho_1}}
          \left( -\frac{\rho}{\rho_1^2} \right)
          + \delta
          B_1^{\frac{\rho-\rho_1}{\rho_1}}
          \frac{\rho}{\rho_1} ( -\delta_1 \ln x_1 x_1^{-\rho_1} -
          ( 1 - \delta_1 ) \ln x_2 x_2^{-\rho_1} ) \right] \nonumber\\
\frac{\partial y}{\partial \rho_2} =& \gamma \, e^{\lambda \, t} \, \left( -\frac{\nu}{\rho} \right) B^{\frac{-\nu - \rho}{\rho}} \\
          & \left[ ( 1 - \delta ) \ln ( B_2 )
     B_2^{\frac{\rho}{\rho_2}}
          \left( -\frac{\rho}{\rho_2^2} \right)
          + ( 1 - \delta )
     B_2^{\frac{\rho-\rho_2}{\rho_2}}
          \frac{\rho}{\rho_2} ( -\delta_2 \ln x_3 x_3^{-\rho_2} -
          ( 1 - \delta_2 ) \ln x_4 x_4^{-\rho_2} ) \right] \nonumber \\
\frac{\partial y}{\partial \rho} =& \gamma \, e^{\lambda \, t} \, \ln (B) B^{-\nu/\rho} \frac{\nu}{\rho^2} +
          \gamma \, e^{\lambda \, t} \, \left( -\frac{\nu}{\rho} \right) B^{\frac{-\nu - \rho}{\rho}} \\
          & \left[ \delta \ln( B_1 )
          B_1^{\frac{\rho}{\rho_1}} \frac{1}{\rho_1}
          + ( 1 - \delta ) \ln( B_2 )
          B_2^{\frac{\rho}{\rho_2}} \frac{1}{\rho_2} \right] \nonumber
\end{align}
$$

163
tulipsliu(未真实交易用户) 在职认证  发表于 2020-12-20 14:31:42
$$
\begin{align}
\lim_{\rho \rightarrow 0} \frac{\partial y}{\partial \gamma} =&
      e^{\lambda \, t} \, \exp \left\{ -\nu \left( \frac{\delta \ln ( B_1 ) }{ \rho_1 }
    + \frac{(1-\delta) \ln ( B_2 ) }{ \rho_2 }  \right) \right\}
\label{eq:derivY4GammaRho0}
\end{align}$$
$$
\begin{align}
\lim_{\rho \rightarrow 0} \frac{\partial y}{\partial \delta_{1}} =& \gamma \, e^{\lambda \, t} \,
     \left( -\frac{\nu}{\rho_1} \frac{ \delta ( x_1^{-\rho_1 } - x_2^{-\rho_1} ) }
     { B_1 } \right)
   \cdot \exp \left\{ -\nu \left( \frac{\delta \ln ( B_1 ) }{ \rho_1 }
     + \frac{(1-\delta) \ln ( B_2 ) }{ \rho_2 } \right) \right\}
\end{align}
$$
$$
\begin{align}
\lim_{\rho \rightarrow 0} \frac{\partial y}{\partial \delta_{2}} =& \gamma \, e^{\lambda \, t} \,
     \left( -\frac{\nu}{\rho_2} \frac{ (1 -\delta) ( x_3^{-\rho_2 } - x_4^{-\rho_2} ) }
     { B_2 } \right)
   \cdot \exp \left\{ -\nu \left( \frac{\delta \ln ( B_1 ) }{ \rho_1 }
     + \frac{(1-\delta) \ln ( B_2 ) }{ \rho_2 } \right) \right\}
\end{align}
$$
$$
\begin{align}
\lim_{\rho \rightarrow 0} \frac{\partial y}{\partial \delta} =& \gamma \, e^{\lambda \, t} \,
       \left( -\nu \left[ \frac{\ln ( B_1 )}{\rho_1}
       - \frac{\ln ( B_2 )}{\rho_2} \right] \right)
     \cdot \exp \left\{ -\nu \left( \frac{\delta \ln ( B_1 ) }{ \rho_1 }
       + \frac{(1-\delta) \ln ( B_2 ) }{ \rho_2 } \right) \right\}
\end{align}
$$
$$
\begin{align}
\lim_{\rho \rightarrow 0} \frac{\partial y}{\partial \nu} =&
      -\gamma \, e^{\lambda \, t} \, \frac{\delta \ln ( B_1 ) }{ \rho_1 }
      + \frac{(1-\delta) \ln ( B_2 ) }{ \rho_2 }
    \cdot \exp \left\{ -\nu \left( \frac{\delta \ln ( B_1 ) }{ \rho_1 }
      + \frac{(1-\delta) \ln ( B_2 ) }{ \rho_2 }  \right) \right\}
\end{align}
$$
$$
\begin{align}
\lim_{\rho \rightarrow 0} \frac{\partial y}{\partial \rho_1} =&
      \gamma \, e^{\lambda \, t} \, \left( -\nu \left(
      \frac{ \delta \rho_1
      (-\delta_1 \ln x_1 x_1^{-\rho_1} - ( 1 - \delta_1 ) \ln x_2 x_2^{-\rho_1} )}{\rho_1^2 \; B_1}
    - \frac{\delta \ln( B_1 )}{\rho_1^2} \right) \right) \\
    & \cdot \exp \left\{ -\nu \left( \frac{\delta \ln ( B_1 ) }{ \rho_1 }
      + \frac{(1-\delta) \ln ( B_2 ) }{ \rho_2 } \right) \right\} \nonumber
\end{align}
$$
$$
\begin{align}
\lim_{\rho \rightarrow 0} \frac{\partial y}{\partial \rho_2} =&
      \gamma \, e^{\lambda \, t} \, \left( -\nu \left(
      \frac{ ( 1 - \delta ) \rho_2
      (-\delta_2 \ln x_3 x_3^{-\rho_2} - ( 1 - \delta_2 ) \ln x_4 x_4^{-\rho_2} )}{\rho_2^2 \; B_2}
    - \frac{(1 - \delta ) \ln( B_2 )}{\rho_2^2} \right) \right) \\
    & \cdot \exp \left\{ -\nu \left( \frac{ \delta \ln ( B_1 ) }{ \rho_1 }
      + \frac{(1-\delta) \ln ( B_2 ) }{ \rho_2 } \right) \right\} \nonumber
\end{align}
$$
$$
\begin{align}
\lim_{\rho \rightarrow 0} \frac{\partial y}{\partial \rho} =&
       \gamma \, e^{\lambda \, t} \, \nu \, \left( -\frac{1}{2} \left( \delta (\ln B_1 )^2 \frac{1}{\rho_1^2} + ( 1 - \delta )
       ( \ln B_2 )^2 \frac{1}{\rho_2^2} \right) \right.\\
       & \left. + \frac{1}{2} \left( \delta \ln B_1 \frac{1}{\rho_1}
       + ( 1 - \delta ) \ln B_2 \frac{1}{\rho_2} \right)^2 \right)
       \cdot \exp \left\{ -\nu \left( \frac{\delta \ln ( B_1 ) }{ \rho_1 }
       + \frac{(1-\delta) \ln ( B_2 ) }
       { \rho_2 }  \right)  \right\} \nonumber
\end{align}
$$

164
tulipsliu(未真实交易用户) 在职认证  发表于 2020-12-20 14:34:54
For the traditional two-input CES function, these partial derivatives are:
$$\begin{align}
\frac{\partial y}{\partial \gamma } =\;&
   e^{\lambda \, t} \, \left( \delta x_1^{-\rho} + ( 1 - \delta ) x_2^{-\rho} \right)^{-\frac{ \nu }{\rho}}
   \label{eq:derivYGamma}\\
\frac{\partial y}{\partial \lambda } =\;&
    \gamma \; t \; \frac{\partial y}{\partial \gamma }
   \label{eq:derivYLambda}\\
\frac{\partial y}{\partial \delta } =\;&
   -  \gamma \, e^{\lambda \, t} \, \frac{\nu }{ \rho } \left( x_1^{-\rho} - x_2^{-\rho} \right)
   \left( \delta x_1^{-\rho} + ( 1 - \delta ) x_2^{-\rho} \right)^{-\frac{\nu}{\rho} - 1}
   \label{eq:derivYDelta}\\
\frac{\partial y}{\partial \rho } =\;&
   \gamma \, e^{\lambda \, t} \, \frac{ \nu }{ \rho^2 } \;
   \ln \left( \delta x_1^{-\rho} + ( 1 - \delta ) x_2^{-\rho} \right)
   \left( \delta x_1^{-\rho} + ( 1 - \delta ) x_2^{-\rho} \right)^{-\frac{ \nu }{\rho}}
   \label{eq:derivYRho}\\
   & + \gamma \, e^{\lambda \, t} \, \frac{ \nu }{ \rho }
   \left( \delta \ln( x_1 ) x_1^{-\rho} + ( 1 - \delta ) \ln( x_2 ) x_2^{-\rho} \right)
   \left( \delta x_1^{-\rho} + ( 1 - \delta ) x_2^{-\rho} \right)^{-\frac{\nu}{\rho} -1}
   \nonumber\\
\frac{\partial y}{\partial \nu } =\;&
   - \gamma \, e^{\lambda \, t} \, \frac{ 1 }{ \rho } \;
   \ln \left( \delta x_1^{-\rho} + ( 1 - \delta ) x_2^{-\rho} \right)
   \left( \delta x_1^{-\rho} + ( 1 - \delta ) x_2^{-\rho} \right)^{-\frac{ \nu }{\rho }}
   \label{eq:derivYNu}
\end{align}$$
These derivatives are not defined for $\rho = 0$
and are imprecise if $\rho$ is close to zero

165
tulipsliu(未真实交易用户) 在职认证  发表于 2020-12-20 14:36:19
Therefore, if $\rho$ is zero or close to zero,
we calculate these derivatives by first-order Taylor series
approximations at the point $\rho = 0$
using the limits for $\rho$ approaching zero:
$$
\begin{align}
\frac{\partial y}{\partial \gamma } =\;&
   e^{\lambda \, t} \, x_1^{\nu \, \delta} \; x_2^{\nu \, ( 1 - \delta )}
   \exp \left( - \frac{\rho}{2} \, \nu \, \delta \, ( 1 - \delta )
      \left( \ln x_1 - \ln x_2 \right)^2
   \right)
   \label{eq:derivYGammaApprox}\\
\frac{\partial y}{\partial \delta } =\;&
   \gamma \, e^{\lambda \, t} \, \nu \, \left( \ln x_1 - \ln x_2 \right)
   x_1^{ \nu \, \delta } \; x_2^{ \nu ( 1 - \delta ) }
   \label{eq:derivYDeltaApprox}\\
   & \left( 1 - \frac{ \rho }{ 2 }
      \big[ 1 - 2 \, \delta + \nu \, \delta ( 1 - \delta )
         \left( \ln x_1 - \ln x_2 \right) \big]
      \left( \ln x_1 - \ln x_2 \right)
   \right)
   \nonumber\\
\frac{\partial y}{\partial \rho } =\;&
   \gamma \, e^{\lambda \, t} \, \nu \, \delta \, ( 1 - \delta ) \,
   x_1^{ \nu \, \delta } \; x_2^{ \nu ( 1 - \delta ) }
   \bigg( - \frac{1}{2} \left( \ln x_1 - \ln x_2 \right)^2
   \label{eq:derivYRhoApprox}\\
      & + \frac{\rho}{3} ( 1 - 2 \, \delta ) \left( \ln x_1 - \ln x_2 \right)^3
      + \frac{\rho}{4} \, \nu \, \delta ( 1 - \delta )
         \left( \ln x_1 - \ln x_2 \right)^4
   \bigg)
   \nonumber\\
\frac{\partial y}{\partial \nu } =\;&
   \gamma \, e^{\lambda \, t} \, x_1^{ \nu \, \delta } \; x_2^{ \nu ( 1 - \delta ) }
   \bigg( \delta \ln x_1 + ( 1 - \delta ) \ln x_2
      \label{eq:derivYNuApprox}\\
      & - \frac{\rho}{2} \, \delta ( 1 - \delta )
      \left( \ln x_1 - \ln x_2 \right)^2
      \left[ 1 + \nu
         \left( \delta \ln x_1 + ( 1 - \delta ) \ln x_2 \right)
      \right]
   \bigg)
   \nonumber
\end{align}$$
If $\rho$ is zero or close to zero,
the partial derivatives with respect to $\lambda$ are calculated
also with Equationref eq : derivYLambda ,
but now $\partial y / \partial \gamma$ is calculated
with Equation~\ref{eq:derivYGammaApprox}
instead of Equation~ refeq :derivYGamma.

166
tulipsliu(未真实交易用户) 在职认证  发表于 2020-12-20 14:38:09
$$
\frac{\partial \text{RSS}}{\partial \theta}
= - 2 \; \sum_{i=1}^N \left( u_i \; \frac{\partial y_i}{\partial \theta} \right),
$$
where
$N$ is the number of observations,
$u_i$ is the residual of the $i$th observation,
$\theta \in \{ \gamma, \delta_1, \delta_2,$ $\delta, \rho_1, \rho_2, \rho, \nu \}$
is a coefficient of the CES function, and
$\partial y_i / \partial \theta$ is the partial derivative of the CES function
with respect to coefficient $\theta$
evaluated at the $i$th observation
as returned by function


167
tulipsliu(未真实交易用户) 在职认证  发表于 2020-12-20 14:40:21
The asymptotic covariance matrix of the non-linear least-squares estimator
obtained by the various iterative optimisation methods
is calculated by:
where $\partial y / \partial \theta$ denotes the $N \times k$ gradient matrix.
we calculate the estimated variance of the residuals by
$$
\hat{\sigma}^2 = \frac{1}{N} \sum_{i=1}^N u_i^2,
$$
i.e., without correcting for degrees of freedom.

168
tulipsliu(未真实交易用户) 在职认证  发表于 2020-12-20 14:43:19
The starting values of $\delta_1$, $\delta_2$, and $\delta$
are set to $0.5$.
If the coefficients $\rho_1$, $\rho_2$, and $\rho$
are estimated (not fixed as, e.g., during grid search),
their starting values are set to $0.25$,
which generally corresponds to an elasticity of substitution of $0.8$.
The starting value of $\nu$ is set to $1$,
which corresponds to constant returns to scale.
If the CES function includes a time variable,
the starting value of $\lambda$ is set to $0.015$,
which corresponds to a technological progress of 1.5\% per time period.
Finally, the starting value of $\gamma$ is set to a value
so that the mean of the residuals is equal to zero, i.e.
$$
\gamma = \frac{ \sum_{i=1}^N y_i }{ \sum_{i=1}^N CES_i },
$$
where $CES_i$ indicates the (nested) CES function
evaluated at the input quantities of the $i$th observation
and with coefficient~$\gamma$ equal to one,
all ``fixed'' coefficients (e.g., $\rho_1$, $\rho_2$, or $\rho$)
equal to their pre-selected values,
and all other coefficients equal to the above-described starting values.

169
tulipsliu(未真实交易用户) 在职认证  发表于 2020-12-20 14:44:59
In contrast to Equation~3 in \citet{masanjala04},
we decomposed the (unobservable) steady-state output
per unit of \emph{augmented} labour in country $i$
($y_i^* = Y_i / ( A \, L_i )$
with $Y_i$ being aggregate output,
$L_i$ being aggregate labour,
and $A$ being the efficiency of labour)
into the (observable) steady-state output per unit of labour
($y_i =  Y_i / L_i$)
and the (unobservable) efficiency component~($A$)
to obtain the equation that is actually estimated.
$$
y_i = A
   \left[ \frac{1}{1-\alpha} - \frac{\alpha}{1-\alpha}
      \left( \frac{s_{ik}}{n_i + g + \delta} \right)^{
         \frac{\sigma - 1}{\sigma} }
   \right]^{-\frac{\sigma}{\sigma - 1}}
$$
Here, $y_i$ is the steady-state aggregate output
(Gross Domestic Product, GDP) per unit of labour,
$s_{ik}$ is the ratio of investment to aggregate output,
$n_i$ is the population growth rate,
subscript $i$ indicates the country,
$g$ is the technology growth rate,
$\delta$ is the depreciation rate of capital goods,
$A$ is the efficiency of labour (with growth rate $g$),
$\alpha$ is the distribution parameter of capital, and
$\sigma$ is the elasticity of substitution.
where:
$\gamma = A$,
$\delta = \frac{1}{1-\alpha}$,
$x_1 = 1$,
$x_2 = ( n_i + g + \delta ) / s_{ik}$,
$\rho = ( \sigma - 1 ) / \sigma$,
and $\nu = 1$.
Please note
that the relationship between the coefficient $\rho$
and the elasticity of substitution is slightly different
from this relationship in the original two-input CES function:
in this case, the elasticity of substitution is
$\sigma = 1 / ( 1 - \rho )$,
i.e., the coefficient $\rho$ has the opposite sign.
Hence, the estimated $\rho$ must lie between minus infinity and (plus) one.
Furthermore, the distribution parameter $\alpha$ should
lie between zero and one,
so that the estimated parameter $\delta$ must have%
---in contrast to the standard CES function---%
a value larger than or equal to one.

170
tulipsliu(未真实交易用户) 在职认证  发表于 2020-12-21 18:39:53
$$
\begin{bmatrix} 1-y & 0 \\ 0 & 1-y \end{bmatrix}
$$

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-27 07:33