Vuongtest {spatcounts}R Documentation

Vuong's test for non-nested model comparison

Description

'Vuongtest' suggests the better of two (not necessarily nested) models according to Vuong's statistic for the parameters in each of the iterations.

Usage

Vuongtest(LogLike1, LogLike2, alpha = 0.05, p = NULL, q = NULL, 
correction = TRUE)

Arguments

LogLike1, LogLike2 the output of two model fits obtained by using 'LogLike'.
alpha significance level, defaults to 0.05.
p, q the number of estimated coefficients in models LogLike1 and Loglike2, respectively.
correction boolean, if TRUE (default), the Schwarz correction will be used on the differences of log-likelihoods.

References

Vuong, Q.H. (1989). Likelihood Ratio tests for model selection and nonnested hypotheses. Econometrica 57(2), 307-333.

Schwarz, G. (1978). Estimating the Dimension of a Model. Annals of Statistics 6, 461-464.

See Also

Clarketest

Examples

data(sim.Yin)
data(sim.fm.X)
data(sim.region)
data(sim.gmat)
data(sim.nmat)

poi <- est.sc(sim.Yin, ~1+sim.fm.X[,1]+sim.fm.X[,2], sim.region, 
model="Poi", sim.gmat, sim.nmat, 3)
nb <- est.sc(sim.Yin, ~1+sim.fm.X[,1]+sim.fm.X[,2], sim.region, 
model="NB", sim.gmat, sim.nmat, 3)

DIC.poi <- DIC(sim.Yin, ~1+sim.fm.X[,1]+sim.fm.X[,2], sim.region, poi)
DIC.nb <- DIC(sim.Yin, ~1+sim.fm.X[,1]+sim.fm.X[,2], sim.region, nb)

ll.poi <- LogLike(sim.Yin, ~1+sim.fm.X[,1]+sim.fm.X[,2], sim.region, poi)
ll.nb <- LogLike(sim.Yin, ~1+sim.fm.X[,1]+sim.fm.X[,2], sim.region, nb)

Vuong.poi.nb <- Vuongtest(ll.poi, ll.nb, alpha = 0.05, p = DIC.poi$p.D, 
q = DIC.nb$p.D, correction = TRUE)

[Package spatcounts version 1.1 Index]