permanent_environmental_competition: Build an permanent-environmental competition model

View source: R/competition.R

permanent_environmental_competitionR Documentation

Build an permanent-environmental competition model

Description

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

Usage

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 \alpha. 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

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 Aug. 6, 2024, 9:10 p.m.