Package 'csci'

Title: Current Status Confidence Intervals
Description: Calculates pointwise confidence intervals for the cumulative distribution function of the event time for current status data, data where each individual is assessed at one time to see if they had the event or not by the assessment time.
Authors: Sungwook Kim
Maintainer: Michael P. Fay <[email protected]>
License: GPL-3
Version: 0.9.3
Built: 2024-11-26 06:29:50 UTC
Source: CRAN

Help Index


Current Status Confidence Intervals

Description

Calculates pointwise confidence intervals for the cumulative distribution function of the event time for current status data, data where each individual is assessed at one time to see if they had the event or not by the assessment time.

Details

The DESCRIPTION file:

Package: csci
Type: Package
Title: Current Status Confidence Intervals
Version: 0.9.3
Date: 2020-12-02
Author: Sungwook Kim
Maintainer: Michael P. Fay <[email protected]>
Description: Calculates pointwise confidence intervals for the cumulative distribution function of the event time for current status data, data where each individual is assessed at one time to see if they had the event or not by the assessment time.
License: GPL-3
Depends: R (>= 3.5.0), exactci
NeedsCompilation: no
Packaged: 2020-12-03 21:25:32 UTC; faym
Repository: CRAN
Date/Publication: 2020-12-07 09:40:05 UTC
Config/pak/sysreqs: make

Index of help topics:

CSCI                    Pointwise Confidence Intervals for Current
                        Status Data
controlCSCI             Function for control parameters for algorithms
                        used in CSCI.
csci-package            Current Status Confidence Intervals
hepABulg                Hepatitis A Data from Bulgaria

The package only has one main function CSCI and one data set hepABulg.

Author(s)

Sungwook Kim

Maintainer: Michael P. Fay <[email protected]>


Function for control parameters for algorithms used in CSCI.

Description

Allows chainging of default parameters.

Usage

controlCSCI(power = 2/3, 
   quan_p = c(0.25, 0.5, 0.75, 0.8, 0.85, 0.9, 0.95, 0.99), 
   xp_hat = c(0.06402, 0.28506, 0.80694, 0.98729, 1.22756, 1.60246, 2.26916, 3.8363), 
   intF = 1000)

Arguments

power

for defining m in the algorithm when type='VALID': m=ceiling(n^power), where n=length(C)

quan_p

quantile associated with xp_hat, used when type='LIKELIHOOD'

xp_hat

estimated quantile of the distribution of the log likelihood ratio (see e.g., Table 2 of Banerjee and WWellner, 2001), used when type='LIKELIHOOD'

intF

numer of intervals to partition the F space (F=c(1:(intF-1)/intF)), used when type='LIKELIHOOD'

Details

For power, see Kim, et al 2020. For details on the other values, see the code for the type='LIKELIHOOD' algorithm and Banerjee and Wellner, 2001.

Value

A list of the argument values.

References

Banerjee, M. and J. A. Wellner (2001). Likelihood ratio tests for monotone functions. Ann. Statist. 29 (6), 1699-1731.

Kim, S, Fay, MP, Proschan, MA (2020). Valid and Approximately Valid Confidence Intervals for Current Status Data. (see https://arxiv.org/abs/1805.06488).


Pointwise Confidence Intervals for Current Status Data

Description

Calculates several different methods for getting pointwise confidence intervals for current st

Usage

CSCI(C, D, times=NULL, type = c("VALID", "ABA", "LIKELIHOOD"), 
   conf.level = 0.95, control=controlCSCI())

Arguments

C

a vector of assessement times

D

a vector of indicators of event at or before the assessment time

times

a vector of times, t, to give the confidence interval for the event time distribution, F(t). If NULL then set to sort(unique(C)).

type

type of confidence interval, either "VALID", "ABA", or "LIKELIHOOD" (see details)

conf.level

confidence level for intervals (for type="LIKELIHOOD" only specific values are allowed, see note)

control

list with parameters for algorithms, see controlCSCI

Details

The function does three types of pointwise confidence intervals for the cumulative distribution function for the event time at the times specified by times. When type="VALID" the function gives a method that guarantees that the coverage will be at least nominal, but the confidence intervals are not ensured to be monotonic over the times of interest. When type="ABA" the function gives an approximate method that does not guarantee coverage, but has been shown by simulation to have good coverage for smoothly changing distributions, and it does ensure monotonicity (see Kim, et al, 2020). When type="LIKELIHOOD" the function gives an asymptotic likelihood ratio test-based confidence interval that does not guarantee coverage (Banerjee and Wellner, 2001).

Value

A list with 2 objects:

ciTable_all

data.frame with NPMLE and associated confidence intervals for all possible time values (not output for type='LIKELIHOOD')

ciTable_times

data.frame with NPMLE and assoicated confidence intervals for the values of 'times' argument

Note

Because the likelihood ratio test goes to a non-standard asymptotic distribution, we do not calculate quantiles from that distribution, but take them from Table 2 of Banerjee and Wellner (2001). Because of this, when type="LIKELIHOOD" then conf.level must be one of 0.25,0.50,0.75,0.80,0.85,0.90,0.95, or 0.99.

Author(s)

Sungwook Kim

References

Banerjee, M. and J. A. Wellner (2001). Likelihood ratio tests for monotone functions. Ann. Statist. 29 (6), 1699-1731.

Kim, S, Fay, MP, Proschan, MA (2020). Valid and Approximately Valid Confidence Intervals for Current Status Data. (see https://arxiv.org/abs/1805.06488).

Examples

data(hepABulg)
CSCI(C=hepABulg$age,D=hepABulg$testPos,type="VALID")

Hepatitis A Data from Bulgaria

Description

Hepatitis A data from Bulgaria, collected from school-children and blood donors by Prof. G. Frosner, Munich (from Keiding, 1991, Table 1).

Usage

data("hepABulg")

Format

A data frame with 850 observations on the following 2 variables.

age

a numeric vector

testPos

a numeric vector, Hepatitis A positive=1, or not=0

Details

Each row in the data frame represents an individual and the age tested in years and the results of the hepatitis A test (1=positive, 0=negative). Ages of the individuals range from 1 to 86 years old.

Source

Keiding, N (1991). Age-specific Incidence and Prevalence: a Statistical Perspective. JRSS A 154(3): 371-412 (Table 2).

Examples

data(hepABulg)
head(hepABulg)