| DataSim | R Documentation |
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.
An R6 object
DataSim$get_x()Gets the covariate data
DataSim$get_x()
DataSim$get_y()Gets the outcome vector
DataSim$get_y()
DataSim$get_z()Gets the treatment indicator
DataSim$get_z()
DataSim$get_n()Gets the number of observations
DataSim$get_n()
DataSim$get_x1()Gets the covariate data for the treated individuals
DataSim$get_x1()
DataSim$get_x0()Gets the covaraiate data for the control individuals
DataSim$get_x0()
DataSim$get_p()Gets the dimensionality covariate data
DataSim$get_p()
DataSim$get_tau()Gets the individual treatment effects
DataSim$get_tau()
DataSim$gen_data()Generates the data. Default is an empty function
DataSim$gen_data()
DataSim$clone()The objects of this class are cloneable with this method.
DataSim$clone(deep = FALSE)
deepWhether to make a deep clone.
MyClass <- R6::R6Class("MyClass",
inherit = DataSim,
public = list(),
private = list())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.