evalObjective-methods {gmm4} | R Documentation |
evalObjective
in Package Gmm ~~~~ Methods to compute the GMM objective function. ~~
## S4 method for signature 'gmmModels,numeric,gmmWeights' evalObjective(object, theta, wObj, ...) ## S4 method for signature 'gelModels,numeric,missing' evalObjective(object, theta, wObj, lambda, ...) ## S4 method for signature 'sysGmmModels,list,sysGmmWeights' evalObjective(object, theta, wObj, ...)
object |
An object of class |
theta |
The vector for coefficients for single equation, or a list of vector for system of equations. |
wObj |
An object of class |
lambda |
Vector of Lagrange multiplier for |
... |
Arguments to pass to other methods |
signature(object = "gmmModels", theta = "numeric",
wObj = "gmmWeights")
data(simData) theta <- c(beta0=1,beta1=2) model1 <- gmmModel(y~x1, ~z1+z2, data=simData) w <- evalWeights(model1, theta) evalObjective(model1, theta, w) model2 <- gmmToGel(model1, "EL") evalObjective(model2, theta, lambda=c(.1,.2,.3))