Learn R Programming

OPSR (version 1.0.1)

model.matrix.opsr: Construct Design Matrices for OPSR Model Fits

Description

Construct Design Matrices for OPSR Model Fits

Usage

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

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).

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.

See Also

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