The class KinPairSimulation is a formal (S4) class for storing kinship and dispersal
distribution information derived from simulations in the kindisperse package.
It is derived from the KinPairData class.
The KinPairSimulation class is used to store information about the spatial distribution of kin dyads for use
in calculating axial sigmas of intergenerational dispersal as initially implemented in Jasper et al. 2019
(https://doi.org/10.1111/1755-0998.13043).
# S4 method for KinPairSimulation
show(object)# S4 method for KinPairSimulation
initialize(
.Object,
data = NULL,
kinship = NULL,
lifestage = NULL,
simtype = NULL,
kerneltype = NULL,
kernelshape = NULL,
posigma = NULL,
initsigma = NULL,
breedsigma = NULL,
gravsigma = NULL,
ovisigma = NULL,
customsigma = NULL,
cycle = NULL,
simdims = NULL,
call = NULL,
filtertype = NULL,
upper = NULL,
lower = NULL,
spacing = NULL,
samplenum = NULL,
sampledims = NULL,
model = NULL
)
object of class KinPairSimulation
object to be constructed into KinPairSimulation class
tbl_df. tibble of simulation values
character - one of PO, FS, HS, AV, HAV, GG, 1C, H1C, GAV, HGAV, 1C1, H1C1, GGG, 2C, and H2C.
character - one of 'unknown', 'immature' or 'ovipositional'
character - simulation type
character. - 'Gaussian', 'Laplace' or 'vgamma' (variance-gamma)
numeric. - value of kernel shape of simulation (if using kernel with shape parameter e.g. vgamma)
numeric - overall value of dispersal sigma (for simple kernel)
numeric. - value of pre-breeding dispersal sigma (for composite kernel)
numeric. - value of breeding dispersal sigma (for composite kernel)
numeric. - value of post-breeding dispersal sigma (for composite kernel)
numeric. - value of oviposition dispersal sigma (for composite kernel)
numeric. - vector of named custom dispersal sigmas (for custom kernel)
integer - number of breeding cycles sampled individual has survived (for custom kernel)
numeric. - dimensions of sampling area (assumes one side of square)
call. Call to create object
character. whether the initial sim has been further filtered
numeric. - FILTER: upper threshold used
numeric. - FILTER: lower threshold used
numeric. - FILTER: spacing used
numeric. - FILTER: sample number used
numeric. - FILTER: sample dimensions used
list - model information if custom simulation used to generate object
an object of class KinPairSimulation
returns object of class KinPairSimulation
No return value, called for side effects
Returns an object of class KinPairSimulation
show: print method
initialize: initialisation method
kinshipcharacter - one of PO, FS, HS, AV, HAV, GG, 1C, H1C, GAV, HGAV, 1C1, H1C1, GGG, 2C, and H2C.
simtypecharacter. - one of 'simple', 'composite' or 'custom'
kerneltypecharacter. - 'Gaussian', 'Laplace' or 'vgamma' (variance-gamma)
posigmanumeric. - overall value of dispersal sigma (for simple kernel)
initsigmanumeric. - value of pre-breeding dispersal sigma (for composite kernel)
breedsigmanumeric. - value of breeding dispersal sigma (for composite kernel)
gravsigmanumeric. - value of post-breeding dispersal sigma (for composite kernel)
ovisigmanumeric. - value of oviposition dispersal sigma (for composite kernel)
customsigmanumeric - vector of named custom dispersal sigmas (for custom kernel)
simdimsnumeric. - dimensions of sampling area (assumes 1 side of square)
lifestagecharacter. - lifestage at sampling - either 'immature' or 'ovipositional'
cycleinteger - number of breeding cycles sampled individuals have survived (for custom kernel)
kernelshapenumeric. - shape parameter if vgamma kerneltype
callcall. - call to create initial simulation
tabtbl_df. - tibble of simulation values
filtertypecharacter. - whether the initial sim has been further filtered
uppernumeric. - FILTER: upper threshold used
lowernumeric. - FILTER: lower threshold used
spacingnumeric. - FILTER: spacing used
samplenumnumeric. - FILTER: sample number used
sampledimsnumeric. - FILTER: dimensions used
modelDispersalModel - model of dispersal used to create object (with custom type)
This class is essentially wrapped around the tbl_df class but with (a) expectations around certain columns
that must be present (id1, id2, kinship, & distance - three 'character' & one 'numeric' column), as
well as (b) additional attributes (kinship, lifestage, & cycle) characterizing the close-kin
dyads being stored.These attributes, as well as the embedded vector of distances, can be accessed with the methods
kinship, lifestage, breeding_cycle and distances.
In addition to the above attributes (derived from the KinPairData class), this class contains attributes
capturing the simulation type & parameters used to generate the final distribution of kin dyads.
Objects from this class are returned from the simulate_kindist_composite,
simulate_kindist_simple and simulate_kindist_custom functions
(& related), and are directly constructed with the namesake KinPairSimulation() function.
They can be passed to the sample_kindist function for filtering and subsampling, and to
axial functions (including axials_standard and axpermute_standard) for estimation of
axial dispersal.
Other kdclasses:
DispersalModel-class,
KinPairData-class