errormap: rfhc: Compute IMSE from predictive simulation

Description Usage Arguments Details References See Also Examples

Description

If the fitRFHC had predict.x>0, we can use the predictions to compute a model diagnostic.

Usage

1
error.mapfun(x, burnin=1, thin=1, mapfun=distmap, ...) 

Arguments

x

Result of fitRFHC.

burnin, thin

How the predictive simulations of the point pattern are sampled. Note that the number of samples is dependent on predict.x.

mapfun

The function that maps a point pattern to a field. Should result in a im-object (we use the im-objects $v-matrix). See e.g. distmap and density.ppp in package spatstat.

...

Additional parameters passed to ‘mapfun’.

Details

Let x0 be the data point pattern and x1,...,xk the predicted patterns.

We compute mapfun(x0) to get v0 field, and compare this to v1,...,vk from the predictions.

Summary indices computed from the fields are:

IMSE=a*sum(MSE_i)

MSE_i=(1/k)sum((v0_j - vj_i)^2)

where a is the area of a grid cell.

In IMSE_std the MSE_i is divided by the sd of vj_i.

The result list contains also the maps used in computation.

We discuss only the $IMSE value in the paper. The rest of the results can be ignored at this point.

The idea is that this function is run for different fits with different beta and range parameters, and the IMSE values compared.

References

Rajala, T. and Penttinen, A. (2012): Bayesian analysis of a Gibbs hard-core point pattern model with varying repulsion range, Comp. Stat. Data An.

See Also

fitRFHC, rfhcFit.

Examples

1
2
3
4
5
 x<-simulateRFHC()
 f<-fitRFHC(x, predict.x=10)
 err <- error.mapfun(f, mapfun=density)
 err$IMSE
 

antiphon/rfhc documentation built on May 10, 2019, 12:20 p.m.