Description Usage Arguments Examples
Computes the Cumulative Distribution Function of a Kinship Index (KI) comparing hypotheses hyp.1
vs hyp.2
for profiles with a given relationship (hyp.true
) to the case profile (e.g. "FS"
for full siblings).
1 2 3 4 |
x |
(optional) An integer matrix specifying a single profile. |
hyp.1 |
A character string giving the hypothesis in the numerator of the KI. Should be one of ibdprobs, e.g. "FS" (full sibling) or "PO" (parent/offspring) or "UN" (unrelated). |
hyp.2 |
A character string giving the hypothesis in the denominator of the KI. Should be one of ibdprobs, e.g. "FS" (full sibling) or "PO" (parent/offspring) or "UN" (unrelated). Defaults to "UN". |
hyp.true |
A character string specifying the true relationship between the case profile and the other profile. Should be one of ibdprobs, e.g. "FS" (full sibling) or "PO" (parent/offspring) or "UN" (unrelated). Defaults to "UN". |
freqs.ki |
A list specifying the allelic frequencies that are used when computing the KI. |
freqs.true |
(optionally) A list specifying the allelic frequencies that are used for computing the probabily distribution of the KI under |
markers |
Character vector stating the markers for which the KI distribution is derived. By default equal to all markers of |
theta.ki |
numeric value specifying the amount of background relatedness. |
theta.true |
numeric value specifying the amount of background relatedness. |
n.max |
Maximum number of events stored in memory. See |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.