Detection of edge (border) effects in agricultural field trials via the Besag-Kempton competition model.
Implements the least-squares estimator of the intraspecific competition coefficient (kappa) associated with the edge effect, plus a simulation-based decision procedure, Moran's I diagnostics, and a Shiny app. Method from Darghan, Rivera, Gonzalez & Castellanos (2022), doi:10.47280/RevFacAgron(LUZ).v39.n1.18. Original research code: https://github.com/CarlosRivera1212/BorderEffect.
# install.packages("remotes")
remotes::install_github("<owner>/BorderEffect")library(BorderEffect)
data(field_trial)
be <- border_effect(response ~ trt + blk, data = field_trial, coords = field_trial)
bt <- border_test(be, pattern = "outer1", nsim = 500)
bt
plot(bt)
# interactive app
run_border_app()