Clarketest {spatcounts} | R Documentation |
'Clarketest' suggests the better of two (not necessarily nested) models according to Clarke's statistic for the parameters in each of the iterations.
Clarketest(LogLike1, LogLike2, alpha = 0.05, p = NULL, q = NULL, correction = TRUE)
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. |
Clarke, Kevin A. (2003). Nonparametric Model Discrimination in International Relations. Journal of Conflict Resolution 47(1), 72-93.
Schwarz, G. (1978). Estimating the Dimension of a Model. Annals of Statistics 6, 461-464.
Vuongtest
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, 200) nb <- est.sc(sim.Yin, ~1+sim.fm.X[,1]+sim.fm.X[,2], sim.region, model="NB", sim.gmat, sim.nmat, 200) 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) Clarke.poi.nb <- Clarketest(ll.poi, ll.nb, alpha = 0.05, p = DIC.poi$p.D, q = DIC.nb$p.D, correction = TRUE)