Last chance! 50% off unlimited learning
Sale ends in
Goodness of fit tests for count compositional data.
PoissonGOF.test(x,lambda=mean(x),R=999,estimated=missing(lambda))
ccompPoissonGOF.test(x,simulate.p.value=TRUE,R=1999)
ccompMultinomialGOF.test(x,simulate.p.value=TRUE,R=1999)
a dataset integer numbers (PoissonGOF) or count compositions (compPoissonGOF)
the expected value to check against
The number of replicates to compute the distribution of the test statistic
states whether the lambda parameter should be considered as estimated for the computation of the p-value.
should all p-values be infered by simulation.
A classical "htest"
object
The name of the dataset as specified
a name for the test used
an empty string
a dataset of p-value distributions under the Null-Hypothesis got from nonparametric bootstrap
The p.value computed for this test
Up to now the tests can not handle missings.
The compositional goodness of fit testing problem is essentially a
multivariate goodness of fit test. However there is a lack of
standardized multivariate goodness of fit tests in R. Some can be found in
the energy
-package.
In principle there is only one test behind the Goodness of fit tests
provided here, a two sample test with test statistic.
Aitchison, J. (1986) The Statistical Analysis of Compositional Data Monographs on Statistics and Applied Probability. Chapman & Hall Ltd., London (UK). 416p.
# NOT RUN {
x <- runif.acomp(100,4)
y <- runif.acomp(100,4)
erg <- acompGOF.test(x,y)
#continue
erg
unclass(erg)
erg <- acompGOF.test(x,y)
x <- runif.acomp(100,4)
y <- runif.acomp(100,4)
dd <- replicate(1000,acompGOF.test(runif.acomp(100,4),runif.acomp(100,4))$p.value)
hist(dd)
dd <- replicate(1000,acompGOF.test(runif.acomp(20,4),runif.acomp(100,4))$p.value)
hist(dd)
dd <- replicate(1000,acompGOF.test(runif.acomp(10,4),runif.acomp(100,4))$p.value)
hist(dd)
dd <- replicate(1000,acompGOF.test(runif.acomp(10,4),runif.acomp(400,4))$p.value)
hist(dd)
dd <- replicate(1000,acompGOF.test(runif.acomp(400,4),runif.acomp(10,4),bandwidth=4)$p.value)
hist(dd)
dd <- replicate(1000,acompGOF.test(runif.acomp(20,4),runif.acomp(100,4)+acomp(c(1,2,3,1)))$p.value)
hist(dd)
x <- runif.acomp(100,4)
acompUniformityGOF.test(x)
dd <- replicate(1000,acompUniformityGOF.test(runif.acomp(10,4))$p.value)
hist(dd)
# }
Run the code above in your browser using DataLab