survRestricted: Computes conditional marginal and joint survival probability...

View source: R/survRestricted.R

survRestrictedR Documentation

Computes conditional marginal and joint survival probability in a restricted region.

Description

The function computes marginal and joint survival probabilities conditionally on surviving in a restricted region. This region is defined by the user as [0,tauX)x[0,tauY).

Usage

survRestricted(bivarSurf, tauX = Inf, tauY = Inf)

Arguments

bivarSurf

A matrix containing marginal and joint survival probabilities. The first column is the marginal survival probability corresponding to variable X. The first row is the marginal survival probability corresponding to variable Y. The rest of the matrix contains the joint survival probabilities. The row names of bivarSurf are ordered X values. The column names of bivarSurf are ordered Y values. Element bivarSurf[1,1] equals 1. Its row and column name is '0' (see the documentation for the return value DabrowskaEst in function survDabrowska).

tauX

The X value that defines the restricted region for the X variable.

tauY

The Y value that defines the restricted region for the Y variable.

Details

The method of Dabrowska can result in negative probability mass for some points, which may result in zero or negative probability of failure in the restricted region. This only happens when the sample size is small and censoring is heavy. If the probability of survival in the restricted region is zero or less, NA value is returned. Otherwise, the function returns a list of survival probabilities and their differentials conditionally on being in the restricted region defined by tauX and tauY. Element Sxy of this list is the conditional marginal and joint survival probabilities with row/column names in the same format as argument bivarSurf. The rest of the returned list elements are matrices in the same format as bivarSurf except that they do not contain marginal values and row/column names.

Value

The function returns the following list of survival surfaces and their differentials: Sxy is the conditional marginal and joint survival probabilities in the same format as bivarSurf; SxMyM is Sxy at point (x-, y-), where x- is the left limit of x; Sx is the conditional marginal survival probability function for variable X; Sy is the conditional marginal survival probability function for variable Y; Sdx is the conditional marginal probability mass function for variable X; Sdy is the conditional marginal probability mass function for variable Y; SxM is the conditional marginal survival probability function for X at point x-; SyM is the conditional marginal survival probability function for Y at point y-; SxM_y is the conditional joint survival probability function at point (x-, y); Sx_yM is the conditional joint survival probability function at point (x, y-); Sdx_y is SxM_y - Sxy; Sx_dy is Sx_yM - Sxy; Sdx_yM is SxMyM - Sx_yM; SxM_dy is SxMyM - SxM_y; Sdxdy is the conditional joint probability mass function.

Author(s)

Svetlana K Eden, svetlanaeden@gmail.com

References

Eden, S.K., Li, C., Shepherd B.E. (2021). Non-parametric Estimation of Spearman's Rank Correlation with Bivariate Survival Data, Biometrics (under revision).

Examples

X = c(0.5, 0.6, 0.8)
Y = c(0.44, 0.77, 0.99)
deltaX = c(1, 0, 1)
deltaY = c(1, 1, 1)
bivarSurf = survDabrowska(X, Y, deltaX, deltaY)$DabrowskaEst
bivarSurf

condSurf = survRestricted(bivarSurf, tauX = Inf, tauY = 0.88)$Sxy
condSurf


SvetlanaEden/survSpearman documentation built on Sept. 30, 2022, 3:47 p.m.