Use parametric bootstrapping to test the fit of a complex model relative to a simpler one

Share:

Description

Tests if a complex model fit is significantly better than that of a simple model, treating the simple model as the null hypothesis and using the log-likelihood ratio as a test statistic.

Usage

1
2
bootSimpleComplex(y, simpleFit, complexFit, nboot = 99, minb = 7, 
                  ret.full.distribution = FALSE, parallel = FALSE, ...)

Arguments

y

a paleoTS object

simpleFit

a paleoTSfit object corresponding to a simple model (GRW, URW, Stasis or StrictStasis)

complexFit

a paleoTSfit object corresponding to a complex model (from fitGpunc or fitStasisRW)

nboot

number of boostrap replications

minb

the minimum number of segments to require before and after the mode shift

ret.full.distribution

logical, if TRUE, the vectore of test statistics for all replicates is returned

parallel

logical, if TRUE, the replicates are parallelized using foreach

...

further arguments, passed to the optimization functions

Details

Simulations performed in Hunt et al. (2015) showed that the AICc can unduly favor complex models in this context. The behavior is known in other situations in which a large number of possible shifts are evaluated.

The parallel option uses doParallel and foreach. It detects the number of available cores and uses that number minus one for the parallelization.

Value

Returns a list:

LRobs

the observed log-likelihood ratio statistic

p.value

p-value of the test

nullLR

optional, if ret.full.distribution=TRUE, the vector of LR test statistics for the bootstrap replications

Author(s)

Gene Hunt

References

Hunt, G., M. J. Hopkins, and S. L. Lidgard 2015. Simple versus complex models of trait evolution and stasis as a response to environmental change. PNAS 112:4885–4890.

See Also

fit9models, fitModeShift

Examples

1
2
3
4
5
6
7
8
9
	x<- sim.GRW(ns=40)
	mS<- fitSimple(x, model="URW", method="Joint")
	mC<- fitModeShift(x, order="Stasis-RW", rw.model="URW", method="Joint")
	compareModels(mS, mC)  ## AICc comparisons
	
	
	boot<- bootSimpleComplex(x, mS, mC, nboot=20)
	cat("Bootstrap p-value: ", boot$p.value, "\n")
	

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.