Learn R Programming

kindisperse (version 0.10.2)

axpermute: Estimate the axial dispersal distance of a kernel with confidence intervals

Description

This function performs an estimation of axial dispersal for a numeric vector of distances between close kin dyads with confidence intervals. The axial dispersal distance returned is interpretable as the standard deviation of one dimension of a symmetric bivariate random distribution centred on zero. Confidence intervals are assigned via bootstrapping, or optionally the vector of all bootstrapped results can be outputted by setting output to 'vect', enabling its passing to other functions or external statistical analysis.

Usage

axpermute(vals, nreps = 1000, nsamp = "std", composite = 1, output = "confs")

Arguments

vals

numeric. Vector of distances between close kin OR object of class KinPairData.

nreps

numeric. Number of permutations to run for confidence intervals (default 1000)

nsamp

numeric. Number of kin pairs to subsample for each permutation. Either "std" or an integer. If "std" will be computed as equal to the sample size. (default "std")

composite

numeric. The number of separate 'draws' (dispersal events) from the kernel required to produce the final positions of the measured individuals. For example, the displacement of a child from parent at the same lifestage would involve 1 draw and thus be composite = 1. Two full siblings would be two draws (composite = 2) from the FS kernel. Non-symmetric relationships (e.g. AV, 1C) should not be decomposed using this method, nor should any assumptions be made about different kernels (e.g. the 1C relationship would appropriately be given the value 2, but not 4)

output

character. Denotes what kind of output to return. If 'confs', a vector of 95% confidence intervals. if 'vect', a vector of all permuted axial value results

Value

If ouput = 'confs', returns a numeric vector of 95% confidence intervals and mean axial value. if output = 'vect', returns a numeric vector of all permuted axial value results

See Also

Other axial_helpers: axials_add(), axials_decompose(), axials_subtract(), axials(), axpermute_subtract()

Examples

Run this code
# NOT RUN {
po_dists <- rexp(100, 1 / 50)
axpermute(po_dists, composite = 1)
# }

Run the code above in your browser using DataLab