npem.sem: Obtain standard errors for the estimates from npem.em

View source: R/npem_sem.R

npem.semR Documentation

Obtain standard errors for the estimates from npem.em

Description

Uses the SEM algorithm to obtain estimated standard errors for the MLEs obtained after fitting the normal-Poisson mixture model to data on a cell proliferation assay.

Usage

npem.sem(
  y,
  npem.em.out,
  cells = 10^6,
  start = npem.em.out$ests * 1.05 + 0.001,
  n = c(24, 24, 24, 22),
  n.plates = 1,
  use.order.constraint = TRUE,
  all.se = TRUE,
  tol = 0.000001,
  maxk = 20,
  prnt = 0,
  do.var = TRUE,
  maxit = 1000
)

Arguments

y

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

npem.em.out

Output from the function npem.em().

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).

start

Starting estimates, some small distance away from the MLE. A vector of the form (\lambda's, (a, b, \sigma)'s).

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.

use.order.constraint

If TRUE, force the constraint \lambda_0 \le \lambda_i for all i \ge 1; otherwise, no constraints are applied.

all.se

If TRUE, do the full SEM algorithm; if FALSE, ignore the plate-specific parameters (a,b,\sigma)'s, to get estimated SEs for the \lambda's.

tol

Tolerance to determine when to stop the EM algorithm.

maxk

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

prnt

If 0, don't print anything; if 1, print out (at each step) the rate matrix and which elements have converged.

do.var

If TRUE, calculate the variance-covariance matrix and standard errors; if FALSE, only calculate the full-data information matrix and rate matrix.

maxit

Maximum number of iterations to perform.

Details

Calculations are performed in a C routine. It is important to first run npem.em() with a very small value for tol, such as 10^{-13}.

Value

infor

The full-data information matrix

rates

The rate matrix ("DM" in Meng and Rubin's notation).

n.iter

Number of iterations performed in calculating the rate matrix.

var

The estimated variance-covariance matrix.

se

The estimated standard errors. (The square root of the diagnol of var.)

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
Dempster et al. (1977) Maximum likelihood estimation from incomplete data via the EM algorithm. J Roy Statist Soc Ser B 39:1-38
Meng and Rubin (1991) Using EM to obtain asymptotic variance-covariance matrices: the SEM algorithm. J Am Statist Asso 86:899-909

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,tol=1e-13)
  out.sem.pl3 <- npem.sem(p713$counts[[3]],out.pl3,n=p713$n)


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