Learn R Programming

PSsurvival (version 0.2.0)

simdata_bin: Simulated Survival Data with Binary Treatment

Description

A simulated dataset for demonstrating propensity score weighting methods in survival analysis with a binary treatment.

Usage

simdata_bin

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" or "B". Distribution is approximately 40:60.

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, and B1 via logistic model.

  • Survival times follow Weibull distributions with group-specific scales (group A has better survival than group B).

  • 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_multi for a dataset with 4 treatment groups.

Examples

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

Run the code above in your browser using DataLab