survPMFPlot {survSpearman} | R Documentation |
Plots marginal and joint probability mass functions.
Description
Plots marginal and joint probability mass functions for bivariate survival data.
Usage
survPMFPlot(bivarSurf, gridWidthX, gridWidthY,
scaleGapX, scaleGapY, scaleHistX, scaleHistY,
XAxisLabel, YAxisLabel, lineXAxisLabel, lineYAxisLabel,
timeLabelScale, axisLabelScale,
labelSkipX, labelSkipY, roundX, roundY,
plotLabel, linePlotLabel)
Arguments
bivarSurf |
A matrix containing marginal and joint survival probabilities. The first column is the marginal survival probability corresponding to variable |
gridWidthX |
Grid size on |
gridWidthY |
Grid size on |
scaleGapX |
The proportion by which the gap between the marginal and joint histograms along the X-axis is increased (if >1) or decreased (if >0 and <1). |
scaleGapY |
The proportion by which the gap between the marginal and joint histograms along the Y-axis is increased (if >1) or decreased (if >0 and <1). |
scaleHistX |
The proportion by which to increase (if >1) or decrease (if >0 and <1) the height of the marginal histogram along the X-axis. |
scaleHistY |
The proportion by which to increase (if >1) or decrease (if >0 and <1) the height of the marginal histogram along the Y-axis. |
XAxisLabel |
|
YAxisLabel |
|
lineXAxisLabel |
Line where to place the |
lineYAxisLabel |
Line where to place the |
timeLabelScale |
The proportion by which the axis labels is increased (if >1) or decreased (if >0 and <1). |
axisLabelScale |
The proportion by which the time grid labels are increased (if >1) or decreased (if >0 and <1). |
labelSkipX |
If the time grid looks too busy, not all |
labelSkipY |
If the time grid looks too busy, not all |
roundX |
Number of decimal places in time grid labels for |
roundY |
Number of decimal places in time grid labels for |
plotLabel |
Plot label. |
linePlotLabel |
Line where to place the plot label (used by function |
Details
Plots marginal and joint probability mass functions (PMFs) from marginal and joint survival probabilities. The probability mass gets aggregated into cells according to the user-specified arguments gridWidthX
and gridWidthY
. After this aggregation, the negative values (if any) are set to zero. Marginal probability mass functions are displayed as histograms. Joint probability mass function is displayed as a matrix with darker cells indicating larger probability mass aggregated in this cell. Zero mass is denoted with a very faint gray shade. Because the shading is relative, with greater range of probability mass more gray shades are observed. A future version of the function will allow users to choose their own shading/color function.
Value
None
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.61, 0.6, 0.8, 0.78, 0.7, 0.9)
Y = c(0.44, 0.15, 0.77, 0.88, 0.22, 0.99, .33)
deltaX = c(1, 0, 1, 1, 0, 1, 0)
deltaY = c(1, 0, 1, 0, 1, 1, 1)
dabrSurf = survDabrowska(X, Y, deltaX, deltaY)$DabrowskaEst
grid = 0.1
survPMFPlot(bivarSurf = dabrSurf, gridWidthX = grid, gridWidthY = grid,
scaleGapX = 1, scaleGapY = 1,
XAxisLabel = "X", YAxisLabel = "Y", timeLabelScale = 1,
axisLabelScale = 1,
labelSkipX = 0, labelSkipY = 0, roundX = 2, roundY = 2,
plotLabel = "Bivariate PMF")