test {fbglm}R Documentation

Vuong closeness test for zero-inflated models

Description

Compare zero-inflated regression models via Vuong closeness test.

Usage

test(y, x, model1, model2)

Arguments

y

A response vector.

x

A data frame with covariates.

model1

A character; one of "ZINB", "ZIP", "ZINB2", and "fbglm".

model2

A character; one of "ZINB", "ZIP", "ZINB2", and "fbglm".

Details

Perform one-tailed Vuong closeness test with the null hypothesis that the two models are equally close to the true data generating process, against the alternative that one model 1 is closer than model 2. Choose model1 and model2 from zero-inflated negative binomial regression ("ZINB"), extended zero-inflated negative binomial regression ("ZINB2"), zero-inflated Poisson regression ("ZIP"), and fractional binomial regression ("fbglm"). For "ZINB2" and "fbglm", see "fbglm::ZINB2" and "fbglm::fbglm" for details. In "ZIP" and "ZINB", all the covariates are used as regressors in both the count and zero-inflation component.

Value

One-sided p-value will be returned.

References

Vuong, Quang H. (1989). Likelihood Ratio Tests for Model Selection and non-nested Hypotheses. Econometrica. 57 (2): 307–333.

Examples

library(agridat)
library(bbmle)
sample<-sample(270, 30)
my_y<-ridout.appleshoots$roots[sample]
my_x<-data.frame(pho=ridout.appleshoots$pho[sample])
test( y=my_y, x=my_x , "fbglm", "ZINB2" )


[Package fbglm version 1.5.0 Index]