Clayton.Markov.GOF.binom {Copula.Markov}R Documentation

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

Clayton.Markov.GOF.binom(Y, k = 3, size, B = 200,GOF.plot=FALSE, method = "Newton")

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

method

Newton-Raphson method or nlm can be chosen

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

Author(s)

Huang XW, Emura T

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

Examples

size=50
prob=0.5
alpha=2
set.seed(1)
Y=Clayton.Markov.DATA.binom(n=500,size,prob,alpha)
Clayton.Markov.GOF.binom(Y,size=size,B=5,k=3,GOF.plot=TRUE) ## B=5 to save time

[Package Copula.Markov version 2.9 Index]