Description Usage Arguments Details Value Examples
View source: R/validation_MRMC_Create_dataList_MRMC_Hit_from_rate_etc.R
Transform a vector into an array
1 | from_array_to_vector(Three.dim.array)
|
Three.dim.array |
Three dimensional array, such as the number of hits for each confidence level, modality and reader. Or false alarms. Since the author construct the substituting data list as one dimensional (one index) array, it needs to reconstruct to the three indexed array from one dimensional array whose subscript is [confidence level, modality, reader ] or vice versa. |
In stan files of this package,
the number of hits,
false alarms
and hit rates in binomial assumption for MRMC case
are written with the three indexed array format.
Three index indicates
confidence levels, modality ID, reader ID.
However, hit data passed to
the function BayesianFROC::fit_Bayesian_FROC()
are written with the vector.
So, in order to connect these different format, (i.e. vector and array, ) the author made this function.
A vector, transformed from three dimensional array.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ## Not run:
#========================================================================================
# Practical example
#========================================================================================
h.array.etc <- hits_from_thresholds()
h.array.etc$h
h.vector <- from_array_to_vector(h.array.etc$h)
h.vector
#========================================================================================
# Educational example 1
#========================================================================================
a <- array_easy_example()
a
a.vector <- from_array_to_vector(a)
a.vector
#========================================================================================
# Educational example 2
#========================================================================================
a <- array_easy_example(2,3,2)
a
a.vector <- from_array_to_vector(a)
a.vector
# Revised 2019 August 20
# Revised 2020 Jan
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.