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

Description Usage Arguments Value Examples

View source: R/argMax.R

Description

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

Usage

1

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

 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
44
## 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


## End(Not run)

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