Create A matrix and intmap

Description

This function is borrowed from package interval by Professor Michael Fay and used in function ModifiedEMICM to provide an NPMLE of a survival function. The A matrix is an n by m matrix of zeros and ones, where each row represents one of n failure times, and each column represents a possible interval for the nonparametric maximum likelihood estimate (NPMLE). The function Aintmap creates an A matrix and associated intmap from left and right intervals (L and R) which may not include the boundary of the interval (using Lin or Rin). The matrix intmap denotes the intervals of the potential jumps in the distribution of the NPMLE, and its attribute LRin denotes whether to include each of the interval or not.

Usage

1
Aintmap(L, R, Lin = NULL, Rin = NULL)

Arguments

L

numeric vector of left endpoints of censoring interval

R

numeric vector of right endpoints of censoring interval

Lin

logical vector, should L be included in the interval? (see details)

Rin

logical vector, should R be included in the interval? (see details)

Value

A list with two objects:

A

an n by m matrix of 0 and 1s

intmap

the associated intmap

Author(s)

Michael Fay

See Also

ModifiedEMICM

Examples

1
2
Aintmap(c(2,3,3,7),c(3,5,5,8),Lin=c(FALSE,TRUE,FALSE,FALSE),
Rin=c(TRUE,FALSE,TRUE,FALSE))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.