
To pass the return value to the calculator of the posterior predictive p value.
chi_square_at_replicated_data_and_MCMC_samples_MRMC(
StanS4class,
summary = TRUE,
seed = NA,
serial.number = NA
)
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
Logical: TRUE
of FALSE
. Whether to print the verbose summary. If TRUE
then verbose summary is printed in the R console. If FALSE
, the output is minimal. I regret, this variable name should be verbose.
This is used only in programming phase. If seed is passed, then, in procedure indicator the seed is printed. This parameter is only for package development.
A positive integer or Character. This is for programming perspective. The author use this to print the serial numbre of validation. This will be used in the validation function.
A list.
From any given posterior MCMC samples
The return value also retains these
Revised 2019 Dec. 2
For a given dataset
Then, we draw poterior samples.
We let
Now, we synthesize
data-samples
Altogether,
using these pair of samples
This is contained as a vector in the return value,
so the return value is a vector whose length is the number of MCMC iterations except the burn-in period.
Note that
in MRMC cases,
Application of this return value to calculate the so-called Posterior Predictive P value.
As will be demonstrated in the other function, chaning seed, we can obtain
where
whih are used when we calculate the so-called Posterior Predictive P value to test the null hypothesis that our model is fitted a data well.
Revised 2019 Sept. 8
Revised 2019 Dec. 2
Revised 2020 March
Revised 2020 Jul
# NOT RUN {
# }
# NOT RUN {
fit <- fit_Bayesian_FROC( ite = 1111, dataList = ddd )
a <- chi_square_at_replicated_data_and_MCMC_samples_MRMC(fit)
b<-a$List_of_dataList
lapply(b, plot_FPF_and_TPF_from_a_dataset)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab