What you look and where you look.
env_sampling <- env_grid |>
mutate(presabs = rbinom(n = nrow(env_grid), size = 1, prob = prob_occ),
is_samp = rbinom(n = nrow(env_grid), size = 1, prob = .1))
env_sampling |>
ggplot(aes(x = x, y = y, fill = presabs)) + geom_raster() +
geom_point(col = "red", data = env_sampling |>
filter(is_samp == 1))
Sample, but keep effort the same!
nsamp <- 40
randsamp <- sample(1:nrow(env_sampling), size = 100, replace = FALSE)
env_samp_effort_control <- env_sampling |>
rownames_to_column("rownum") |>
mutate(is_samp_better = as.numeric(rownum %in% randsamp))
env_samp_effort_control |>
ggplot(aes(x = x, y = y, fill = presabs)) +
geom_raster() +
geom_point(col = "red", data = env_samp_effort_control |>
filter(is_samp_better == 1))
sample NEGATIVELY correlated with the environment (birds that like deep forest)
nsamp <- 40
inverse_samp <- sample(1:nrow(env_sampling), size = 100, replace = FALSE,
prob = 1-env_samp_effort_control$prob_occ)
env_inverse <- env_samp_effort_control |>
mutate(inverse_samp = as.numeric(rownum %in% inverse_samp))
env_inverse |>
ggplot(aes(x = x, y = y, fill = presabs)) +
geom_raster() +
geom_point(col = "red", data = env_inverse |>
filter(inverse_samp == 1))