momentStrength-methods: ~~ Methods for Function 'momentStrength' in Package...

momentStrength-methodsR Documentation

~~ Methods for Function momentStrength in Package momentfit ~~

Description

It produces measures of the strength of the moment conditions.

Usage

## S4 method for signature 'linearModel'
momentStrength(object, theta) 

Arguments

object

An object of class "linearModel"

theta

Coefficient vector at which the strength must be measured. It does not impact the measure for objects of class linearModel.

Details

For now, the method only exists for linear models. It returns the F-statistics from the first stage regression. The type of covariance matrix used to compute the statistics depends on the specification of the model. If the argument vcov of the model is set to "iid", a non robust estimator is used. If it is set to "MDS", "HAC", or "CL", the appropriate robust estimator is used. To use a different type, use the method update to change the argument vcov of the model object. See the example below.

Methods

signature(object = "functionModel")

Not implemented yet. In that case, we want some measure of the rank of the matrix of derivatives.

signature(object = "formulaModel")

Not implemented yet. In that case, we want some measure of the rank of the matrix of derivatives.

signature(object = "linearModel")

It returns the F-test of the first stage regression. It is a measure of the strength of the instruments.

signature(object = "rlinearModel")

Returns nothing for now.

signature(object = "nonlinearModel")

Not implemented yet.

Examples

data(simData)

theta <- c(beta0=1,beta1=2)
model1 <- momentModel(y~x1, ~z1+z2, data=simData, vcov="iid")
momentStrength(model1)
## changing the type of vcov to get robust tests
momentStrength(update(model1, vcov="MDS"))

momentfit documentation built on June 26, 2024, 3 p.m.