joint.likelihood: Calculate the joint likelihood of a vector of dispersion.

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculate the likelihood using dnbinom() in stat package

Usage

1
joint.likelihood(theta, ys,  m0, ma, null = FALSE,const=1)

Arguments

theta

The dispersion parameter.

ys

The count data

m0

The means under the null.

ma

The means under alternative.

null

Whether to calculate under null model or full model.

const

A multiplying constant to make the product of likelihoods non-zero.

Value

A numeric vector indicating product of likelihood of each theta.

Author(s)

Yilun Zhang

See Also

joint.like, likelihoodpercond

Examples

1
2
3
4
5
6
7
8
9
theta=c(0.8, 1.2)
ys=rnbinom(10, mu=5, size=1)

cond = rep(0:1, each=5)
mu0 = rep(5, 10)
mua = rep(c(4, 6) , each = 5)

joint.likelihood(theta, ys, cond,mu0, mua, null = TRUE)
joint.likelihood(theta, ys, cond,mu0, mua, null = FALSE)

lunge111/intSEQ documentation built on May 20, 2019, 9:38 a.m.