trial_msm | R Documentation |
Apply a weighted pooled logistic regression to fit the marginal structural model for the sequence of emulated trials and calculates the robust covariance matrix of parameter using the sandwich estimator.
trial_msm(
data,
outcome_cov = ~1,
estimand_type = c("ITT", "PP", "As-Treated"),
model_var = NULL,
first_followup = NA,
last_followup = NA,
analysis_weights = c("asis", "unweighted", "p99", "weight_limits"),
weight_limits = c(0, Inf),
include_followup_time = ~followup_time + I(followup_time^2),
include_trial_period = ~trial_period + I(trial_period^2),
where_case = NA,
glm_function = c("glm", "parglm"),
use_sample_weights = TRUE,
quiet = FALSE,
...
)
data |
A |
outcome_cov |
A RHS formula with baseline covariates to be adjusted for in the marginal structural model for the
emulated trials. Note that if a time-varying covariate is specified in |
estimand_type |
Specify the estimand for the causal analyses in the sequence of emulated trials. |
model_var |
Treatment variables to be included in the marginal structural model for the emulated trials.
|
first_followup |
First follow-up time/visit in the trials to be included in the marginal structural model for the outcome event. |
last_followup |
Last follow-up time/visit in the trials to be included in the marginal structural model for the outcome event. |
analysis_weights |
Choose which type of weights to be used for fitting the marginal structural model for the outcome event.
|
weight_limits |
Lower and upper limits to truncate weights, given as |
include_followup_time |
The model to include the follow up time/visit of the trial ( |
include_trial_period |
The model to include the trial period ( |
where_case |
Define conditions using variables specified in |
glm_function |
Specify which glm function to use for the marginal structural model from the |
use_sample_weights |
Use case-control sampling weights in addition to inverse probability weights for treatment
and censoring. |
quiet |
Suppress the printing of progress messages and summaries of the fitted models. |
... |
Additional arguments passed to |
The model formula is constructed by combining the arguments outcome_cov
, model_var
,
include_followup_time
, and include_trial_period
.
Object of class TE_msm
containing
a glm
object
a list containing a summary table of estimated regression coefficients and the robust covariance matrix
a list contain the parameters used to prepare and fit the model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.