A simulated dataset representing a two-arm clinical trial with 200
subjects, one continuous covariate, and two binary outcomes. It serves
as the underlying data for bglm_fit and can be used to
illustrate bglm.
Format
A data frame with 200 rows and 4 columns:
- group
Character. Treatment arm:
"placebo"(n = 100) or"drug"(n = 100).- age
Numeric. Continuous covariate drawn from \(N(50,\,10^2)\).
- y1
Integer (0/1). First binary outcome.
- y2
Integer (0/1). Second binary outcome.
Details
Data were generated with set.seed(2024) using logistic models:
$$
P(y_1 = 1) = \text{logit}^{-1}(-0.50 + 0.75\,\text{drug}
+ 0.10\,\text{age}/10)
$$
$$
P(y_2 = 1) = \text{logit}^{-1}(-0.50 + 0.80\,\text{drug}
+ 0.05\,\text{age}/10)
$$
where drug is 1 for the drug arm and 0 for placebo.
See data-raw/generate_examples.R for the full script.