Pomic-package {Pomic} | R Documentation |
This package propose calculations of an information criterion to check the quality of simulations results of ABM/IBM or other non-linear rule-based models. The POMDEV measure is based on the KL divergence and likelihood theory. It basically indicates the deviance of simulation results from field observations. Once POMDEV scores and metropolis-hasting sampling on different model versions are effectuated, POMIC scores can be calculated. This method is still under development and further work are needed for the incorporation of multiple patterns assessment.
Package: | Pomic |
Type: | Package |
Version: | 1.0.1 |
Date: | 2009-07-09 |
License: | GPL-2 |
The pomdev function is for distribution patterns. It is computed as in Piou et al. (2009) It corresponds to twice the sum of the log of an approximated likelihood given by the approximating function of density from the simulation results applied on the field data.
The pomdev.extra function is to obtain POMDEV scores as well as other goodness of fit indicators.
The pomdev.corrected function is to obtain raw approximation of KL divergence.
The pomdev.ts function is for time series patterns. It is still under evaluation.
Type demo(demoPomic)
for a demonstration of POMIC calculation as in appendix B of Piou et al. (2009).
And type demo{verification}
for the verification of the first demonstration (as in appendix C of Piou et al. (2009)).
Cyril Piou
cyril.piou@yahoo.fr
Piou 2007, Patterns and individual-based modeling of spatial competition within two main components of Neotropical mangrove ecosystems. PhD thesis, University of Bremen. http://elib.suub.uni-bremen.de/diss/docs/00010671.pdf
Piou, C., U. Berger, and V. Grimm. 2009. Proposing an information criterion for individual-based models developed in a pattern-oriented modelling framework. Ecological Modelling 220:1957-1967. http://dx.doi.org/10.1016/j.ecolmodel.2009.05.003
pomdev
pomdev.ts
pomdev.extra
pomdev.corrected
#example of field pattern distribution: fieldpattern<-rnorm(100,10,5) #model results: model1runs<- rnorm(100*5,10.5,6) model2runs<- rnorm(100*5,9.5,2) #POMDEV measurements: pomdev.extra(fieldpattern,model1runs,eps=10^-20,plotting=TRUE) pomdev.extra(fieldpattern,model2runs,eps=10^-20,plotting=TRUE) pomdev(fieldpattern,model2runs,eps=10^-20) pomdev.corrected(fieldpattern,model1runs,eps=10^-20) pomdev.corrected(fieldpattern,model2runs,eps=10^-20) #other examples of POMDEV measures: pomdev(x<-rnorm(100),y<-rnorm(100,0.1)) #POMDEV value for a model creating a normal distribution with identical variance as the field data but a mean 0.1 away from the field data par(mfrow=c(2,2)) hist(x,freq=FALSE) #plot the field data as histogram lines(density(y))#check the simulation results distribution as line pomdev(x<-rnorm(100),y<-rnorm(100,0.2)) #idem 0.2 away from the field data hist(x,freq=FALSE); lines(density(y)) #plot pomdev(x<-rnorm(100),y<-rnorm(100,1)) #idem 1 away from the field data hist(x,freq=FALSE); lines(density(y)) #plot pomdev(x<-rnorm(100),y<-rnorm(100,3)) #idem 3 away from the field data hist(x,freq=FALSE); lines(density(y)) #plot ## Not run: demo(demoPomic) ## Not run: demo(verification)