KinPairSimulation_simple: Constructor for KinPairSimulation Class (simple)

Description Usage Arguments Value Examples

View source: R/KinPairSimulation.R

Description

Constructor for KinPairSimulation Class (simple)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

Arguments

data

tibble of pairwise kin classes & distances. Ideally contains fields id1 & id2 (chr) an distance (dbl) optionally includes coords (x1, y1, x2, y2), lifestage (ls1 & ls2), kinship (chr) and sims (dbl)

kinship

character. Code for kinship category of simulation. one of PO, FS, HS, AV, GG, HAV, GGG, 1C, 1C1, 2C, GAV, HGAV, H1C or H2C

kerneltype

character. Statistical model for simulated dispersal kernel. Currently either "Gaussian", "Laplace" or "vgamma" (variance-gamma).

posigma

numeric. Axial sigma of dispersal kernel (axial standard deviation).

simdims

numeric. Length of side of simulated area square.

lifestage

character. Simulated lifestage of sampling. Either "immature" (sampled at hatching) or "ovipositional" (sampled as an adult during oviposition - essentially one lifespan later than 'immature')

kernelshape

numeric. Value of shape parameter for simulated kernel if kernel requires one (e.g. vgamma kernel).

call

call object. Use to pass the system call that led to the generation of this class. (via sys.call)

model

DispersalModel - model information passed from simulation function

Value

Returns a KinPairSimulation Class object with simtype set to 'simple' and relevant fields included.

Examples

1
2
3
4
5
6
7
8
kindata <- tibble::tibble(
  id1 = c("a", "b", "c"), id2 = c("x", "y", "z"),
  distance = c(50, 45, 65), kinship = c("1C", "1C", "1C")
)
KinPairSimulation_simple(kindata,
  kinship = "1C", kerneltype = "Gaussian",
  posigma = 38, lifestage = "immature"
)

kindisperse documentation built on July 28, 2021, 5:09 p.m.