doConcrete | R Documentation |
doConcrete
doConcrete(ConcreteArgs)
## S3 method for class 'ConcreteEst'
print(x, ...)
## S3 method for class 'ConcreteEst'
plot(x, convergence = FALSE, gweights = TRUE, ask = FALSE, ...)
## S3 method for class 'ConcreteOut'
print(x, ...)
ConcreteArgs |
"ConcreteArgs" object : output of formatArguments() |
x |
a ConcreteOut object |
... |
additional arguments to be passed into print methods |
convergence |
logical: plot the PnEIC norms for each TMLE small update step |
gweights |
logical: plot the densities of the intervention-related nuisance weights for each intervention |
ask |
logical: whether or not to prompt for user input before displaying plots |
object with s3 class "ConcreteEst"
print(ConcreteEst)
: print.ConcreteEst print method for "ConcreteEst" class
plot(ConcreteEst)
: plot.ConcreteEst plot method for "ConcreteEst" class
print(ConcreteOut)
: print.ConcreteOut print method for "ConcreteOut" class
library(data.table)
library(concrete)
data <- as.data.table(survival::pbc)
data <- data[1:200, .SD, .SDcols = c("id", "time", "status", "trt", "age", "sex")]
data[, trt := sample(0:1, nrow(data), TRUE)]
# formatArguments() returns correctly formatted arguments for doConcrete()
concrete.args <- formatArguments(DataTable = data,
EventTime = "time",
EventType = "status",
Treatment = "trt",
ID = "id",
TargetTime = 2500,
TargetEvent = c(1, 2),
Intervention = makeITT(),
CVArg = list(V = 2))
# doConcrete() returns tmle (and g-formula plug-in) estimates of targeted risks
concrete.est <- doConcrete(concrete.args)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.