ndvtest | R Documentation |
The Shi test correct the bias of the Vuong test
ndvtest( x, y, size = 0.05, pval = TRUE, nested = FALSE, vartest = FALSE, ndraws = 10000, diffnorm = 0.1, seed = 1, numbers = NULL, nd = TRUE, print.level = 0 ) ## S3 method for class 'maxLik2' llcont(x, ...) ## S3 method for class 'maxLik2' bread(x, ...) ## S3 method for class 'maxLik2' estfun(x, ...) ## S3 method for class 'maxLik2' logLik(object, ...)
x |
a first fitted model, |
y |
a second fitted model, |
size |
the size of the test, |
pval |
should the p-value be computed ? |
nested |
a boolean, |
vartest |
a boolean, if |
ndraws |
the number of draws for the simulations, |
diffnorm |
a creuser, |
seed |
the seed, |
numbers |
a user provided matrix of random numbers |
nd |
a boolean, if |
print.level |
the level of details to be printed, |
... |
further arguments, |
object |
an object of class |
an object of class "htest"
VUON:89ndvtest
\insertRefSHI:15ndvtest
the classical Vuong test is implemented in pscl::vuong
and nonnest2::vuongtest
.
# A poisson model example from the nonnest2 man page data("housing", package = "MASS") house1 <- glm(Freq ~ Infl + Type + Cont, family = poisson, data = housing) house2 <- glm(Freq ~ Infl + Sat, family = poisson, data = housing) nonnest2::vuongtest(house1, house2) ndvtest(house1, house2) data("bioChemists", package = "pscl") bio1 <- glm(art ~ fem + mar + phd + ment, family=poisson, data=bioChemists) bio2 <- pscl::hurdle(art ~ fem + mar + phd + ment, data=bioChemists) bio3 <- pscl::zeroinfl(art ~ fem + mar + phd + ment, data=bioChemists) nonnest2::vuongtest(bio3, bio2) ndvtest(bio3, bio2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.