kin2degree {skater} | R Documentation |
Kinship coefficient to degree
Description
Infers relationship degree given a kinship coefficient.
Usage
kin2degree(k, max_degree = 3L)
Arguments
k |
Kinship coefficient (numeric, typically between 0 and .5, although KING can produce values <0). |
max_degree |
Max degree resolution (default 3). Used to seed
dibble. Anything below the inference range of
|
Value
A vector with inferred degree, up to the maximum degree in dibble
(anything more distant is NA
, i.e., unrelated).
Examples
kin2degree(0.5)
kin2degree(0.25)
kin2degree(0.125)
kin2degree(0.0625)
kin2degree(0.03125)
kin2degree(0.03125, max_degree=5)
kin2degree(-0.05)
k <- seq(.02, .5, .03)
kin2degree(k)
kin2degree(k, max_degree=5)
tibble::tibble(k=k) %>% dplyr::mutate(degree=kin2degree(k))
[Package skater version 0.1.2 Index]