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 residual2
## 1 0.71929104 0 -0.5257881 -1.042722 1.24507910 2.50335447
## 2 0.33325030 1 -0.5257881 -1.042722 0.85903836 1.44428517
## 3 -0.42718617 0 -0.5257881 -1.042722 0.09860189 1.26752630
## 4 0.44910069 0 -0.5257881 -1.042722 0.97488875 0.39978044
## 5 -0.62462727 0 -0.5257881 -1.042722 -0.09883921 0.73676976
## 6 0.12822742 0 -0.5257881 -1.042722 0.65401547 2.32798502
## 7 -0.10269091 0 -0.5257881 -1.042722 0.42309715 0.97088795
## 8 -1.16521217 0 -0.5257881 -1.042722 -0.63942411 -1.11697997
## 9 -2.02498920 0 -0.5257881 -1.042722 -1.49920114 -1.71662806
## 10 0.84702556 1 -0.5257881 -1.042722 1.37281362 0.31558774
## 11 -1.13218028 0 -0.5257881 -1.042722 -0.60639222 0.50095716
## 12 -1.01004461 0 -0.5257881 -1.042722 -0.48425655 0.92650060
## 13 0.71616352 0 -0.5257881 -1.042722 1.24195158 -1.25932342
## 14 -0.72239979 1 -0.5257881 -1.042722 -0.19661173 -0.51083678
## 15 -1.33642792 1 -0.5257881 -1.042722 -0.81063987 -1.35618916
## 16 -1.95735773 0 -0.5257881 -1.042722 -1.43156967 -1.13993143
## 17 -0.85504490 0 -0.5257881 -1.042722 -0.32925684 0.03603065
## 18 1.26558426 0 -0.5257881 -1.042722 1.79137232 2.14512837
## 19 0.04558226 0 -0.5257881 -1.042722 0.57137032 0.52313819
## 20 0.88752414 1 -0.5257881 -1.042722 1.41331220 0.87626903
## individual squid_pop
## 1 1 1
## 2 1 1
## 3 1 1
## 4 1 1
## 5 1 1
## 6 1 1
## 7 1 1
## 8 1 1
## 9 1 1
## 10 1 1
## 11 1 1
## 12 1 1
## 13 1 1
## 14 1 1
## 15 1 1
## 16 1 1
## 17 1 1
## 18 1 1
## 19 1 1
## 20 1 1
<- get_population_data(squid_data) data