# 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)
Run the code above in your browser using DataLab