Learn R Programming

BayesianFROC (version 0.3.0)

fit_GUI_Shiny: Fit a model with GUI of Shiny

Description

A graphical user interface (GUI) to fit a model to data.

Usage

fit_GUI_Shiny(
  DF = data.frame(h = c(97L, 32L, 31L), f = c(1L, 14L, 74L)),
  NL.max = 1111,
  NI.max = 1111,
  NL.initial = 259,
  MCMC.chains.max = 4
)

Arguments

DF

A dataframe as an initial data to be fitted a model

NL.max

max number of bins indicating the maximal number in which the number of lesions can move

NI.max

max number of bins indicating the maximal number in which the number of imagegs can move

NL.initial

Natural number indicating the initial number of lesions, Default value =259. The reason why the author made this is in example code, the author made a very strange data in it, the default value = 259 is not satisfies the data format. That is in the example, total number of hits is greater than 259 and it is impossible. So, I have to change the default value.

MCMC.chains.max

max number of bins indicating number of MCMC chains

Value

None

Details

First, please execute, then user will understand what it is. This function is the one of the most important function in this package. I do not assume that the user is familiar with R script but FROC analysis. So, I made this function to provide the Graphical User Interface (GUI) for users to avoid CUI (Characteristic User Interface). The GUI is made by the shiny package.

Examples

Run this code
# NOT RUN {
## Only run examples in interactive R sessions
if (interactive()) {
#========================================================================================
#            1)           Use the default User Interface
#========================================================================================
#'

 #No need to consider the variables, it is sufficient in  default values.


 #fit_GUI_Shiny()




#========================================================================================
#            2)           Change the  User Interface
#========================================================================================


#  We can change the max imput of the number of lesions and the max of number of images
#

 fit_GUI_Shiny(NL.max = 2222,
                NI.max = 3333)





#========================================================================================
#            3)           Change the  Default value
#========================================================================================



 fit_GUI_Shiny(
 DF= data.frame( h=dataList.Chakra.4$h,
                 f=dataList.Chakra.4$f
               )
              )

# Or equivalently,

  fit_GUI_Shiny(
            DF= data.frame(
            h = c(160,  25,  15,   7),
            f = c(  8,  16,  18,  13)
                         )
            )


#========================================================================================
#            4)           Change the user Imterface
#========================================================================================



     fit_GUI_Shiny(

          DF= data.frame(
              h = c(160,  25,  15,   7),
              f = c(  8,  16,  18,  13)
                ),

                NL.max = 1192,
                NI.max = 794,
                MCMC.chains.max = 6

              )





#========================================================================================
#            5) CUI rather than GUI input
#========================================================================================


#              How to input data using CUI?
#                           This example gives an answer.
#

# CUI:  Characteristic user interface


# Here, I show the very strange data, that is, the number of hits is all 33
# and replicated 10 times, that is,
# h is substituted by rep(33L,10) indicating  33 33 33 33 33 33 33 33 33 33
# f is also same as h.




  fit_GUI_Shiny(NL.initial=555,
               DF =data.frame(
                 h= as.integer(rep(33,10)),
                 f= as.integer(rep(33,10))
               )
 )


# The author made this example since, when I check my program,
# such as whether the color used in polygon() is appropriate or not.

# If user thinks that it is very hard to input hits and false alarms
# by GUI manner, then use this characteristic like manner.


}### Only run examples in interactive R sessions

# }

Run the code above in your browser using DataLab