| Stressconversion {stressaddition} | R Documentation |
Convert Between Stress and Survival
Description
Functions to convert survival to general stress or vice versa using the beta distribution.
Usage
survival_to_stress(survival, p = 3.2, q = 3.2)
stress_to_survival(stress, p = 3.2, q = 3.2)
Arguments
survival |
One or more survival values to convert to general stress. Should be a value between 0 and 1. Smaller or bigger values are treated as 0 or 1 respectively. |
p, q |
The shape parameters of the |
stress |
One or more stress values to convert to survival. |
Details
These are simple wrappers around the beta distribution function
pbeta and the beta quantile function
qbeta.
Value
stress_to_survival returns a vector the same length as
stress giving the survival caused by each amount of stress.
survival_to_stress returns a vector the same length as
survival containing the stress values associated with each survival.
Examples
stress <- 0.3
survival <- stress_to_survival(stress)
survival_to_stress(survival)
[Package stressaddition version 3.1.0 Index]