survPMF: Computes marginal and joint probability mass function from...

View source: R/survPMF.R

survPMFR Documentation

Computes marginal and joint probability mass function from marginal and joint survival probabilities.

Description

The function computes marginal and joint probability mass functions from marginal and joint survival probabilities.

Usage

survPMF(bivarSurf)

Arguments

bivarSurf

A matrix containing the 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).

Details

The function returns a list of survival surfaces and their differentials. Element Sdxdy of this list is the marginal and joint probability mass function 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 following list of survival surfaces and their differentials is returned. Sdxdy is the marginal and joint probability mass functions in the same format as argument bivarSurf; Sxy is the joint survival probability; SxMyM is Sxy at point (x-, y-), where x- is the left limit of x; Sx is the marginal survival probability function for variable X; Sy is the marginal survival probability function for variable Y; Sdx is the marginal probability mass function for variable X; Sdy is the marginal probability mass function for variable Y; SxM is the marginal survival probability function for X at point x-; SyM is the marginal survival probability function for Y at point y-; SxM_y is the joint survival probability function at point (x-, y); Sx_yM is the 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.

Author(s)

Svetlana K Eden, svetlanaeden@gmail.com

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

bivarPMF = survPMF(bivarSurf)$Sdxdy
bivarPMF


survSpearman documentation built on Sept. 27, 2022, 1:10 a.m.