Closed hallegue closed 2 years ago
I'm trying to sample 25 individuals from simulated data of 100 individuals. However, the number of individuals sampled is different in each simulation.
library(squidSim) sim_res <- simulate_population( data_structure = make_structure("individual(100)", repeat_obs=1), response_name = "Female", parameters = list( intercept = 0.19360, observation = list( names = c("Elo_score"), beta = c(-0.11368) ), residual = list( vcov = 6.95e-10 ) ), family = "binomial", link = "logit", n_pop = 1, sample_type = "nested", sample_param = cbind(individual=25, observation=1) ) sample_data <- get_sample_data(sim_res, sample_set=1)
I'm trying to work out the bug, but it seems to be whenrepeat_obs=1, so a quick fix is to have repeat_obs=2 and then observation=1 in sample_param
repeat_obs=1
repeat_obs=2
observation=1
sample_param
fixed with 45b5c67
I'm trying to sample 25 individuals from simulated data of 100 individuals. However, the number of individuals sampled is different in each simulation.