The nlsystemfit function relies on nlm
to perform the
minimization of the objective functions and the qr
set
of functions.
A system of nonlinear equations can be written as:
$$\epsilon_{t} = q( y_t, x_t, \theta )$$
$$z_{t} = Z( x_t )$$
where \(\epsilon_{t}\) are the residuals from the y observations and
the function evaluated at the coefficient estimates.
The objective functions for the methods are:
Method | Instruments | Objective Function | Covariance of
\(\theta\) |
OLS | no | \(r'r\) | \((X(diag(S)^{-1}\bigotimes
I)X)^{-1}\) |
SUR | no | \(r'(diag(S)_{OLS}^{-1}\bigotimes I)r\) | \((X(S^{-1}\bigotimes I)X)^{-1}\) |
2SLS | yes | \(r'(I \bigotimes W)r\) | \((X(diag(S)^{-1}\bigotimes I)X)^{-1}\) |
3SLS | yes | \(r'(S_{2SLS}^{-1} \bigotimes W)r\) | \((X(diag(S)^{-1}\bigotimes W)X)^{-1}\) |
where, r is a column vector for the residuals for each equation, S is
variance-covariance matrix between the equations
(\(\hat{\sigma}_{ij} = (\hat{e}_i' \hat{e}_j) /
\sqrt{(T - k_i)*(T - k_j)}\)), X is matrix of the
partial derivates with respect to the coefficients, W is a matrix of the
instrument variables \(Z(Z'Z)^{-1}Z\), Z is a matrix of the
instrument variables, and I is an nxn identity matrix.
The SUR and 3SLS methods requires two solutions. The first solution
for the SUR is an OLS solution to obtain the variance-covariance
matrix. The 3SLS uses the variance-covatiance from a 2SLS solution,
then fits all the equations simultaneously.
The user should be aware that the function is VERY sensative to
the starting values and the nlm function may not converge. The nlm
function will be called with the typsize
argument set the
absolute values of the starting values for the OLS and 2SLS
methods. For the SUR and 3SLS methods, the typsize
argument is
set to the absolute values of the resulting OLS and 2SLS coefficient
estimates from the nlm result structre. In addition, the starting
values for the SUR and 3SLS methods are obtained from the OLS and 2SLS
coefficient estimates to shorten the number of iterations. The number of
iterations reported in the summary are only those used in the last
call to nlm, thus the number of iterations in the OLS portion of the
SUR fit and the 2SLS portion of the 3SLS fit are not included.