EM: A function to compute the NPMLE of p based on the incidence...

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

View source: R/icmle.R

Description

The incidence matrix, A is the m by n matrix that represents the data. There are m probabilities that must be estimated. The EM, or expectation maximization, method is applied to these data.

Usage

1
EM(A, pvec, maxiter=500, tol=1e-12)

Arguments

A

The incidence matrix.

pvec

The probability vector.

maxiter

The maximum number of iterations.

tol

The tolerance used to judge convergence.

Details

Lots.

Value

An object of class icsurv containing the following components:

pf

The NPMLE of the probability vector.

numiter

The number of iterations used.

converge

A boolean indicating whether the algorithm converged.

intmap

If present indicates the real representation of the support for the values in pf.

Author(s)

Alain Vandal and Robert Gentleman.

References

The EM algorithm applied to the maximal cliques of the intersection graph of the censored data. The empirical distribution function with arbitrarily grouped, censored and truncated data, B. W. Turnbull, 1976, JRSS;B.

See Also

VEM, ISDM, EMICM, PGM

Examples

1
2
3
4
5
    data(cosmesis)
    csub1 <- subset(cosmesis, subset= Trt==0, select=c(L,R))
    EM(csub1)
    data(pruitt)
    EM(pruitt)

Example output

Loading required package: survival
$pf
 [1] 4.634677e-02 3.336337e-02 8.866737e-02 7.075292e-02 0.000000e+00
 [6] 0.000000e+00 9.264584e-02 0.000000e+00 8.178576e-02 0.000000e+00
[11] 8.671167e-13 1.208798e-01 6.597546e-12 4.655581e-01

$numiter
[1] 370

$converge
[1] TRUE

$intmap
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
[1,]    4    6    7   11   15   17   24   25   33    34    36    38    40    46
[2,]    5    7    8   12   16   18   25   26   34    35    37    40    44    48

attr(,"class")
[1] "icsurv"
$pf
[1] 0.12500000 0.15103698 0.20998211 0.15296182 0.04016529 0.05543585 0.26541796

$numiter
[1] 231

$converge
[1] TRUE

$intmap
NULL

attr(,"class")
[1] "icsurv"

Icens documentation built on Nov. 8, 2020, 8:12 p.m.

Related to EM in Icens...