MyNixOS website logo
Description

Confidence Intervals for the Current Status Model.

Computes the maximum likelihood estimator, the smoothed maximum likelihood estimator and pointwise bootstrap confidence intervals for the distribution function under current status data. Groeneboom and Hendrickx (2017) <doi:10.1214/17-EJS1345>.

curstatCI

The goal of curstatCI is to obtain confidence intervals for the distribution function of a random variable based on current status data. In the current status model, the variable of interest X with distribution function F0 is not observed directly. A censoring variable T is observed instead together with the indicator Δ = (X ≤ T). curstatCI provides functions to estimate the distribution function F0 and to construct pointswise confidence intervals around F0(t) based on an observed sample (T1, Δ1),…,(Tn, Δn) of size n from the observable random vector (T, Δ).

Installation

You can install curstatCI from CRAN with:

# install.packages("curstatCI")

The package curstatCI requires the library Rcpp. To use the functions available in curstatCI load:

load(Rcpp)
load(curstatCI)

You can install curstatCI from github with:

# install.packages("devtools")
devtools::install_github("kimhendrickx/curstatCI")

Example

This is a basic example which shows you how to obtain the confidence intervals for the distribution function of the time to infection for the Rubella data set. More information on the data and usage of the package can be found in the vignette "curstatCI":

library(Rcpp)
library(curstatCI)
set.seed(1)
data(rubella) 
grid <-1:80
bw <-ComputeBW(data=rubella, x=grid)
#> The computations took    1.256   seconds
out<-ComputeConfIntervals(data=rubella,x=grid,alpha=0.05, bw = bw)
#> The program produces the Studentized nonparametric bootstrap confidence intervals for the cdf, using the SMLE.
#> 
#> Number of unique observations:    225
#> Sample size n =  230
#> Number of Studentized Intervals = 80
#> Number of Non-Studentized Intervals = 0
#> The computations took    0.414   seconds

out$MLE
#>          [,1]      [,2]
#>  [1,]  0.0000 0.0000000
#>  [2,]  0.9452 0.2000000
#>  [3,]  1.2301 0.4857143
#>  [4,]  5.6411 0.5000000
#>  [5,]  9.4603 0.5714286
#>  [6,] 12.4548 0.8571429
#>  [7,] 15.4466 0.8666667
#>  [8,] 20.8000 0.8750000
#>  [9,] 23.2219 0.9285714
#> [10,] 25.2932 0.9401709
#> [11,] 77.8027 1.0000000

smle <-  out$SMLE
left<-out$CI[,1]
right<-out$CI[,2]

ConfInt<-cbind(smle, left, right)
head(ConfInt)
#>            smle       left      right
#> [1,] 0.05205647 0.04645370 0.05684488
#> [2,] 0.10387679 0.09062863 0.11518718
#> [3,] 0.15522742 0.13450756 0.17291065
#> [4,] 0.20587997 0.17795836 0.22970949
#> [5,] 0.25561365 0.22085116 0.28528225
#> [6,] 0.30421750 0.26290425 0.33934792
Metadata

Version

0.1.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows