Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

reduced.sample

Reduced Sample Estimator using Histogram Data


Description

Compute the Reduced Sample estimator of a survival time distribution function, from histogram data

Usage

reduced.sample(nco, cen, ncc, show=FALSE, uppercen=0)

Arguments

nco

vector of counts giving the histogram of uncensored observations (those survival times that are less than or equal to the censoring time)

cen

vector of counts giving the histogram of censoring times

ncc

vector of counts giving the histogram of censoring times for the uncensored observations only

uppercen

number of censoring times greater than the rightmost histogram breakpoint (if there are any)

show

Logical value controlling the amount of detail returned by the function value (see below)

Details

This function is needed mainly for internal use in spatstat, but may be useful in other applications where you want to form the reduced sample estimator from a huge dataset.

Suppose T[i] are the survival times of individuals i=1,…,M with unknown distribution function F(t) which we wish to estimate. Suppose these times are right-censored by random censoring times C[i]. Thus the observations consist of right-censored survival times T*[i] = min(T[i],C[i]) and non-censoring indicators D[i] = 1(T[i] <= C[i]) for each i.

If the number of observations M is large, it is efficient to use histograms. Form the histogram cen of all censoring times C[i]. That is, obs[k] counts the number of values C[i] in the interval (breaks[k],breaks[k+1]] for k > 1 and [breaks[1],breaks[2]] for k = 1. Also form the histogram nco of all uncensored times, i.e. those T*[i] such that D[i]=1, and the histogram of all censoring times for which the survival time is uncensored, i.e. those C[i] such that D[i]=1. These three histograms are the arguments passed to kaplan.meier.

The return value rs is the reduced-sample estimator of the distribution function F(t). Specifically, rs[k] is the reduced sample estimate of F(breaks[k+1]). The value is exact, i.e. the use of histograms does not introduce any approximation error.

Note that, for the results to be valid, either the histogram breaks must span the censoring times, or the number of censoring times that do not fall in a histogram cell must have been counted in uppercen.

Value

If show = FALSE, a numeric vector giving the values of the reduced sample estimator. If show=TRUE, a list with three components which are vectors of equal length,

rs

Reduced sample estimate of the survival time c.d.f. F(t)

numerator

numerator of the reduced sample estimator

denominator

denominator of the reduced sample estimator

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also


spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.