Learn R Programming

MRTAnalysis (version 0.4.1)

data_time_varying_mediator_distal_outcome: Example longitudinal dataset with time-varying mediator and distal outcome

Description

A simulated long-format dataset used in the vignette and tests. Each row corresponds to one subject–decision point. The distal outcome `Y` is constant within subject (repeated on every row for that subject).

Usage

data_time_varying_mediator_distal_outcome

Arguments

Format

A data frame with n * T_val rows and the following columns:

id

Subject identifier (integer).

dp

Decision point index, strictly increasing within subject (integer).

I

Availability indicator at time dp (0/1).

A

Treatment at time dp (0/1).

M

Mediator at time dp (numeric; could be binary or continuous).

X

Time-varying covariate at time dp (numeric).

A_prev

Lagged treatment at time dp-1 (0/1).

M_prev

Lagged mediator at time dp-1 (numeric).

X_prev

Lagged covariate at time dp-1 (numeric).

I_prev

Lagged availability at time dp-1 (0/1).

p_A

Randomization probability for A at time dp (numeric in (0,1)).

p_I

Availability probability for I at time dp (numeric in (0,1)).

mu_M

Conditional mean of M given history (numeric; from DGM).

mu_X

Conditional mean of X given history (numeric; from DGM).

mu_Y

Conditional mean component for distal outcome Y (numeric; from DGM).

Y

Distal outcome, constant within subject (numeric).

Details

Generated by dgm_time_varying_mediator_distal_outcome() in the package source. Intended for illustrating mcee usage. No missing values.

See Also

mcee, mcee_general, mcee_userfit_nuisance

Examples

Run this code
data(data_time_varying_mediator_distal_outcome)
str(data_time_varying_mediator_distal_outcome)

Run the code above in your browser using DataLab