Giter Site home page Giter Site logo

Comments (1)

magnusdv avatar magnusdv commented on June 3, 2024

The IBD coefficients (kappa) are defined only for non-inbred individuals. In your example the grandfather is inbred, hence all kappas involving him come out as NA. As shown below, a warning about this is printed if you add verbose = T in the call. (Perhaps this should be the default behaviour!)

BTW, the function linearPed() is useful for creating (great)grandparent relationships. Also note that pedtools is loaded automatically with ribd.

library(ribd, warn = F)
#> Loading required package: pedtools

x = linearPed(2)
founderInbreeding(x, 1) = 0.1

# Undefined kappas since 1 in inbred
kappaIbd(x, ids = c(1, 5), verbose = T)
#> Warning: kappa coefficients are only defined for non-inbred individuals.
#> 1: f = 0.100000
#> [1] NA NA NA

# All pairs at once
kappaIbd(x)
#>    id1 id2 kappa0 kappa1 kappa2
#> 1    1   2     NA     NA     NA
#> 2    1   3     NA     NA     NA
#> 3    1   4     NA     NA     NA
#> 4    1   5     NA     NA     NA
#> 5    2   3    0.0    1.0      0
#> 6    2   4    1.0    0.0      0
#> 7    2   5    0.5    0.5      0
#> 8    3   4    1.0    0.0      0
#> 9    3   5    0.0    1.0      0
#> 10   4   5    0.0    1.0      0

Created on 2019-06-14 by the reprex package (v0.3.0)

from ribd.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.