Default correlation matrices in sim_long_form_occ 2/3 files
Currently the default number of species in sim_long_form_occ_2() and sim_long_form_occ_3() are set to n_spp=4. The default sigma_psi, sigma_p, and sigma_theta matrices in these functions are also set to have dimensions of n_spp but hard-coded to a default 4x4 correlation matrix. Right now an error appears if the user does not change the matrices but specifies an n_spp that is different than 4.
We whether to make the default matrices generated randomly or whether to write a more informative error message for users to understand they also need to input new correlation matrices for sizes other than n_spp=4. Potentially, the error message that is returned by default is also ok, but a decision is needed here.
Reproducible example:
n_units <- 20
n_unit_revisit_mean <- 11
k_samples_mean <- 12
n_spp <- 5
sim_data <-
sim_long_form_occ_2(n_units = n_units,
n_unit_revisit_mean = n_unit_revisit_mean,
n_spp = n_spp,
k_samples_mean = k_samples_mean,
spp_mu = rep(0.75, n_spp),
sigma_psi = matrix(c(1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 1.0, -0.7,
0.0, 1.0, 1.0, -0.7,
0.0, -0.7, -0.7, 1.0),
nrow = n_spp, ncol = n_spp),
sigma_p = matrix(c(1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 1.0, -0.7,
0.0, 1.0, 1.0, -0.7,
0.0, -0.7, -0.7, 1.0),
nrow = n_spp, ncol = n_spp))