| dataHolder {causalOT} | R Documentation | 
dataHolder
Description
dataHolder
Usage
dataHolder(x, z, y = NA_real_, weights = NA_real_)
Arguments
x | 
 the covariate data. Can be a matrix, an object of class   | 
z | 
 the treatment indicator  | 
y | 
 the outcome data  | 
weights | 
 the empirical distribution of the sample  | 
Details
Creates an object used internally by the causalOT package for data management.
Value
Returns an object of class dataHolder with slots
-  
xmatrix. A matrix of confounders. -  
zinteger. The treatment indicator,z_i \in \{0,1\}. -  
ynumeric. The outcome data. -  
n0integer. The number of observations where z==0 -  
n1integer. The number of observations where z==1 -  
weightsnumeric. The empirical distribution of the full sample. 
Examples
x <- matrix(0, 100, 10)
z <- stats::rbinom(100, 1, 0.5)
# don't need to provide outcome
# function will assume each observation gets equal mass
dataHolder(x = x, z = z) 
[Package causalOT version 1.0.2 Index]