Learn R Programming

causalOT (version 1.0.2)

CRASH3: CRASH3 data example

Description

CRASH3 data example

CRASH3 data example

Arguments

Value

An R6 object of class DataSim

Super class

causalOT::DataSim -> CRASH3

Public fields

site_id

The site of the observation in terms of the original RCT.

Methods

Inherited methods


Method gen_data()

The site ID for the observations

Draws new treatment indicators. x and y data are fixed.

Usage

CRASH3$gen_data()


Method gen_x()

Sets up the covariate data. This data is fixed.

Usage

CRASH3$gen_x()


Method gen_y()

Sets up the outcome data. This data is fixed.

Usage

CRASH3$gen_y()


Method gen_z()

Sets up the treatment indicator. Drawn as Z ~ Binom(0.5)

Usage

CRASH3$gen_z()


Method new()

Initializes the CRASH3 object.

Usage

CRASH3$new(n = NULL, p = NULL, param = list(), design = NA_character_, ...)

Arguments

n

Not used. Maintained for symmetry with other DataSim objects.

p

Not used. Maintained for symmetry with other DataSim objects.

param

Not used. Maintained for symmetry with other DataSim objects.

design

Not used

...

Not used.

Examples

crash <- CRASH3$new()
crash$gen_data()
crash$get_n()
crash$site_id


Method clone()

The objects of this class are cloneable with this method.

Usage

CRASH3$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Returns the CRASH3 data. Note that gen_data() will initialize the fixed data for x and y, but z is generated from Binom(0.5).

Examples

Run this code

## ------------------------------------------------
## Method `CRASH3$new`
## ------------------------------------------------

crash <- CRASH3$new()
crash$gen_data()
crash$get_n()
crash$site_id

Run the code above in your browser using DataLab