solveGmm-methods {gmm4} | R Documentation |
solveGmm
in Package Gmm ~~~~ Methods for function solveGmm
in package Gmm ~~
## S4 method for signature 'linearGmm,gmmWeights' solveGmm(object, wObj, theta0=NULL, ...) ## S4 method for signature 'allNLGmm,gmmWeights' solveGmm(object, wObj, theta0=NULL, algo=c("optim","nlminb"), ...) ## S4 method for signature 'rnonlinearGmm,gmmWeights' solveGmm(object, wObj, theta0=NULL, ...) ## S4 method for signature 'slinearGmm,sysGmmWeights' solveGmm(object, wObj, theta0=NULL) ## S4 method for signature 'rslinearGmm,sysGmmWeights' solveGmm(object, wObj, theta0=NULL) ## S4 method for signature 'snonlinearGmm,sysGmmWeights' solveGmm(object, wObj, theta0=NULL, ...)
object |
An object of class |
theta0 |
The vector of coefficients for the starting values used
in |
wObj |
An object of class |
algo |
The numerical algorithm to minimize the objective function. |
... |
Arguments to pass to |
A list with the following:
theta |
The vector of solution |
convergence |
convergence code. 0 means normal convergence. For
higher numbers, see |
signature(object = "allNLGmm", wObj = "gmmWeights")
Method to solve either nonlinear regressions or models in which moments are computed with a function. The objective is minimized using optim.
signature(object = "rnonlinearGmm", wObj = "gmmWeights")
Method to solve restricted nonlinear models. It computes the analytical solution.
signature(object = "linearGmm", wObj = "gmmWeights")
Method to solve linear models. It computes the analytical solution.
signature(object = "slinearGmm", wObj = "sysGmmWeights")
Method to solve system of linear models. It computes the analytical solution.
signature(object = "rslinearGmm", wObj = "sysGmmWeights")
Method to solve system of linear models in which restrictions have been imposed on the coefficients. It computes the analytical solution.
signature(object = "slinearGmm", wObj = "sysGmmWeights")
Method to solve system of nonlinear models. The solution is obtained with optim using the analytical derivatives.
data(simData) theta <- c(beta0=1,beta1=2) model1 <- gmmModel(y~x1, ~z1+z2, data=simData) ## A manual two-step GMM w0 <- evalWeights(model1, w="ident") theta0 <- solveGmm(model1, w0)$theta w <- evalWeights(model1, theta0) theta1 <- solveGmm(model1, w)$theta