npem.ll: Calculate the log likelihood for the normal-Poisson model

View source: R/npem_ll.R

npem.llR Documentation

Calculate the log likelihood for the normal-Poisson model

Description

Calculates the log likelihood at a single point in the parameter space, for the normal-Poisson mixture model with data on a cell proliferation assay.

Usage

npem.ll(y, ests, cells = 10^6, n = c(24, 24, 24, 22), n.plates = 1, maxk = 30)

Arguments

y

Vector of transformed scintillation counts, in lexicographical order (plate by plate and group by group within a plate.)

ests

Value of the parameters at which to calculate the log likelihood, as a vector of length n.groups + 3*n.plates, of the form (\lambda's, (a, b, \sigma)'s), where \lambda is the average number of responding cells per 10^6 cells for a group, and (a, b, \sigma) are the plate-specific parameters.

cells

Number of cells per well. The \lambda's will be rescaled to give response per 10^6 cells. This may be either a single number (if all wells have the same number of cells, or 10^6 if one wishes the \lambda's to not be rescaled), a value for each plate (vector of length n.plates, or a value for each well (a vector of the same length as y).

n

Vector giving the number of wells within each group. This may have length either n.groups (if all plates have the same number of wells per group) or n.groups*n.plates.

n.plates

The number of plates in the data.

maxk

Maximum k value in sum calculating E(k | y).

Details

Calculations are performed in a C routine.

Value

loglik

The log likelihood function calculated at the point ests in the parameter space.

Author(s)

Karl W Broman, broman@wisc.edu

References

Broman et al. (1996) Estimation of antigen-responsive T cell frequencies in PBMC from human subjects. J Immunol Meth 198:119-132

See Also

npem.em()

Examples

  data(p713)
  start.pl3 <- npem.start(p713$counts[[3]],n=p713$n)
  out.pl3 <- npem.em(p713$counts[[3]],start.pl3,n=p713$n)
  npem.ll(p713$counts[[3]],start.pl3,n=p713$n)
  npem.ll(p713$counts[[3]],out.pl3$ests,n=p713$n)


kbroman/npem documentation built on May 17, 2023, 11:52 p.m.