Joe.Markov.GOF.binom: A goodness-of-fit test for the marginal binomial distribution.
Description
Perform a parametric bootstrap test based on the Cramer-von Mises and Kolmogorov-Smirnov statistics
as proposed by Huang and Emura (2019) and Huang et al. (2019-).
Usage
Joe.Markov.GOF.binom(Y, k = 3, size, B = 200,GOF.plot=FALSE)
Arguments
Y
vector of datasets
k
constant determining the length between LCL and UCL (k=3 corresponds to 3-sigma limit)
size
number of binomial trials
B
the number of Bootstrap replications
GOF.plot
if TRUE, show the model diagnostic plots for B bootstrap replications
Value
CM
The Cramer-von Mises statistic and its P-value
KS
The Kolmogorov-Smirnov statistic and its P-value
CM.boot
Bootstrap values of the Cramer-von Mises statistics
KS.boot
Bootstrap values of the Kolmogorov-Smirnov statistics
References
Huang XW, Emura T (2021), Model diagnostic procedures for copula-based Markov chain models
for statistical process control, Communications in Statistics - Simulation and Computation,
doi: 50(8):2345-67
Huang XW, Emura T (2021-), Computational methods for a copula-based Markov chain model with
a binomial time series, in review
# NOT RUN {size=50prob=0.5alpha=2set.seed(1)
Y=Joe.Markov.DATA.binom(n=500,size,prob,alpha)
Joe.Markov.GOF.binom(Y,size=size,B=5,k=3,GOF.plot=TRUE) ## B=5 to save time# }