.create_triangle_dist | R Documentation |
Creates a discrete step/triangular distribution that can be used to sample values for sensitivity or specificity of a reference test or prevalence of a population.
.create_triangle_dist(
m,
w,
h,
threestate = FALSE,
suspect = 2/3,
step_size = 0.005,
p_proportion = TRUE
)
m |
This is a point estimate for the parameter in which you are obtaining the distribution, e.g. sensitivity, specificity, or prevalence. |
w |
|
h |
|
threestate |
logical (TRUE/FALSE) Indicates whether or not there is a "suspect" region (i.e. positive/suspect/negative). |
suspect |
A fraction that indicates what percentage of the remaining probability would be assigned to the suspect region. For instance, if the function gives sensitivity and then the probability of "suspect" is (1 - sensitivity) * suspect. |
step_size |
distance between the "x" in the discrete distribution, resolution of possible observations of the created distribution. |
p_proportion |
whether to express "p" as a proportion of its sum. |
data.frame
of "x", "y", and "p".
DiagTestKit-package
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.