create_monomials {TSCI} | R Documentation |
Monomials as Violation Space Candidates
Description
Monomials as Violation Space Candidates
Usage
create_monomials(Z, degree, type = c("monomials_main", "monomials_full"))
Arguments
Z |
observations of the instrumental variable(s). Either a numeric vector of length n or a numeric matrix with dimension n by s. |
degree |
The degree up to which monomials should be created. Either a single positive integer or a vector of length s containing positive integers. |
type |
One out of |
Details
assuming there are 3 instrumental variables Z1, Z2, and Z3 and degree
= c(d1, d2, d3) with d1 < d2 < d3,
monomials_main
creates the monomials of the polynomials (Z1 + 1)^d1, (Z2 + 1)^d2, (Z3 + 1)^d3 without the constants and
monomials_full
creates the monomials (Z1 + Z2 + Z3), (Z1 + Z2 + Z3)^2, ..., (Z1 + Z2 + Z3)^d3 without the constants and excluding
monomials that are products of Z1^d or Z2^d with d > d1 resp. d > d2.
Thus type
= monomials_main
does not include interactions between the instrumental variables.
Value
A list. Each element is a matrix consisting of the monomials to be added to the next violation space candidate.
Examples
Z <- matrix(rnorm(100 * 3), nrow = 100, ncol = 3)
vio_space <- create_monomials(Z = Z, degree = 4, type = "monomials_full")