create_interactions {TSCI}R Documentation

Interactions as Violation Space Candidates

Description

Interactions as Violation Space Candidates

Usage

create_interactions(Z, X = NULL)

Arguments

Z

observations of the instrumental variable(s). Either a numeric vector of length n or a numeric matrix with dimension n by s.

X

observations of baseline covariate(s) for which interactions with the instrumental variable(s) should be part of the violation space candidates. Either a numeric vector of length n or a numeric matrix with dimension n by p or NULL (if only interactions between the instrumental variales itself should be part of the violation space candidates).

Value

A list. The first element contains the observations of the instrumental variable(s) Z. The second element contains all interactions between the instrumental variable(s) and the baseline covariate(s) X.

Examples

Z <- matrix(rnorm(100 * 3), nrow = 100, ncol = 3)
X <- matrix(rnorm(100 * 3), nrow = 100, ncol = 3)
vio_space <- create_interactions(Z = Z, X = X)

[Package TSCI version 3.0.4 Index]