model.matrix.ivmodel: Extract Design Matrix for 'ivmodel' Object

View source: R/model.matrix.ivmodel.r

model.matrix.ivmodelR Documentation

Extract Design Matrix for ivmodel Object

Description

This method extracts the design matrix inside ivmodel.

Usage

## S3 method for class 'ivmodel'
model.matrix(object,...)

Arguments

object

ivmodel object.

...

Additional arguments to fitted.

Value

A design matrix for the ivmodel object.

Author(s)

Yang Jiang, Hyunseung Kang, and Dylan Small

See Also

See also ivmodel for details on the instrumental variables model.

Examples

data(card.data)
Y=card.data[,"lwage"]
D=card.data[,"educ"]
Z=card.data[,"nearc4"]
Xname=c("exper", "expersq", "black", "south", "smsa", "reg661", 
        "reg662", "reg663", "reg664", "reg665", "reg666", "reg667", 
		"reg668", "smsa66")
X=card.data[,Xname]
foo = ivmodel(Y=Y,D=D,Z=Z,X=X)
model.matrix(foo)

hyunseungkang/ivmodel documentation built on April 20, 2023, 9:20 p.m.