model.matrix.opsr {OPSR}R Documentation

Construct Design Matrices for OPSR Model Fits

Description

Construct Design Matrices for OPSR Model Fits

Usage

## S3 method for class 'opsr'
model.matrix(object, data, .filter = NULL, ...)

Arguments

object

an object of class "opsr".

data

a data frame containing the terms from object$formula. Passed to model.frame.opsr. Can be omitted.

.filter

used internally in predict.opsr for counterfactual predictions.

...

further arguments passed to or from other methods.

Value

A list of lists with the design matrices W (selection process) and X (outcome process). Both of these lists have object$nReg elements (a separate design matrix for each regime).

See Also

model.frame.opsr, stats::model.matrix


[Package OPSR version 1.0.0 Index]