# evalWeights-methods: Methods for Function 'evalWeights' in Package 'Gmm' In gmm4: S4 Generalized Method of Moments

## Description

This is a constructor for objects of class gmmWeights

## Usage

 1 2 3 4 5 6 7 8 9 10 11 ## S4 method for signature 'gmmModels' evalWeights(object, theta=NULL, w="optimal", ...) ## S4 method for signature 'sysGmmModels' evalWeights(object, theta = NULL, w="optimal", wObj=NULL) ## S4 method for signature 'rslinearGmm' evalWeights(object, theta = NULL, w="optimal", wObj=NULL)

## Arguments

 object Object of class gmmModels theta The vector of coefficients to compute the optimal weights. If NULL, theta0 for the object is used. w A matrix for fixed weights, one of "optimal" or "ident" wObj An object of class "sysGmmWeights". Providing it avoid having to recompute Z'Z. ... Arguments to pass to other methods

## Methods

signature(object = "gmmModels")
signature(object = "sysGmmModels")
signature(object = "rslinearGmm")

System of equations with restrictions on the coefficients. It only affects the computation of the weights when there are cross-equation restrictions.

## Examples

 1 2 3 4 5 6 7 8 9 10 11 12 data(simData) theta <- c(beta0=1,beta1=2) model1 <- gmmModel(y~x1, ~z1+z2, data=simData) ## Identity weights object wObj1 <- evalWeights(model1, w="ident") ## Identity weights object (an alternative way less efficient) wObj1 <- evalWeights(model1, w=diag(3)) ## Optimal weights wObj1 <- evalWeights(model1, theta, w="optimal")

gmm4 documentation built on Dec. 6, 2019, 3:01 a.m.