4.5 GxE
<- simulate_population(
squid_data parameters = list(
animal = list(
names = c("G_int","G_slope"),
mean = c(0,0),
vcov = matrix(c(1,0.3,0.3,0.5),ncol=2,nrow=2,byrow=TRUE),
beta = c(1,0)
),observation= list(
names = c("environment"),
vcov = c(0.2)
), residual = list(
names = c("residual"),
vcov = c(0.5)
),interactions=list(
names = "G_slope:environment",
beta = 1
)
),data_structure=rbind(ped,ped,ped,ped,ped),
pedigree = list(animal=ped)
)
<- get_population_data(squid_data)
data library(lme4)
<- function(x) print(summary(x), correlation=FALSE, show.resids=FALSE, ranef.comp = c("Variance"))
short_summary
short_summary(lmer(y ~ environment + (1+environment|animal),data))
## Linear mixed model fit by REML ['lmerMod']
## Formula: y ~ environment + (1 + environment | animal)
## Data: data
##
## REML criterion at convergence: 66750.8
##
## Random effects:
## Groups Name Variance Cov
## animal (Intercept) 0.9920
## environment 0.5068 0.30
## Residual 0.4955
## Number of obs: 24590, groups: animal, 4918
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 0.02510 0.01497 1.677
## environment 0.98595 0.01580 62.386