Description Usage Arguments Author(s) Examples
The function negQ = -Q can be used for minimization.
1 | Q(theta, theta.prime, x.syn, x.non, cvec)
|
theta |
c(alpha, beta, p1, p2, ..., pk-1) |
theta.prime |
c(alpha.prime, beta.prime, p1.prime, p2.prime, ..., p(k-1).prime) |
x.syn |
vector of synonymous mutation count |
x.non |
vector of non-synonymous mutation count |
cvec |
vector of k positive values c(c1, ..., ck) |
Johanna Bertl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ### Example with 2 components ###
# Simulate dataset of synonymous and non-synonymous mutations
c1 = 0.5; c2 = 10
p1 = 0.2; p2 = 0.8
alpha = 10
beta = 5
mutations = rnegbinmix_syn_nonsyn(n=3000, alpha=alpha, beta=beta, c=c(c1, c2), p = c(p1, p2))
# Q
Qtest = Q(theta = c(5, 1, 0.5), theta.prime = c(5, 1, 0.5), x.syn = mutations$Syn, x.non = mutations$Non, c = c(c1, c2))
### Example with 3 components ###
c1 = 0.01; c2 = 1; c3 = 100
p1 = 0.33; p2 = 0.33; p3 = 0.34
alpha = 10
beta = 5
mutations = rnegbinmix_syn_nonsyn(n=3000, alpha=alpha, beta=beta, c=c(c1, c2, c3), p = c(p1, p2, p3))
# Q
Qtest = Q(theta = c(5, 1, 0.3, 0.3), theta.prime = c(5, 1, 0.3, 0.3), x.syn = mutations$Syn, x.non = mutations$Non, c = c(c1, c2, c3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.