Predict mean and variance of the outcome for a SensIAT
within-group model
Source: R/PCORI_fulldata_model.R
, R/predict_within_group.R
predict.SensIAT_within_group_model.Rd
Predict mean and variance of the outcome for a SensIAT
within-group model
Value
If include.var is TRUE, a tibble
with columns time, mean, and var is returned.
otherwise if include.var is FALSE, only the mean vector is returned.
Functions
predict(SensIAT_fulldata_model)
: For each combination oftime
andalpha
estimate the mean response and variance for each group as well as estimate the mean treatment effect and variance.
Examples
# \donttest{
model <-
fit_SensIAT_within_group_model(
group.data = SensIAT_example_data,
outcome_modeler = SensIAT_sim_outcome_modeler,
alpha = c(-0.6, -0.3, 0, 0.3, 0.6),
id = Subject_ID,
outcome = Outcome,
time = Time,
End = 830,
knots = c(60,260,460),
)
predict(model, time = c(90, 180))
#> # A tibble: 10 × 4
#> alpha time mean var
#> <dbl> <dbl> <dbl> <dbl>
#> 1 -0.6 90 1.46 0.00966
#> 2 -0.6 180 1.55 0.00640
#> 3 -0.3 90 1.68 0.0103
#> 4 -0.3 180 1.81 0.00688
#> 5 0 90 1.95 0.0113
#> 6 0 180 2.10 0.00874
#> 7 0.3 90 2.29 0.0141
#> 8 0.3 180 2.43 0.0125
#> 9 0.6 90 2.70 0.0194
#> 10 0.6 180 2.78 0.0178
# }