powered by
dataHolder
dataHolder(x, z, y = NA_real_, weights = NA_real_)
Returns an object of class dataHolder with slots
x matrix. A matrix of confounders.
x
z integer. The treatment indicator, \(z_i \in \{0,1\}\).
z
y numeric. The outcome data.
y
n0 integer. The number of observations where z==0
n0
n1 integer. The number of observations where z==1
n1
weights numeric. The empirical distribution of the full sample.
weights
the covariate data. Can be a matrix, an object of class dataHolder or a DataSim object. The latter two object types won't need arguments z or y.
the treatment indicator
the outcome data
the empirical distribution of the sample
Creates an object used internally by the causalOT package for data management.
causalOT
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)
Run the code above in your browser using DataLab