# for one profile, obtain the CDF of the SI,
# both for true sibs and unrelated profiles
data(freqsNLsgmplus)
# sample a profile
x <- sample.profiles(N=1,freqsNLsgmplus)
cdf.fs <- ki.cdf(x,hyp.1="FS",hyp.true="FS")
cdf.un <- ki.cdf(x,hyp.1="FS",hyp.true="UN")
# the cdf's are *functions*
cdf.fs(1)
cdf.un(1)
# we also obtain an ROC curve easily
t <- 10^(seq(from=-10,to=10,length=100)) # some thresholds
fpr <- cdf.un(t,exc.prob=TRUE)
tpr <- cdf.fs(t,exc.prob=TRUE)
plot(log10(fpr),tpr,type="l")
Run the code above in your browser using DataLab