permanent_environmental_competition: Build an permanent-environmental competition model

Description Usage Arguments Value Examples

View source: R/competition.R

Description

Given the coordinates of observations, and the competition decay parameter, build a permanent_environmental_competition model.

Usage

1
permanent_environmental_competition(coordinates, decay, autofill = TRUE)

Arguments

coordinates

two-column matrix-like set of row and column coordinates of observational units

decay

numeric. The positive value of the decay parameter α. Typically 1 or 2. See Details.

autofill

logical. If TRUE (default) it will try to fill missing rows or columns with missing observations. Otherwise, will treat individuals as neighbours even if they are across an empty line.

Value

An object inheriting from competition with the incidence and structure matrices for the random effect.

Examples

1
2
3
4
5
6
dat <- data.frame(id   = 1:5,
                  sire = c(11, 11, 2, 3, 2),
                  dam  = c(12, NA, 1, 12, 1),
                  x    = c(rep(1:2, times = 2), 3),
                  y    = c(rep(1:2, each = 2), 3))
breedR:::permanent_environmental_competition(coord = dat[, c('x', 'y')], decay = 2)

famuvie/breedR documentation built on Sept. 6, 2021, 4:50 a.m.