Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

model.matrix.selection

Design Matrix of Selection Models


Description

Create design matrix of sample selection models

Usage

## S3 method for class 'selection'
model.matrix(object, part = "outcome", ... )

Arguments

object

object of class selection.

part

character string indication which design matrix/matrices to extract: "outcome" for the design matrix/matrices of the outcome equation(s) or "selection" for the design matrix of the selection equation.

...

further arguments passed to other methods (e.g. model.matrix.binaryChoice or model.matrix).

Value

If argument part is "selection", the design matrix of the selection equation is returned.

If argument part is "outcome", the design matrix of the outcome equation (tobit-2 or treatment model) or a list of two outcome matrices (tobit-5 model) is returned. All unobserved outcomes, including the corresponding explanatory variables are set to NA, even in case where valid values were supplied for estimation.

Author(s)

Arne Henningsen

See Also


sampleSelection

Sample Selection Models

v1.2-12
GPL (>= 2)
Authors
Arne Henningsen [aut, cre], Ott Toomet [aut], Sebastian Petersen [ctb]
Initial release
2020-12-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.