KinPairSimulation_composite: Constructor for KinPairSimulation Class (composite)

Description Usage Arguments Value Examples

View source: R/KinPairSimulation.R

Description

Constructor for KinPairSimulation Class (composite)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14

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).

initsigma

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

breedsigma

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

gravsigma

numeric. Axial sigma of post-breeding ('gravid') dispersal kernel (axial standard deviation).

ovisigma

numeric. Axial sigma of oviposition 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 'composite' 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_composite(kindata,
  kinship = "1C", kerneltype = "Gaussian",
  initsigma = 15, breedsigma = 25, gravsigma = 20, ovisigma = 10, lifestage = "immature"
)

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