loglikelihood_proportions: The (incomplete data) loglikelihood function for the...

Description Usage Arguments Author(s) Examples

Description

The parameters alpha and beta are known.

Usage

1
loglikelihood_proportions(theta, x.non, alpha, beta, cvec)

Arguments

theta

c(p1, p2, ..., pk-1)

x.non

vector of non-synonymous mutation count

cvec

vector of k positive values c(c1, ..., ck)

Author(s)

Johanna Bertl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
c1 = 0.5; c2 = 10
p1 = 0.2; p2 = 0.8
alpha = 10
beta = 5

mutations = rnegbinmix(n=3000, alpha=alpha, beta=beta, c=c(c1, c2), p = c(p1, p2))

# likelihood surface

p1vec = seq(0.11, 0.3, by=0.01)

llp1 = numeric(20)

for(i in 1:20){
 llp1[i] = loglikelihood_proportions(theta=p1vec[i], x.non = mutations, alpha = alpha, beta = beta, cvec=c(c1, c2))
}

plot(p1vec, llp1, t="b")
abline(v=p1, col="red")

johannabertl/SelectionMix documentation built on May 3, 2019, 4:03 p.m.