error_message_on_imaging_device_rhat_values: Error message *on a plot plane* (imaging device)

Description Usage Arguments Details Examples

View source: R/error_message_on_imaging_device_rhat_values.R

Description

Since, shiny board fix user interface, and it let me make this; in graphical device, the error message should be shown on its device. So, usual functions such as message() or cat() cannot use in Shiny board. Since, the UI is already made and it is graphical device!

If a fitted model converges, then the error message is none and thus only in R console, the message is printed such as "A model converged." and does not print error message on a plot plane.

Usage

1
2
3
4
5
6
error_message_on_imaging_device_rhat_values(
  StanS4class,
  verbose = TRUE,
  xxx = (max(StanS4class@metadata$ff) - min(StanS4class@metadata$ff))/2,
  digits = 3
)

Arguments

StanS4class

An S4 object of class stanfitExtended which is an inherited class from the S4 class stanfit. This R object is a fitted model object as a return value of the function fit_Bayesian_FROC().

To be passed to DrawCurves() ... etc

verbose

A logical. if TRUE, then the maximal R hat is printed in the R cosole.

xxx

A real number, indicating x-coordinate of error message in the imaging device

digits

digits to round r hat

Details

This is for non-convergent fitted model object, where convergence criteiron is R hat statistics for each model parameters.

Examples

 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
36
37
38
39
40
41
42
43
#========================================================================================
#   Non convergent fitting and error on it via a graphic device
#========================================================================================
 ## Not run: 

 # Creat a fitted model object which does not converge with R hat criterion:

 fit <- fit_Bayesian_FROC( ite  = 111,
                            cha = 1,
                        summary = TRUE,
                Null.Hypothesis  = FALSE,
                       dataList = dd # Here, non convergent data
                         )


# Nothing is plotted:

plot(0,0,
     type ="n",
     axes =FALSE,
     ann=FALSE
     )


 # Error message on the above graphic device:

error_message_on_imaging_device_rhat_values(fit)

#========================================================================================
#      Plot
#========================================================================================


        DrawCurves(fit)



# It does not work , and it is ,,, Ok since when non converges I will want to see
# plot, so this function is no need.

 # 2019 August 18

## End(Not run)#dontrun

BayesianFROC documentation built on Jan. 23, 2022, 9:06 a.m.