Description Usage Arguments Value Examples
Generates percentile based confidence intervals for the causal parameters of a fitted SNMM. Bonferroni corrected confidence intervals are also reported for multiple comparisons.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
gestfunc |
Name (without quotations) of the g-estimation function to run.
One of |
data, idvar, timevar, Yn, An, Cn, outcomemodels, propensitymodel, censoringmodel, type, EfmVar, cutoff |
Same arguments as in gest functions, to be input into gestfunc. |
bn |
Number of bootstrapped datasets. |
alpha |
Confidence level of confidence intervals. |
onesided |
Controls the type of confidence interval generated. Takes one of three inputs, |
seed |
Integer specifying the random seed for generation of bootstrap samples. |
... |
additional arguments. |
Returns a list of the following four elements.
original |
The value of the causal parameters estimated on the original data |
mean.boot |
The average values of the causal parameters estimated on the bootstrapped datasets. |
conf |
The upper and/or lower bounds of 1-α confidence intervals for each element of ψ.
For example, if |
conf.Bonferroni |
The upper and/or lower bounds of Bonferroni corrected confidence intervals for ψ, used for multiple comparisons. |
boot.results |
A tibble containing the result for each bootstrapped dataset |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | datas <- dataexamples(n = 1000, seed = 123, Censoring = FALSE)
data <- datas$datagest
data <- FormatData(
data = data, idvar = "id", timevar = "time", An = "A",
varying = c("A", "L"), GenerateHistory = TRUE, GenerateHistoryMax = 1
)
idvar <- "id"
timevar <- "time"
Yn <- "Y"
An <- "A"
Cn <- NA
outcomemodels <- list("Y~A+L+U+Lag1A", "Y~A+L+U+Lag1A", "Y~A+L+U+Lag1A")
propensitymodel <- c("A~L+U+as.factor(time)+Lag1A")
censoringmodel <- NULL
type <- 1
EfmVar <- NA
bn <- 5
alpha <- 0.05
gestfunc <- gestSingle
gestboot(gestfunc, data, idvar, timevar, Yn, An, Cn, outcomemodels, propensitymodel,
censoringmodel = NULL, type = 1, EfmVar,
bn = bn, alpha = alpha, onesided = "twosided", seed = 123
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.