Implements continuous-time hidden Markov models (HMMs) to
    infer identity-by-descent (IBD) segments shared by two individuals
    from their single-nucleotide polymorphism (SNP) genotypes. Provides
    posterior probabilities at each marker (forward-backward algorithm),
    prediction of IBD segments (Viterbi algorithm), and functions for
    visualising results. Supports both autosomal data and X-chromosomal
    data.

This R package implements methods for estimation and inference under Incomplete Block Designs and Balanced Incomplete Block Designs within a design-based finite-population framework. Based on 'Koo and Pashley' (2026) <doi:10.1093/biomet/asag013>, it includes block-level estimators and extends to unit-level effects using 'Horvitz-Thompson' and 'Hájek' estimators. The package also provides asymptotic confidence intervals to support valid statistical inference.

Identity by Descent (IBD) distributions in pedigrees. A Hidden Markov
    Model is used to compute identity coefficients, simulate IBD segments and
    to derive the distribution of total IBD sharing and segment count across
    chromosomes. The methods are applied in Kruijver (2025) 
    <doi:10.3390/genes16050492>. The probability that the total IBD sharing
    is zero can be computed using the method of Donnelly (1983)
    <doi:10.1016/0040-5809(83)90004-7>.

Simulation of segments shared identical-by-descent (IBD) by
    pedigree members. Using sex specific recombination rates along the
    human genome (Halldorsson et al. (2019)
    <doi:10.1126/science.aau1043>), phased chromosomes are simulated for
    all pedigree members. Applications include calculation of realised
    relatedness coefficients and IBD segment distributions. 'ibdsim2' is
    part of the 'pedsuite' collection of packages for pedigree analysis.
    A detailed presentation of the 'pedsuite', including a separate
    chapter on 'ibdsim2', is available in the book 'Pedigree analysis in
    R' (Vigeland, 2021, ISBN:9780128244302). A 'Shiny' app for visualising
    and comparing IBD distributions is available at
    <https://magnusdv.shinyapps.io/ibdsim2-shiny/>.