ipw_data | R Documentation |
ipw_data(object)
ipw_data(object) <- value
## S4 method for signature 'trial_sequence'
ipw_data(object)
## S4 replacement method for signature 'trial_sequence'
ipw_data(object) <- value
object |
|
value |
|
Generic function to access and update the data used for inverse probability weighting.
The setter method ipw_data(object) <- value
does not perform the same checks and manipulations
as set_data()
. To completely replace the data please use set_data()
. This ipw_data<-
method allows
small changes such as adding a new column.
The data from the @data
slot of object
used for inverse probability weighting.
ts <- trial_sequence("ITT")
ts <- set_data(ts, data_censored)
ipw_data(ts)
data.table::set(ipw_data(ts), j = "dummy", value = TRUE)
# or with the setter method:
new_data <- ipw_data(ts)
new_data$x2sq <- new_data$x2^2
ipw_data(ts) <- new_data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.