data(nydf)
coords <- with(nydf, cbind(longitude, latitude))
ubpop_stats <- optimal_ubpop(
coords = coords, cases = nydf$cases,
pop = nydf$pop, nsim = 49,
ubpop = seq(0.05, 0.5, by = 0.05)
)
if (FALSE) {
plot(ubpop_stats)
}
plot(ubpop_stats, method = "elbow")
plot(ubpop_stats$ubpop_seq, ubpop_stats$elbow_method$stats)
plot(ubpop_stats, method = "gini")
plot(ubpop_stats$ubpop_seq, ubpop_stats$gini_method$stats)
Run the code above in your browser using DataLab