3.3 Different distributions
<- list(
individual vcov = matrix(c(
1,0.5,
0.5,1
nrow=2,ncol=2,byrow=TRUE)
),
)
<- list(
residual vcov = matrix(c(
1,0.5,
0.5,1
nrow = 2,ncol = 2,byrow=TRUE),
),beta = matrix(c(
1,0,
0,0
nrow = 2,ncol = 2,byrow=TRUE)
),
)
<- simulate_population(
squid_data data_structure= make_structure(structure = "individual(100)",repeat_obs=20),
n_response = 2,
parameters=list(individual = individual, residual = residual),
family=c("gaussian","binomial"), link=c("identity","logit")
)
<- get_population_data(squid_data)
data head(data,20)
## y1 y2 individual_effect1 individual_effect2 residual1
## 1 0.80376835 1 1.933232 1.132927 -1.129464e+00
## 2 0.11432330 1 1.933232 1.132927 -1.818909e+00
## 3 2.04598297 1 1.933232 1.132927 1.127508e-01
## 4 1.93333124 1 1.933232 1.132927 9.902713e-05
## 5 1.95105609 1 1.933232 1.132927 1.782388e-02
## 6 2.56116516 1 1.933232 1.132927 6.279329e-01
## 7 3.32733216 1 1.933232 1.132927 1.394100e+00
## 8 1.47309415 1 1.933232 1.132927 -4.601381e-01
## 9 0.86767664 1 1.933232 1.132927 -1.065556e+00
## 10 2.58031042 1 1.933232 1.132927 6.470782e-01
## 11 2.71157185 1 1.933232 1.132927 7.783396e-01
## 12 0.42173186 1 1.933232 1.132927 -1.511500e+00
## 13 1.65539512 1 1.933232 1.132927 -2.778371e-01
## 14 2.48173738 1 1.933232 1.132927 5.485052e-01
## 15 0.07352694 0 1.933232 1.132927 -1.859705e+00
## 16 0.27413919 1 1.933232 1.132927 -1.659093e+00
## 17 2.31435706 1 1.933232 1.132927 3.811248e-01
## 18 1.86984706 1 1.933232 1.132927 -6.338515e-02
## 19 2.01284413 0 1.933232 1.132927 7.961192e-02
## 20 2.26003535 1 1.933232 1.132927 3.268031e-01
## residual2 individual squid_pop
## 1 -0.76705492 1 1
## 2 -0.66569912 1 1
## 3 -2.24392564 1 1
## 4 0.64642188 1 1
## 5 -0.17289871 1 1
## 6 -0.22721373 1 1
## 7 1.77025265 1 1
## 8 -0.06036272 1 1
## 9 -0.13107580 1 1
## 10 0.51965440 1 1
## 11 -0.94775391 1 1
## 12 0.21561112 1 1
## 13 -0.80144601 1 1
## 14 -0.76227263 1 1
## 15 -0.63847377 1 1
## 16 -2.33136433 1 1
## 17 0.10744440 1 1
## 18 1.32416729 1 1
## 19 -0.57956449 1 1
## 20 -1.10879960 1 1
<- get_population_data(squid_data) data