3.2 One response repeatedly measured, the other not

In some circumstances we might want to simulate two responses, one that varies between measurements and one that doesn’t. For example we might have one fixed measurement of body size for each individual, and repeated measurements of behaviour. We can simply set the variance of the singly measured variable to 0 at that particular level. So for this example:

squid_data <- simulate_population(
  data_structure= make_structure(structure = "individual(100)",repeat_obs=20),
  n_response = 2,
  parameters=list(
    individual = list(
      vcov = matrix(c(
        1,0.5,
        0.5,1
        ),nrow=2,ncol=2,byrow=TRUE)
      ), 
    residual = list(
      vcov = c(0.8,0)
    )
  )
)

data <- get_population_data(squid_data)