set_outcome_model | R Documentation |
The time-to-event model for outcome
is specified with this method. Any adjustment terms can be specified.
For ITT and PP estimands the treatment_var
is not specified as it is automatically defined as
assigned_treatment
. Importantly, the modelling of "time" is specified in this model with arguments for
trial start time and follow up time within the trial.
set_outcome_model(object, ...)
## S4 method for signature 'trial_sequence'
set_outcome_model(
object,
treatment_var = ~0,
adjustment_terms = ~1,
followup_time_terms = ~followup_time + I(followup_time^2),
trial_period_terms = ~trial_period + I(trial_period^2),
model_fitter = stats_glm_logit(save_path = NA)
)
## S4 method for signature 'trial_sequence_ITT'
set_outcome_model(
object,
adjustment_terms = ~1,
followup_time_terms = ~followup_time + I(followup_time^2),
trial_period_terms = ~trial_period + I(trial_period^2),
model_fitter = stats_glm_logit(save_path = NA)
)
## S4 method for signature 'trial_sequence_PP'
set_outcome_model(
object,
adjustment_terms = ~1,
followup_time_terms = ~followup_time + I(followup_time^2),
trial_period_terms = ~trial_period + I(trial_period^2),
model_fitter = stats_glm_logit(save_path = NA)
)
## S4 method for signature 'trial_sequence_AT'
set_outcome_model(
object,
treatment_var = "dose",
adjustment_terms = ~1,
followup_time_terms = ~followup_time + I(followup_time^2),
trial_period_terms = ~trial_period + I(trial_period^2),
model_fitter = stats_glm_logit(save_path = NA)
)
object |
A trial_sequence object |
... |
Parameters used by methods |
treatment_var |
The treatment term, only used for "as treated" estimands. PP and ITT are fixed to use "assigned_treatment". |
adjustment_terms |
Formula terms for any covariates to adjust the outcome model. |
followup_time_terms |
Formula terms for |
trial_period_terms |
Formula terms for |
model_fitter |
A |
A modified object
with the outcome_model
slot set
trial_sequence("ITT") |>
set_data(data_censored) |>
set_outcome_model(
adjustment_terms = ~age_s,
followup_time_terms = ~ stats::poly(followup_time, degree = 2)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.