Beran: Estimation of the conditional distribution function of the...

Description Usage Arguments Details Author(s) References Examples

View source: R/Beran.R

Description

Computes the conditional survival probability P(T > y|Z = z)

Usage

1
2
Beran(time, status, covariate, delta, x, y, kernel = "gaussian", bw, 
lower.tail = FALSE)

Arguments

time

The survival time of the process.

status

Censoring indicator of the total time of the process; 0 if the total time is censored and 1 otherwise.

covariate

Covariate values for obtaining estimates for the conditional probabilities.

delta

Censoring indicator of the covariate.

x

The first time (or covariate value) for obtaining estimates for the conditional probabilities. If missing, 0 will be used.

y

The total time for obtaining estimates for the conditional probabilities.

kernel

A character string specifying the desired kernel. See details below for possible options. Defaults to "gaussian" where the gaussian density kernel will be used.

bw

A single numeric value to compute a kernel density bandwidth.

lower.tail

logical; if FALSE (default), probabilities are P(T > y|Z = z) otherwise, P(T <= y|Z = z).

Details

Possible options for argument window are "gaussian", "epanechnikov", "tricube", "boxcar", "triangular", "quartic" or "cosine"

Author(s)

Gustavo Soutinho and Luis Meira-Machado

References

R. Beran. Nonparametric regression with randomly censored survival data. Technical report, University of California, Berkeley, 1981.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
b3state2 <- multidf(time1=bladder4state$y1, event1=bladder4state$d1, 
time=bladder4state$y1+bladder4state$y2,
status=bladder4state$d2, size=bladder4state$size)
head(b3state2[[1]])

##P(T>y|size=3)
library(KernSmooth)
obj0 <- b3state2[[1]]
h <- dpik(obj0$size)
Beran(time = obj0$time, status = obj0$status, covariate =obj0$size, x = 3, 
y = 50, bw = h)

##P(T<=y|size=3)
Beran(time = obj0$time, status = obj0$status, covariate =obj0$size, x = 3,
 y = 50, bw = h,
lower.tail = TRUE)

gsoutinho/survrec documentation built on Dec. 20, 2021, 1:46 p.m.