DataSim {causalOT}R Documentation

R6 Data Generating Parent Class

Description

R6 Data Generating Parent Class

R6 Data Generating Parent Class

Details

Can be used to make your own data simulation class. Should have the same slots listed in this class at a minimum, but you can add your own, of course. An easy way to do this is to make your class inherit from this one. See the example.

Value

An R6 object

Methods

Public methods


Method get_x()

Gets the covariate data

Usage
DataSim$get_x()

Method get_y()

Gets the outcome vector

Usage
DataSim$get_y()

Method get_z()

Gets the treatment indicator

Usage
DataSim$get_z()

Method get_n()

Gets the number of observations

Usage
DataSim$get_n()

Method get_x1()

Gets the covariate data for the treated individuals

Usage
DataSim$get_x1()

Method get_x0()

Gets the covaraiate data for the control individuals

Usage
DataSim$get_x0()

Method get_p()

Gets the dimensionality covariate data

Usage
DataSim$get_p()

Method get_tau()

Gets the individual treatment effects

Usage
DataSim$get_tau()

Method gen_data()

Generates the data. Default is an empty function

Usage
DataSim$gen_data()

Method clone()

The objects of this class are cloneable with this method.

Usage
DataSim$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

MyClass <- R6::R6Class("MyClass", 
inherit = DataSim,
public = list(),
private = list())

[Package causalOT version 1.0.2 Index]