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

View source: R/model_matrix.R

model.matrix.opsrR 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


OPSR documentation built on Nov. 1, 2024, 5:07 p.m.