The function computes all quantities required for carrying out the asymptotic test for goodness rather than lack of fit of an observed to a fully specified multinomial distribution derived in \(\S\) 9.1 of Wellek S (2010) Testing statistical hypotheses of equivalence and noninferiority. Second edition.
gofsimpt(alpha,n,k,eps,x,pio)significance level
sample size
number of categories
margin to the Euclidean distance between the vectors \(\mathbf{\pi}\) and \(\mathbf{\pi}_0\) of true and hypothesized cell probabilities
vector of length \(k\) with the observed cell counts as components
prespecified vector of cell probabilities
significance level
sample size
number of categories
margin to the Euclidean distance between the vectors \(\mathbf{\pi}\) and \(\mathbf{\pi}_0\) of true and hypothesized cell probabilities
observed cell counts
hypothecized cell probabilities
observed value of the squared Euclidean distance
square root of the estimated asymtotic variance of \(\sqrt{n}DSQPIH\_0\)
upper critical bound to \(\sqrt{n}DSQPIH\_0\)
indicator of a positive [=1] vs negative [=0] rejection decision to be taken with the data under analysis
Wellek S: Testing statistical hypotheses of equivalence and noninferiority. Second edition. Boca Raton: Chapman & Hall/CRC Press, 2010, \(\S\) 9.1.
# NOT RUN {
x<- c(17,16,25,9,16,17)
pio <- rep(1,6)/6
gofsimpt(0.05,100,6,0.15,x,pio)
# }
Run the code above in your browser using DataLab