Take the gravier
data, then
pluck
out the x
matrix, then
convert to a tibble
, then
add the y
response variable and a pt_id
variable and an normal distributed \(age \sim \mathcal{N}(\mu = 55,\,\sigma^{2} = 10)\,.\) variable, then
create age_group
, then
rename
the y
response to event_label
gravier %>%
pluck("x") %>%
as_tibble %>%
mutate(y = pluck(gravier, "y"),
pt_id = seq(1, nrow(.)),
age = round(rnorm(n = nrow(.), mean = 55, sd = 10), digits = 1),
age_group = cut(age, breaks = seq(10, 100, by = 10))) %>%
rename(event_label = y)
## # A tibble: 168 x 2,909
## g2E09 g7F07 g1A01 g3C09 g3H08 g1A08 g1B01 g1int1
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -0.00144 -0.00144 -0.0831 -0.0475 1.58e-2 -0.0336 -0.136 0.0180
## 2 -0.0604 0.0129 -0.00144 0.0104 3.16e-2 0.108 0.0158 0.0800
## 3 0.0398 0.0524 -0.0786 0.0635 -3.95e-2 0.0342 0.00288 0.0594
## 4 0.0101 0.0314 -0.0218 0.0215 8.68e-2 0.0272 -0.0160 0.0759
## 5 0.0496 0.0201 0.0370 0.0311 2.07e-2 -0.0174 0.111 -0.0469
## 6 -0.0664 0.0468 0.00720 -0.370 2.88e-3 0.0243 0.0909 0.0482
## 7 -0.00289 -0.0816 -0.0291 -0.0249 -1.74e-2 0.0172 -0.170 -0.00578
## 8 -0.198 -0.0499 -0.0634 -0.0298 3.00e-2 0.00144 -0.0529 -0.0401
## 9 0.00288 0.0201 0.0272 0.0174 -7.89e-5 -0.0634 0.0370 0.0314
## 10 -0.0574 -0.0574 -0.0831 -0.0897 -1.01e-1 -0.144 -0.167 0.0172
## # … with 158 more rows, and 2,901 more variables: g1E11 <dbl>,
## # g8G02 <dbl>, g1H04 <dbl>, g1C01 <dbl>, g1F11 <dbl>, g3F05 <dbl>,
## # g3B09 <dbl>, g1int2 <dbl>, g2C01 <dbl>, g1A05 <dbl>, g1E01 <dbl>,
## # g1B05 <dbl>, g3C05 <dbl>, g3A07 <dbl>, g1F01 <dbl>, g2D01 <dbl>,
## # g1int3 <dbl>, g1int4 <dbl>, g1D05 <dbl>, g1E05 <dbl>, g1G05 <dbl>,
## # g1C05 <dbl>, g1G11 <dbl>, g2D08 <dbl>, g2E06 <dbl>, g3H09 <dbl>,
## # g2F09 <dbl>, g3G06 <dbl>, g2G08 <dbl>, g3F07 <dbl>, g2G09 <dbl>,
## # g1F05 <dbl>, g1H05 <dbl>, g2H08 <dbl>, g2F06 <dbl>, g3C06 <dbl>,
## # g3A08 <dbl>, g1int5 <dbl>, g3A09 <dbl>, g3B06 <dbl>, g1F07 <dbl>,
## # g2G06 <dbl>, g1B12 <dbl>, g3G09 <dbl>, g2H06 <dbl>, g1int6 <dbl>,
## # g1D12 <dbl>, g1E12 <dbl>, g2B10 <dbl>, g2G01 <dbl>, g1F12 <dbl>,
## # g1B02 <dbl>, g3F08 <dbl>, g2H09 <dbl>, g1int7 <dbl>, g1C06 <dbl>,
## # g1G12 <dbl>, g1A02 <dbl>, g3D09 <dbl>, g3C08 <dbl>, g3A10 <dbl>,
## # g3H04 <dbl>, g2F07 <dbl>, g2D10 <dbl>, g2E07 <dbl>, g1G06 <dbl>,
## # g3A01 <dbl>, g2A02 <dbl>, g1C12 <dbl>, g1int10 <dbl>, g2A08 <dbl>,
## # g3D05 <dbl>, g1E02 <dbl>, g3E08 <dbl>, g1int12 <dbl>, g1int13 <dbl>,
## # g1int14 <dbl>, g3C04 <dbl>, g1H02 <dbl>, g3B01 <dbl>, g3D06 <dbl>,
## # g3D07 <dbl>, g1G02 <dbl>, g2B08 <dbl>, g2E10 <dbl>, g2C02 <dbl>,
## # g1C02 <dbl>, g1H06 <dbl>, g2D02 <dbl>, g1C03 <dbl>, g3A04 <dbl>,
## # g1A07 <dbl>, g1C08 <dbl>, g2F10 <dbl>, g2E02 <dbl>, g1int18 <dbl>,
## # g3D04 <dbl>, g4B01 <dbl>, g3F06 <dbl>, g1int19 <dbl>, …