# NOT RUN {
# }
# NOT RUN {
#=================================The first example: MRMC case ========================
#========================================================================================
# MRMC case: Extract a estimates from fitted model objects
#========================================================================================
# Make a fitted model object of class stanfitExtended
# which is inherited from the S4class stanfit.
# The following example, fitted model is the hierarchical Bayesian FROC model
# which is used to compare modality.
fit <- fit_Bayesian_FROC( ite = 1111 ,
summary = FALSE ,
dataList = dataList.Chakra.Web.orderd,
cha=1
)
# Extract one dimensional array "z = z[]",
z <- extract_EAP_by_array(
fit, # The above fitted model object
z # One of the parameter in "fit"
)
# Extract two dimensional array "AA = AA[ , ]",
AA <- extract_EAP_by_array(
fit,
AA
)
# Extract three dimensional array "ppp = ppp[ , , ]",
ppp <- extract_EAP_by_array(fit,ppp)
#================= The second example: singler reader and single modality ==============
#========================================================================================
# srsc case: Extract a estimates from fitted model objects
#========================================================================================
# Of course, for the case of srsc, it is also available.
# We shall show the case of srsc in which case the parameters are not array,
# but in such a case we can extract estimates preserving its format such as vector.
fit <- fit_Bayesian_FROC( ite = 1111 ,
summary = FALSE ,
dataList = dataList.Chakra.1,
cha=2
)
# To extract the posterior mean for parameter "A" representing AUC, we run the following;
A <- extract_EAP_by_array(
fit,
A
)
# To extract the posterior mean for parameter "z" indicating decision thresholds;
z <- extract_EAP_by_array(
fit,
z
)
# 2019.05.21 Revised.
#========================================================================================
# name.of.parameter surrounded by double quote is also available
#========================================================================================
# Let fit be the above fitted model object.
# Then the following two codes are same.
extract_EAP_by_array( fit, "A" )
extract_EAP_by_array( fit, A )
# Unfortunately, the later case sometimes cause the R CMD check error which said
# that no visible binding, since object A is not defined.
# For example, if we use the later in the functiton: metadata_to_DrawCurve_MRMC
# Then R command said some NOTE that
# > checking R code for possible problems ... NOTE
# metadata_to_DrawCurve_MRMC: no visible binding for global variable 'A'
# Undefined global functions or variables: A
# Revised 2019 Oct 19
# I am not sure, does this package development make me happy?
# Back pain being due to an abnormality in my immune system, which is caused
# my exposure to surfactants or latex (not LaTeX).
# }
# NOT RUN {
# Revised 2019 Jun 19
# }
Run the code above in your browser using DataLab