momentMatrix: Construct pre-meaned moment matrix

Description Usage Arguments Value

View source: R/mst.R

Description

This function constructs the matrix to be fed into the GMM estimator to construct the moment conditions.

Usage

1
momentMatrix(sset, gn0, gn1, subsetList = NULL, n = NULL)

Arguments

sset

a list of lists constructed from the function genSSet. Each inner list should include a coefficient corresponding to a term in an IV specification, a matrix of the estimates of the gamma moments conditional on (X, Z) for d = 0, and a matrix of the estimates of the gamma moments conditional on (X, Z) for d = 1. The column means of the last two matrices is what is used to generate the gamma moments.

gn0

integer, number of terms in the MTR for control group.

gn1

integer, number of terms in the MTR for treated group.

subsetList

list of subset indexes, one for each IV-like specification.

n

number of observations in the data. This option is only used when subsets are involved.

Value

matrix whose column means can be used to carry out the GMM estimation.


ivmte documentation built on Sept. 17, 2021, 5:06 p.m.