Create individual data frame from a covset object
Arguments
- .covset
a covset object.
- .n
number of IDs to simulate.
Value
An idata set data frame.
Examples
cov1 <- covset(Y ~ rbinomial(0.2), Z ~ rnorm(2,2))
as_idata(cov1, 10)
#> # A tibble: 10 × 3
#> ID Y Z
#> <int> <dbl> <dbl>
#> 1 1 0 0.286
#> 2 2 0 -1.05
#> 3 3 0 5.94
#> 4 4 0 2.93
#> 5 5 0 0.288
#> 6 6 0 3.30
#> 7 7 0 2.15
#> 8 8 0 2.98
#> 9 9 1 0.493
#> 10 10 0 2.70