Learn R Programming

momentfit (version 0.5)

bread-methods: ~~ Methods for Function bread in Package sandwich ~~

Description

It computes the bread in the sandwich representation of the covariance matrix of the GMM estimator.

Usage

# S4 method for gmmfit
bread(x, ...)

# S4 method for sgmmfit bread(x, ...)

# S4 method for tsls bread(x, ...)

Arguments

x

GMM fit object

...

Arguments to pass to other methods

Methods

signature(x = "gmmfit")

signature(x = "sgmmfit")

signature(x = "tsls")

Examples

Run this code
data(simData)
theta <- c(beta0=1,beta1=2)
model1 <- momentModel(y~x1, ~z1+z2, data=simData)

res <- gmmFit(model1)
m <- meatGmm(res)
b <- bread(res)

## Sandwich vcov
b

## TSLS
model2 <- momentModel(y~x1, ~z1+z2, data=simData, vcov="iid")
res <- tsls(model2)
bread(res)


Run the code above in your browser using DataLab