| gofchisq | R Documentation |
This function is for the goodness of fit test of one categorical variable
gofchisq(x, p, conf.level = 0.95)
x |
an observed frequency vector |
p |
probability of each group |
conf.level |
confidence level for testing hypothesis, default is |
output for the goodness of fit test
Chernoff, H. and Lehmann, E.L. (1954) The Use of Maximum Likelihood Estimates in Chi-Square Tests for Goodness of Fit. Annals of Mathematical Statistics, 25, 579-586. <doi.org/10.1214/aoms/1177728726>.
x=c(12,9,10,7,12)
prob=c(1/5,1/5,1/5,1/5,1/5) #1:1:1:1:1
gofchisq(x=x,p=prob)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.