joint.like: Calculate the joint likelihood

Description Usage Arguments Details Value Author(s) See Also Examples

Description

A small function to calculate the joint likelihood.

Usage

1
joint.like(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.

Details

Calculate the likelihood using dnbinom() in stat package

Value

A numeric scalar indicating product of likelihood.

Author(s)

Yilun Zhang

See Also

joint.likelihood, likelihoodpercond

Examples

1
2
3
4
5
6
7
8
9
theta=1
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.like(theta, ys, cond,mu0, mua, null = TRUE)
joint.like(theta, ys, cond,mu0, mua, null = FALSE)

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