Learn R Programming

BayesianFROC (version 0.2.1)

draw_latent_noise_distribution: Visualization of the Latent Gaussian for Hit rates

Description

Our FROC model use a latent Gaussian random variable to determine hit rates. That is each hit rate is defined as follows;

$$ p_5(z_1,...z_C; \mu, \sigma) = \int_{z5}^{\infty} Gaussian(z|\mu,\sigma)dz$$ $$ p_4(z_1,...z_C; \mu, \sigma) = \int_{z4}^{z5} Gaussian(z|\mu,\sigma)dz$$ $$ p_3(z_1,...z_C; \mu, \sigma) = \int_{z3}^{z4} Gaussian(z|\mu,\sigma)dz$$ $$ p_2(z_1,...z_C; \mu, \sigma) = \int_{z2}^{z3} Gaussian(z|\mu,\sigma)dz$$ $$ p_1(z_1,...z_C; \mu, \sigma) = \int_{z1}^{z2} Gaussian(z|\mu,\sigma)dz$$

For example, in the following data, the number of hit data with confidence level 5 41 which is considered as an sample from the Binomial distribution of hit rate \(p_5(z_1,...z_C; \mu, \sigma) = \int_{z5}^{\infty} Gaussian(z|\mu,\sigma)dz\)

with Bernoulli trial number is NL=142.

So, this Gaussian distribution determines hit rate, and this function draw_latent_noise_distribution() plot this Gaussian distribution \( Gaussian(z|\mu,\sigma)\). But reference distribution is not the standard Gaussian but \(d \log \Phi\) which determines the False alarm rate in the above manner. The author thinks the standard Gaussian is more comfortable to compare or confirm the shape of \( Gaussian(z|\mu,\sigma)\) and thus, the author implement it in the draw_latent_signal_distribution(),

Example data:

A single reader and single modality case

------------------------------------------------------------------------------------------------------

NI=63,NL=124 confidence level No. of false alarms No. of hits
In R console -> c f h
----------------------- ----------------------- ----------------------------- -------------
definitely present 5 1 41
probably present 4 2 22
equivocal 3 5 14
subtle 2 11 8
very subtle 1 13 1

---------------------------------------------------------------------------------------------------

* false alarms = False Positives = FP

* hits = True Positives = TP

Usage

draw_latent_noise_distribution(StanS4class, dark_theme = TRUE, dig = 3,
  mesh = 1000, new.imaging.device = TRUE, hit.rate = FALSE,
  false.alarm.rate = TRUE, both.hit.and.false.rate = FALSE,
  density = 22, color = TRUE, mathmatical.symbols = TRUE, type = 3)

Arguments

StanS4class

An S4 object of class stanfitExtended which is an inherited class from the S4 class stanfit. This R object can be passed to the DrawCurves(), ppp() and ... etc

dark_theme

TRUE or FALSE

dig

To be passed to the function rstan::sampling() in rstan. An argument of rstan::sampling() in which it is named ...??. A positive integer representing the Significant digits, used in stan Cancellation. default = 5,

mesh

Mesh for painting the area

new.imaging.device

Logical: TRUE of FALSE. If TRUE (default), then open a new device to draw curve. Using this we can draw curves in same plain by new.imaging.device=FALSE.

hit.rate

whether draws it. Default is TRUE.

false.alarm.rate

whether draws it. Default is TRUE.

both.hit.and.false.rate

whether draws it. Default is TRUE.

density

A natural number, indicating the density of shading lines, in lines per inch.

color

A color region is selected from black and white only. For more colors, put FALSE. For publication, the mono color is allowed in many case, so the author made this for such publication.

mathmatical.symbols

A logical, whether legend is in plot. @seealso draw_latent_noise_distribution() Note that the difference of draw_latent_noise_distribution() and draw_latent_signal_distribution() is that the lator use the standard Gaussian for the reference distribution and former uses the \(d \log \Phi()\) for the reference distribution.

So, the old version draw_latent_signal_distribution() is also important and I like this old version also. Anyway who read this, I think my package size is very large,....ha,,,,I have to reduce it,....but how?

type

An integer, for the color of background and etc.

Value

Information of Latent Gaussians, such as mean and S.D. of the signal distributions and thresholds.

See Also

draw_latent_signal_distribution()

Examples

Run this code
# NOT RUN {
#----------------------------------------------------------------------------------------
#   Shap of signal distribution strongly influences teh value of AUC, so in the following
#   the author shows how it affects the estimates of AUCs.
#    We consider two data examples, one is a low AUC and the other is a high AUC.
#   In the high AUC case, the Signal Gaussain will be low variance and
#   in the low AUC case, the variance will desperse.  2019 August 4, 2019 Dec 17
#----------------------------------------------------------------------------------------

#            ----- High AUC case --------

     viewdata(dataList.High)

     fit.High <- fit_Bayesian_FROC(dataList.High,ite=111)

     draw_latent_signal_distribution(fit.High)




#            ----- Low AUC case --------

     viewdata(dataList.Low)

     fit.Low <- fit_Bayesian_FROC(dataList.Low)

     draw_latent_signal_distribution(fit.Low)

# }
# NOT RUN {
# dottest
# }

Run the code above in your browser using DataLab