Learn R Programming

BayesianFROC (version 1.0.0)

name_of_param_whose_Rhat_is_maximal: Extract a name of parameter from StanfitExtended object (or stanfit object.)

Description

Extract a name of parameter from StanfitExtended object (or stanfit object.)

Usage

name_of_param_whose_Rhat_is_maximal(StanS4class)

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

Value

An object of class "character" indicating a parameter whose chain has the maximal R hat over all chains of MCMC parameters.

Examples

Run this code
# NOT RUN {
#========================================================================================
#                   Draw   a trace plot for a paramter whose R hat is largest
#========================================================================================


#  Fit a model to data
#______________________



      f <- fit_Bayesian_FROC(
                         ite  = 111,
                          cha = 1,
                     dataList = d)


# Extract a name of parameter whose R hat is maximal over all parameters
#____________________________________________________________________



  name <- name_of_param_whose_Rhat_is_maximal(f)



# Change the S4 class of fitted model object to apply the rstan package
#____________________________________________________________________



   # f <- methods::as(f,"stanfit")
   # for unknown error in R CMD check, the author put # before the code

# Show trace plot of a parameter whose R hat is the worst
#____________________________________________________________________



   # rstan::stan_trace(f,pars=name)
   # for unknown error in R CMD check, the author put # before the code

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab