simulate_under_LTM_multi simulates families and thresholds under the liability threshold model for a given family structure and multiple phenotypes. Please note that it is not possible to simulate different family structures.

simulate_under_LTM_multi(
  fam_vec = c("m", "f", "s1", "mgm", "mgf", "pgm", "pgf"),
  n_fam = NULL,
  add_ind = TRUE,
  genetic_corrmat = diag(3),
  full_corrmat = diag(3),
  h2_vec = rep(0.5, 3),
  phen_names = NULL,
  n_sim = 1000,
  pop_prev = rep(0.1, 3)
)

Arguments

fam_vec

A vector of strings holding the different family members. All family members must be represented by strings from the following list:

  • m (Mother)

  • f (Father)

  • c[0-9]*.[0-9]* (Children)

  • mgm (Maternal grandmother)

  • mgf (Maternal grandfather)

  • pgm (Paternal grandmother)

  • pgf (Paternal grandfather)

  • s[0-9]* (Full siblings)

  • mhs[0-9]* (Half-siblings - maternal side)

  • phs[0-9]* (Half-siblings - paternal side)

  • mau[0-9]* (Aunts/Uncles - maternal side)

  • pau[0-9]* (Aunts/Uncles - paternal side). Defaults to c("m","f","s1","mgm","mgf","pgm","pgf").

n_fam

A named vector holding the desired number of family members. See setNames. All names must be picked from the list mentioned above. Defaults to NULL.

add_ind

A logical scalar indicating whether the genetic component of the full liability as well as the full liability for the underlying target individual should be included in the covariance matrix. Defaults to TRUE.

genetic_corrmat

A numeric matrix holding the genetic correlations between the desired phenotypes. All diagonal entries must be equal to one, while all off-diagonal entries must be between -1 and 1. In addition, the matrix must be symmetric. Defaults to diag(3).

full_corrmat

A numeric matrix holding the full correlations between the desired phenotypes. All diagonal entries must be equal to one, while all off-diagonal entries must be between -1 and 1. In addition, the matrix must be symmetric. Defaults to diag(3).

h2_vec

A numeric vector holding the liability-scale heritabilities for a number of phenotype. All entries must be non-negative. Note that under the liability threshold model, the heritabilities must also be at most 1. Defaults to rep(0.5,3).

phen_names

A character vector holding the phenotype names. These names will be used to create the row and column names for the covariance matrix. If it is not specified, the names will default to phenotype1, phenotype2, etc. Defaults to NULL.

n_sim

A positive number representing the number of simulations. Defaults to 1000.

pop_prev

A numeric vector holding the population prevalences, i.e. the overall prevalences in the population. All entries in pop_prev must be positive and smaller than 1. Defaults to rep(.1,3).

Value

If either fam_vec or n_fam is used as the argument and if it is of the required format, if genetic_corrmat and full_corrmat are two numeric and symmetric matrices satisfying that all diagonal entries are one and that all off-diagonal entries are between -1 and 1, if the liability-scale heritabilities in h2_vec are numbers satisfying \(0 \leq h^2_i\) for all \(i \in \{1,...,n_pheno\}\), n_sim is a strictly positive number, and pop_prev is a positive numeric vector such that all entries are at most one, then the output will be a list containing lists for each phenotype. The first outer list, which is named after the first phenotype in phen_names, holds the tibble sim_obs, which holds the simulated liabilities, the disease status and the current age/age-of-onset for all family members in each of the n_sim families for the first phenotype. As the first outer list, the second outer list, which is named after the second phenotype in phen_names, holds the tibble sim_obs, which holds the simulated liabilities, the disease status and the current age/age-of-onset for all family members in each of the n_sim families for the second phenotype. There is a list containing sim_obs for each phenotype in phen_names. The last list entry, thresholds, holds the family identifier, the personal identifier, the role (specified in fam_vec or n_fam) as well as the lower and upper thresholds for all individuals in all families and all phenotypes. Note that this tibble has the format required in estimate_liability. Finally, note that if neither fam_vec nor n_fam are specified, the function returns the disease status, the current age/age-of-onset, the lower and upper thresholds, as well as the personal identifier for a single individual, namely the individual under consideration (called o). If both fam_vec and n_fam are defined, the user is asked to ' decide on which of the two vectors to use.

See also

Examples

simulate_under_LTM_multi()
#> $phenotype1
#> $phenotype1$sim_obs
#> # A tibble: 1,000 × 26
#>    fam_ID    g_phenotype1 o_phenotype1 m_phenotype1 f_phenotype1 s1_phenotype1
#>    <chr>            <dbl>        <dbl>        <dbl>        <dbl>         <dbl>
#>  1 fam_ID_1        0.295       -0.307        1.73          0.289       -0.367 
#>  2 fam_ID_2       -0.987        0.222        0.0525       -2.26        -2.74  
#>  3 fam_ID_3        0.456       -0.0926      -0.338         0.462        0.0830
#>  4 fam_ID_4       -0.0917       0.183        0.797         0.569       -0.186 
#>  5 fam_ID_5       -1.18        -0.551       -0.522        -0.631        2.10  
#>  6 fam_ID_6        0.0621      -0.204       -1.04          0.567       -0.618 
#>  7 fam_ID_7        0.248        1.54        -0.613         0.539        0.131 
#>  8 fam_ID_8       -0.581       -1.16        -1.01         -0.355       -0.937 
#>  9 fam_ID_9        0.760        0.434       -0.246         0.957        1.34  
#> 10 fam_ID_10      -0.131       -0.0710       0.339        -0.792       -1.28  
#> # ℹ 990 more rows
#> # ℹ 20 more variables: mgm_phenotype1 <dbl>, mgf_phenotype1 <dbl>,
#> #   pgm_phenotype1 <dbl>, pgf_phenotype1 <dbl>, o_phenotype1_status <lgl>,
#> #   m_phenotype1_status <lgl>, f_phenotype1_status <lgl>,
#> #   s1_phenotype1_status <lgl>, mgm_phenotype1_status <lgl>,
#> #   mgf_phenotype1_status <lgl>, pgm_phenotype1_status <lgl>,
#> #   pgf_phenotype1_status <lgl>, o_phenotype1_aoo <dbl>, …
#> 
#> 
#> $phenotype2
#> $phenotype2$sim_obs
#> # A tibble: 1,000 × 26
#>    fam_ID    g_phenotype2 o_phenotype2 m_phenotype2 f_phenotype2 s1_phenotype2
#>    <chr>            <dbl>        <dbl>        <dbl>        <dbl>         <dbl>
#>  1 fam_ID_1       -0.608        -0.855      -0.0746       -2.56         -0.760
#>  2 fam_ID_2       -0.0726        0.720      -1.03         -1.96         -1.66 
#>  3 fam_ID_3       -0.726        -1.12       -0.151        -1.43         -1.08 
#>  4 fam_ID_4        0.582         0.247      -0.762        -1.28          0.358
#>  5 fam_ID_5        1.06          1.76        1.07          0.289         1.56 
#>  6 fam_ID_6        0.0155       -1.21        0.0204       -0.955        -0.966
#>  7 fam_ID_7        0.623         0.753       0.654         1.56         -0.918
#>  8 fam_ID_8       -0.612        -0.981      -0.648         2.31         -0.194
#>  9 fam_ID_9        0.603         1.04        0.911         0.567         1.07 
#> 10 fam_ID_10      -0.954        -0.314      -1.53         -0.512        -0.566
#> # ℹ 990 more rows
#> # ℹ 20 more variables: mgm_phenotype2 <dbl>, mgf_phenotype2 <dbl>,
#> #   pgm_phenotype2 <dbl>, pgf_phenotype2 <dbl>, o_phenotype2_status <lgl>,
#> #   m_phenotype2_status <lgl>, f_phenotype2_status <lgl>,
#> #   s1_phenotype2_status <lgl>, mgm_phenotype2_status <lgl>,
#> #   mgf_phenotype2_status <lgl>, pgm_phenotype2_status <lgl>,
#> #   pgf_phenotype2_status <lgl>, o_phenotype2_aoo <dbl>, …
#> 
#> 
#> $phenotype3
#> $phenotype3$sim_obs
#> # A tibble: 1,000 × 26
#>    fam_ID    g_phenotype3 o_phenotype3 m_phenotype3 f_phenotype3 s1_phenotype3
#>    <chr>            <dbl>        <dbl>        <dbl>        <dbl>         <dbl>
#>  1 fam_ID_1         0.413        0.931       0.325         0.508       -0.345 
#>  2 fam_ID_2        -0.231       -0.594       1.29          0.130        0.926 
#>  3 fam_ID_3        -0.573       -2.27        0.0160        0.140        0.267 
#>  4 fam_ID_4        -1.17        -1.94       -1.98         -1.05        -0.553 
#>  5 fam_ID_5        -0.255       -0.103       0.0213       -0.241       -0.503 
#>  6 fam_ID_6        -0.699       -0.730      -1.91         -0.447       -1.48  
#>  7 fam_ID_7        -0.138       -1.17       -0.940         0.491        0.323 
#>  8 fam_ID_8        -0.823       -0.301      -1.28          1.10        -1.31  
#>  9 fam_ID_9        -1.13        -0.891      -0.0317       -0.420       -0.0568
#> 10 fam_ID_10       -0.225       -0.906      -0.592         0.765       -0.610 
#> # ℹ 990 more rows
#> # ℹ 20 more variables: mgm_phenotype3 <dbl>, mgf_phenotype3 <dbl>,
#> #   pgm_phenotype3 <dbl>, pgf_phenotype3 <dbl>, o_phenotype3_status <lgl>,
#> #   m_phenotype3_status <lgl>, f_phenotype3_status <lgl>,
#> #   s1_phenotype3_status <lgl>, mgm_phenotype3_status <lgl>,
#> #   mgf_phenotype3_status <lgl>, pgm_phenotype3_status <lgl>,
#> #   pgf_phenotype3_status <lgl>, o_phenotype3_aoo <dbl>, …
#> 
#> 
#> $thresholds
#> # A tibble: 8,000 × 9
#>    fam_ID    indiv_ID   role  lower_phenotype1 upper_phenotype1 lower_phenotype2
#>    <chr>     <chr>      <chr>            <dbl>            <dbl>            <dbl>
#>  1 fam_ID_1  fam_ID_1_1 o              -Inf                2.91          -Inf   
#>  2 fam_ID_2  fam_ID_2_1 o              -Inf                2.76          -Inf   
#>  3 fam_ID_3  fam_ID_3_1 o              -Inf                2.72          -Inf   
#>  4 fam_ID_4  fam_ID_4_1 o              -Inf                3.06          -Inf   
#>  5 fam_ID_5  fam_ID_5_1 o              -Inf                3.52             1.74
#>  6 fam_ID_6  fam_ID_6_1 o              -Inf                2.72          -Inf   
#>  7 fam_ID_7  fam_ID_7_1 o                 1.54             1.54          -Inf   
#>  8 fam_ID_8  fam_ID_8_1 o              -Inf                2.63          -Inf   
#>  9 fam_ID_9  fam_ID_9_1 o              -Inf                2.68          -Inf   
#> 10 fam_ID_10 fam_ID_10… o              -Inf                3.17          -Inf   
#> # ℹ 7,990 more rows
#> # ℹ 3 more variables: upper_phenotype2 <dbl>, lower_phenotype3 <dbl>,
#> #   upper_phenotype3 <dbl>
#> 

genetic_corrmat <- matrix(0.4, 3, 3)
diag(genetic_corrmat) <- 1
full_corrmat <- matrix(0.6, 3, 3)
diag(full_corrmat) <- 1

simulate_under_LTM_multi(fam_vec = NULL, n_fam = stats::setNames(c(1,1,1,2,2), 
c("m","mgm","mgf","s","mhs")))
#> $phenotype1
#> $phenotype1$sim_obs
#> # A tibble: 1,000 × 26
#>    fam_ID   g_phenotype1 o_phenotype1 m_phenotype1 mgm_phenotype1 mgf_phenotype1
#>    <chr>           <dbl>        <dbl>        <dbl>          <dbl>          <dbl>
#>  1 fam_ID_1      -0.249        -0.898        0.339         0.749           0.346
#>  2 fam_ID_2       0.216         0.560       -1.01          1.38           -0.171
#>  3 fam_ID_3      -0.506         1.26         0.279        -0.394          -0.444
#>  4 fam_ID_4       0.0933        0.136       -0.776        -0.457          -0.367
#>  5 fam_ID_5       0.680         0.395        0.766        -0.163          -0.261
#>  6 fam_ID_6       0.0549       -0.495       -0.844        -0.615           0.529
#>  7 fam_ID_7       0.0417        0.580       -1.25         -1.08           -0.270
#>  8 fam_ID_8      -0.865        -1.23         0.158         0.562           0.213
#>  9 fam_ID_9      -0.233        -0.178       -0.876        -0.0426         -0.600
#> 10 fam_ID_…       0.723         0.605       -0.516         0.626           0.459
#> # ℹ 990 more rows
#> # ℹ 20 more variables: s1_phenotype1 <dbl>, s2_phenotype1 <dbl>,
#> #   mhs1_phenotype1 <dbl>, mhs2_phenotype1 <dbl>, o_phenotype1_status <lgl>,
#> #   m_phenotype1_status <lgl>, mgm_phenotype1_status <lgl>,
#> #   mgf_phenotype1_status <lgl>, s1_phenotype1_status <lgl>,
#> #   s2_phenotype1_status <lgl>, mhs1_phenotype1_status <lgl>,
#> #   mhs2_phenotype1_status <lgl>, o_phenotype1_aoo <dbl>, …
#> 
#> 
#> $phenotype2
#> $phenotype2$sim_obs
#> # A tibble: 1,000 × 26
#>    fam_ID   g_phenotype2 o_phenotype2 m_phenotype2 mgm_phenotype2 mgf_phenotype2
#>    <chr>           <dbl>        <dbl>        <dbl>          <dbl>          <dbl>
#>  1 fam_ID_1        0.605       1.66         1.72           -0.332          1.52 
#>  2 fam_ID_2        0.992       1.13         0.174           1.90          -1.08 
#>  3 fam_ID_3       -0.151      -0.360       -1.08           -0.317         -0.140
#>  4 fam_ID_4        0.412       0.420       -0.0552         -2.48          -1.25 
#>  5 fam_ID_5       -0.636      -1.30        -1.06            0.322         -0.386
#>  6 fam_ID_6       -1.59       -1.49        -1.15           -2.28           1.01 
#>  7 fam_ID_7       -0.546       0.797       -1.03           -0.849          0.149
#>  8 fam_ID_8        0.661       1.26         0.274           0.262         -0.796
#>  9 fam_ID_9        0.613       1.37         1.94            2.24           0.292
#> 10 fam_ID_…        0.247      -0.0475       1.41            0.450          1.14 
#> # ℹ 990 more rows
#> # ℹ 20 more variables: s1_phenotype2 <dbl>, s2_phenotype2 <dbl>,
#> #   mhs1_phenotype2 <dbl>, mhs2_phenotype2 <dbl>, o_phenotype2_status <lgl>,
#> #   m_phenotype2_status <lgl>, mgm_phenotype2_status <lgl>,
#> #   mgf_phenotype2_status <lgl>, s1_phenotype2_status <lgl>,
#> #   s2_phenotype2_status <lgl>, mhs1_phenotype2_status <lgl>,
#> #   mhs2_phenotype2_status <lgl>, o_phenotype2_aoo <dbl>, …
#> 
#> 
#> $phenotype3
#> $phenotype3$sim_obs
#> # A tibble: 1,000 × 26
#>    fam_ID   g_phenotype3 o_phenotype3 m_phenotype3 mgm_phenotype3 mgf_phenotype3
#>    <chr>           <dbl>        <dbl>        <dbl>          <dbl>          <dbl>
#>  1 fam_ID_1        0.496       1.21         -0.875         -0.956         0.747 
#>  2 fam_ID_2       -0.142       0.355        -0.286          1.30         -1.53  
#>  3 fam_ID_3        0.320      -0.974         0.939         -0.180        -0.227 
#>  4 fam_ID_4       -0.519      -0.793        -0.216          0.925        -0.401 
#>  5 fam_ID_5        0.284      -0.104         0.838         -0.260         0.784 
#>  6 fam_ID_6        0.876       0.0263        0.514          1.93          0.0894
#>  7 fam_ID_7       -0.175      -0.417         0.135          0.654         0.319 
#>  8 fam_ID_8       -1.12        0.309         0.292          0.165         1.21  
#>  9 fam_ID_9       -0.400       0.0362       -0.655         -0.560        -1.01  
#> 10 fam_ID_…       -0.934      -0.585        -0.577         -1.57         -0.309 
#> # ℹ 990 more rows
#> # ℹ 20 more variables: s1_phenotype3 <dbl>, s2_phenotype3 <dbl>,
#> #   mhs1_phenotype3 <dbl>, mhs2_phenotype3 <dbl>, o_phenotype3_status <lgl>,
#> #   m_phenotype3_status <lgl>, mgm_phenotype3_status <lgl>,
#> #   mgf_phenotype3_status <lgl>, s1_phenotype3_status <lgl>,
#> #   s2_phenotype3_status <lgl>, mhs1_phenotype3_status <lgl>,
#> #   mhs2_phenotype3_status <lgl>, o_phenotype3_aoo <dbl>, …
#> 
#> 
#> $thresholds
#> # A tibble: 8,000 × 9
#>    fam_ID    indiv_ID   role  lower_phenotype1 upper_phenotype1 lower_phenotype2
#>    <chr>     <chr>      <chr>            <dbl>            <dbl>            <dbl>
#>  1 fam_ID_1  fam_ID_1_1 o                 -Inf             3.52             1.64
#>  2 fam_ID_2  fam_ID_2_1 o                 -Inf             2.59          -Inf   
#>  3 fam_ID_3  fam_ID_3_1 o                 -Inf             2.63          -Inf   
#>  4 fam_ID_4  fam_ID_4_1 o                 -Inf             3.03          -Inf   
#>  5 fam_ID_5  fam_ID_5_1 o                 -Inf             2.72          -Inf   
#>  6 fam_ID_6  fam_ID_6_1 o                 -Inf             2.91          -Inf   
#>  7 fam_ID_7  fam_ID_7_1 o                 -Inf             2.99          -Inf   
#>  8 fam_ID_8  fam_ID_8_1 o                 -Inf             3.24          -Inf   
#>  9 fam_ID_9  fam_ID_9_1 o                 -Inf             3.21             1.37
#> 10 fam_ID_10 fam_ID_10… o                 -Inf             3.42          -Inf   
#> # ℹ 7,990 more rows
#> # ℹ 3 more variables: upper_phenotype2 <dbl>, lower_phenotype3 <dbl>,
#> #   upper_phenotype3 <dbl>
#> 

simulate_under_LTM_multi(fam_vec = c("m","f","s1"), add_ind = FALSE, 
genetic_corrmat = genetic_corrmat, full_corrmat = full_corrmat, n_sim = 100)
#> $phenotype1
#> $phenotype1$sim_obs
#> # A tibble: 100 × 10
#>    fam_ID    m_phenotype1 f_phenotype1 s1_phenotype1 m_phenotype1_status
#>    <chr>            <dbl>        <dbl>         <dbl> <lgl>              
#>  1 fam_ID_1         0.229      -0.348        -1.11   FALSE              
#>  2 fam_ID_2        -1.97       -0.241         0.0193 FALSE              
#>  3 fam_ID_3        -0.509       1.12          0.868  FALSE              
#>  4 fam_ID_4         0.743       1.64          0.915  FALSE              
#>  5 fam_ID_5         0.750       1.31         -0.817  FALSE              
#>  6 fam_ID_6        -0.817      -0.442         0.395  FALSE              
#>  7 fam_ID_7         0.396      -0.739        -0.111  FALSE              
#>  8 fam_ID_8         1.26       -1.27          0.645  FALSE              
#>  9 fam_ID_9        -0.162       0.176        -0.927  FALSE              
#> 10 fam_ID_10        0.362       0.0284        0.385  FALSE              
#> # ℹ 90 more rows
#> # ℹ 5 more variables: f_phenotype1_status <lgl>, s1_phenotype1_status <lgl>,
#> #   m_phenotype1_aoo <dbl>, f_phenotype1_aoo <dbl>, s1_phenotype1_aoo <dbl>
#> 
#> 
#> $phenotype2
#> $phenotype2$sim_obs
#> # A tibble: 100 × 10
#>    fam_ID    m_phenotype2 f_phenotype2 s1_phenotype2 m_phenotype2_status
#>    <chr>            <dbl>        <dbl>         <dbl> <lgl>              
#>  1 fam_ID_1         1.12        -1.37         0.155  FALSE              
#>  2 fam_ID_2        -0.156       -0.643       -0.555  FALSE              
#>  3 fam_ID_3        -2.86        -0.110       -0.212  FALSE              
#>  4 fam_ID_4         0.410        2.72         0.191  FALSE              
#>  5 fam_ID_5         0.706        0.632       -1.53   FALSE              
#>  6 fam_ID_6         0.562       -0.500        0.467  FALSE              
#>  7 fam_ID_7        -1.35        -1.22        -1.20   FALSE              
#>  8 fam_ID_8         0.408       -0.691        0.0122 FALSE              
#>  9 fam_ID_9         0.390        1.85         0.0707 FALSE              
#> 10 fam_ID_10        1.82        -0.289        0.924  TRUE               
#> # ℹ 90 more rows
#> # ℹ 5 more variables: f_phenotype2_status <lgl>, s1_phenotype2_status <lgl>,
#> #   m_phenotype2_aoo <dbl>, f_phenotype2_aoo <dbl>, s1_phenotype2_aoo <dbl>
#> 
#> 
#> $phenotype3
#> $phenotype3$sim_obs
#> # A tibble: 100 × 10
#>    fam_ID    m_phenotype3 f_phenotype3 s1_phenotype3 m_phenotype3_status
#>    <chr>            <dbl>        <dbl>         <dbl> <lgl>              
#>  1 fam_ID_1       -0.116        -0.931       -1.28   FALSE              
#>  2 fam_ID_2        0.587        -0.272       -0.0452 FALSE              
#>  3 fam_ID_3       -3.08         -0.174       -0.215  FALSE              
#>  4 fam_ID_4       -1.12          1.63        -0.482  FALSE              
#>  5 fam_ID_5        2.72          1.17        -0.268  TRUE               
#>  6 fam_ID_6        1.15         -0.262        0.237  FALSE              
#>  7 fam_ID_7       -0.148        -0.932       -0.337  FALSE              
#>  8 fam_ID_8        0.697        -1.05        -1.06   FALSE              
#>  9 fam_ID_9       -0.844         0.754       -1.19   FALSE              
#> 10 fam_ID_10      -0.0166        0.446        0.564  FALSE              
#> # ℹ 90 more rows
#> # ℹ 5 more variables: f_phenotype3_status <lgl>, s1_phenotype3_status <lgl>,
#> #   m_phenotype3_aoo <dbl>, f_phenotype3_aoo <dbl>, s1_phenotype3_aoo <dbl>
#> 
#> 
#> $thresholds
#> # A tibble: 300 × 9
#>    fam_ID    indiv_ID   role  lower_phenotype1 upper_phenotype1 lower_phenotype2
#>    <chr>     <chr>      <chr>            <dbl>            <dbl>            <dbl>
#>  1 fam_ID_1  fam_ID_1_1 m                 -Inf             2.55          -Inf   
#>  2 fam_ID_2  fam_ID_2_1 m                 -Inf             2.13          -Inf   
#>  3 fam_ID_3  fam_ID_3_1 m                 -Inf             1.68          -Inf   
#>  4 fam_ID_4  fam_ID_4_1 m                 -Inf             1.64          -Inf   
#>  5 fam_ID_5  fam_ID_5_1 m                 -Inf             1.64          -Inf   
#>  6 fam_ID_6  fam_ID_6_1 m                 -Inf             2.30          -Inf   
#>  7 fam_ID_7  fam_ID_7_1 m                 -Inf             1.56          -Inf   
#>  8 fam_ID_8  fam_ID_8_1 m                 -Inf             1.93          -Inf   
#>  9 fam_ID_9  fam_ID_9_1 m                 -Inf             2.13          -Inf   
#> 10 fam_ID_10 fam_ID_10… m                 -Inf             2.34             1.81
#> # ℹ 290 more rows
#> # ℹ 3 more variables: upper_phenotype2 <dbl>, lower_phenotype3 <dbl>,
#> #   upper_phenotype3 <dbl>
#> 

simulate_under_LTM_multi(fam_vec = c(), n_fam = NULL, add_ind = TRUE, n_sim = 150)
#> Warning message: 
#>  Neither fam_vec nor n_fam is specified...
#> $phenotype1
#> $phenotype1$sim_obs
#> # A tibble: 150 × 5
#>    fam_ID    g_phenotype1 o_phenotype1 o_phenotype1_status o_phenotype1_aoo
#>    <chr>            <dbl>        <dbl> <lgl>                          <dbl>
#>  1 fam_ID_1        1.33          2.61  TRUE                              36
#>  2 fam_ID_2        0.123        -0.768 FALSE                             38
#>  3 fam_ID_3        0.0207        1.16  FALSE                             32
#>  4 fam_ID_4       -0.639         0.226 FALSE                             25
#>  5 fam_ID_5       -1.16         -0.894 FALSE                             32
#>  6 fam_ID_6        0.982         2.14  TRUE                              47
#>  7 fam_ID_7        1.06          1.15  FALSE                             13
#>  8 fam_ID_8        0.642         0.147 FALSE                             12
#>  9 fam_ID_9       -0.832        -0.881 FALSE                             30
#> 10 fam_ID_10      -1.15         -0.434 FALSE                             13
#> # ℹ 140 more rows
#> 
#> 
#> $phenotype2
#> $phenotype2$sim_obs
#> # A tibble: 150 × 5
#>    fam_ID    g_phenotype2 o_phenotype2 o_phenotype2_status o_phenotype2_aoo
#>    <chr>            <dbl>        <dbl> <lgl>                          <dbl>
#>  1 fam_ID_1       -1.30         -2.11  FALSE                             19
#>  2 fam_ID_2        0.730         0.613 FALSE                             38
#>  3 fam_ID_3       -0.790        -1.24  FALSE                             32
#>  4 fam_ID_4        1.30          0.955 FALSE                             25
#>  5 fam_ID_5        0.0836        0.681 FALSE                             32
#>  6 fam_ID_6       -0.0771       -1.20  FALSE                             20
#>  7 fam_ID_7        0.167         0.622 FALSE                             13
#>  8 fam_ID_8       -1.03         -1.56  FALSE                             12
#>  9 fam_ID_9       -0.0209        0.699 FALSE                             30
#> 10 fam_ID_10      -0.840        -0.399 FALSE                             13
#> # ℹ 140 more rows
#> 
#> 
#> $phenotype3
#> $phenotype3$sim_obs
#> # A tibble: 150 × 5
#>    fam_ID    g_phenotype3 o_phenotype3 o_phenotype3_status o_phenotype3_aoo
#>    <chr>            <dbl>        <dbl> <lgl>                          <dbl>
#>  1 fam_ID_1        0.0704       0.704  FALSE                             19
#>  2 fam_ID_2        0.769        0.546  FALSE                             38
#>  3 fam_ID_3        0.303        1.08   FALSE                             32
#>  4 fam_ID_4       -0.433       -0.904  FALSE                             25
#>  5 fam_ID_5        0.0690       0.222  FALSE                             32
#>  6 fam_ID_6       -0.390        0.386  FALSE                             20
#>  7 fam_ID_7        0.0121       0.282  FALSE                             13
#>  8 fam_ID_8       -1.06         0.185  FALSE                             12
#>  9 fam_ID_9       -0.725        0.0824 FALSE                             30
#> 10 fam_ID_10       0.864        1.79   TRUE                              56
#> # ℹ 140 more rows
#> 
#> 
#> $thresholds
#> # A tibble: 150 × 9
#>    fam_ID    indiv_ID   role  lower_phenotype1 upper_phenotype1 lower_phenotype2
#>    <chr>     <chr>      <chr>            <dbl>            <dbl>            <dbl>
#>  1 fam_ID_1  fam_ID_1_1 o                 2.59             2.59             -Inf
#>  2 fam_ID_2  fam_ID_2_1 o              -Inf                2.51             -Inf
#>  3 fam_ID_3  fam_ID_3_1 o              -Inf                2.76             -Inf
#>  4 fam_ID_4  fam_ID_4_1 o              -Inf                3.03             -Inf
#>  5 fam_ID_5  fam_ID_5_1 o              -Inf                2.76             -Inf
#>  6 fam_ID_6  fam_ID_6_1 o                 2.13             2.13             -Inf
#>  7 fam_ID_7  fam_ID_7_1 o              -Inf                3.45             -Inf
#>  8 fam_ID_8  fam_ID_8_1 o              -Inf                3.48             -Inf
#>  9 fam_ID_9  fam_ID_9_1 o              -Inf                2.83             -Inf
#> 10 fam_ID_10 fam_ID_10… o              -Inf                3.45             -Inf
#> # ℹ 140 more rows
#> # ℹ 3 more variables: upper_phenotype2 <dbl>, lower_phenotype3 <dbl>,
#> #   upper_phenotype3 <dbl>
#>