Skip to contents

User Functions

initiators() stable
A wrapper function to perform data preparation and model fitting in a sequence of emulated target trials
data_preparation() stable
Prepare data for the sequence of emulated target trials
trial_msm() stable
Fit the marginal structural model for the sequence of emulated trials
case_control_sampling_trials() stable
Case-control sampling of expanded data for the sequence of emulated trials
predict()
Predict marginal cumulative incidences with confidence intervals for a target trial population
print(<TE_weight_summary>)
Print a weight summary object
summary(<TE_data_prep>) summary(<TE_data_prep_sep>) summary(<TE_data_prep_dt>) summary(<TE_msm>) summary(<TE_robust>)
Summary methods

Data Sets

trial_example
Example of longitudinal data for sequential trial emulation
vignette_switch_data
Example of expanded longitudinal data for sequential trial emulation
te_data_ex
Example of a prepared data object
te_model_ex
Example of a fitted marginal structural model object
data_censored
Example of longitudinal data for sequential trial emulation containing censoring

New Interface Functions

Experimental functions for the new interface

trial_sequence() experimental
Create a sequence of emulated target trials object
set_data() experimental
Set the trial data
set_censor_weight_model() experimental
Set censoring weight model
set_switch_weight_model() experimental
Set switching weight model
calculate_weights() experimental
Calculate Inverse Probability of Censoring Weights
show_weight_models() experimental
Show Weight Model Summaries
ipw_data() `ipw_data<-`()
IPW Data Accessor and Setter
weight_model_data_indices()
Data used in weight model fitting
set_expansion_options() experimental
Set expansion options
set_outcome_model() experimental
Specify the outcome model
expand_trials() experimental
Expand trials
load_expanded_data() experimental
Method to read, subset and sample expanded data
outcome_data() `outcome_data<-`()
Outcome Data Accessor and Setter
fit_msm() experimental
Fit the marginal structural model for the sequence of emulated trials

Data Storage

Control how expanded data is stored

save_to_csv()
Save expanded data as CSV
save_to_duckdb()
Save expanded data to DuckDB
save_to_datatable()
Save expanded data as a data.table

Model fitters

stats_glm_logit()
Fit outcome models using stats::glm
parsnip_model()
Fit outcome models using parsnip models

Classes

trial_sequence-class trial_sequence_PP-class trial_sequence_ITT-class trial_sequence_AT-class
Trial Sequence class
te_data-class
TrialEmulation Data Class
te_datastore-class
te_datastore
save_expanded_data(<te_datastore_duckdb>) read_expanded_data(<te_datastore_duckdb>) sample_expanded_data(<te_datastore_duckdb>)
te_datastore_duckdb, functions and methods
te_model_fitter-class
Outcome Model Fitter Class
te_outcome_data-class
TrialEmulation Outcome Data Class
te_outcome_fitted-class
Fitted Outcome Model Object
te_outcome_model-class
Fitted Outcome Model Object

Internal Methods

save_expanded_data()
Method to save expanded data
read_expanded_data()
Method to read expanded data
sample_expanded_data()
Internal method to sample expanded data
fit_weights_model()
Method for fitting weight models