Learn R Programming

PSsurvival (version 0.2.0)

simdata_multi: Simulated Survival Data with Multiple Treatments

Description

A simulated dataset for demonstrating propensity score weighting methods in survival analysis with four treatment groups.

Usage

simdata_multi

Arguments

Format

A data frame with 1000 observations and 8 variables:

X1

Continuous covariate (standard normal).

X2

Continuous covariate (standard normal).

X3

Continuous covariate (standard normal).

B1

Binary covariate (0/1).

B2

Binary covariate (0/1).

Z

Treatment group: "A", "B", "C", or "D". Distribution is approximately 20:20:20:35.

time

Observed follow-up time (event or censoring), range 0-20.

event

Event indicator: 1 = event observed, 0 = censored.

Details

The data were generated with the following characteristics:

  • Treatment assignment depends on X1, X2, X3, B1, and B2 via multinomial logistic model.

  • Survival times follow Weibull distributions with group-specific scales. Survival ordering (best to worst): C > A > B > D.

  • Censoring times follow an exponential distribution depending on X1 and B1.

  • Administrative censoring occurs at time 20.

  • Overall censoring rate is approximately 30

See Also

simdata_bin for a dataset with binary treatment.

Examples

Run this code
data(simdata_multi)
head(simdata_multi)
table(simdata_multi$Z)

Run the code above in your browser using DataLab