ibdBootstrap | R Documentation |

This function produces (parametric or nonparametric) bootstrap estimates of
the IBD coefficients between two individuals. Both kappa and delta
coefficients are supported (see `ibdEstimate()`

).

ibdBootstrap( x = NULL, ids = NULL, param = NULL, kappa = NULL, delta = NULL, N, method = "parametric", freqList = NULL, plot = TRUE, seed = NULL )

`x` |
A |

`ids` |
A pair of ID labels. |

`param` |
Either NULL (default), "kappa" or "delta". (See below.) |

`kappa, delta` |
Probability vectors of length 3 (kappa) or 9 (delta).
Exactly one of |

`N` |
The number of simulations. |

`method` |
Either "parametric" (default) or "nonparametric". Abbreviations are allowed. see Details for more information about each method. |

`freqList` |
A list of probability vectors: The allele frequencies for each marker. |

`plot` |
A logical, only relevant for bootstraps of kappa. If TRUE, the bootstrap estimates are plotted in the IBD triangle. |

`seed` |
An integer seed for the random number generator (optional). |

The parameter `method`

controls how bootstrap estimates are obtained in each
replication.

If `method = "parametric"`

, new profiles for two individuals are simulated
from the input coefficients, followed by a re-estimation of the coefficients.

If `method = "nonparametric"`

, the original markers are sampled with
replacement, before the coefficients are re-estimated.

A data frame with `N`

rows containing the bootstrap estimates. The
last column (`dist`

) gives the euclidean distance to the original
coefficients, viewed as a point in R^3 (kappa) or R^9 (delta).

`ibdEstimate()`

# Frequency list of 15 standard STR markers freqList = NorwegianFrequencies[1:15] # Number of bootstrap simulations (increase!) N = 5 # Bootstrap estimates for kappa of full siblings boot1 = ibdBootstrap(kappa = c(0.25, .5, .25), N = N, freqList = freqList) boot1 # Mean deviation mean(boot1$dist) # Same, but with the 9 identity coefficients. delta = c(0, 0, 0, 0, 0, 0, .25, .5, .25) boot2 = ibdBootstrap(delta = delta, N = N, freqList = freqList) # Mean deviation mean(boot2$dist) #### Non-parametric bootstrap. # Requires `x` and `ids` to be provided x = nuclearPed(2) x = markerSim(x, ids = 3:4, N = 50, alleles = 1:10, seed = 123) bootNP = ibdBootstrap(x, ids = 3:4, param = "kappa", method = "non", N = N) # Parametric bootstrap can also be done with this syntax bootP = ibdBootstrap(x, ids = 3:4, param = "kappa", method = "par", N = N)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.