Learn R Programming

intamap (version 1.3-21)

bayesCopula: Performs spatial interpolation using copulas

Description

Calculates predictive mean, predictive variance, predictive quantiles and exceedance probabilities for certain thresholds in the spatial copula model.

Usage

bayesCopula(obj,estimates,search=10,calc=list(mean=TRUE,variance=TRUE),testMean=FALSE)

Arguments

obj
Intamap object including observations and predictionLocations, see intamap-package
estimates
List of estimated parameters (typically obtained by calling copulaEstimation)
search
local prediction: number of observed locations considered for prediction at each unknown point
calc
list of what prediction type is required:
  • mean = TRUE
{TRUE if the predictive mean should be calculated, FALSE otherwise} variance = TRUE{TRUE if the pr

Value

  • List with the following elements:
  • meanMean of the predictive distribution. NULL if not calculated.
  • varianceVariance of the predtictive distribution. NULL if not calculated.
  • quantilesQuantiles of the predictive distribution NULL if not calculated.
  • excprobProbabilities for the predictive distribution to exceed predefined thresholds. NULL if not calculated.

item

testMean

Details

bayesCopula is used for plug-in prediction at unobserved spatial locations. The name of the function is somewhat misleading since no Bayesian approach is implemented so far. It is possible to calculate numerically the predictive mean and variance for both the Gaussian and the chi-square spatial copula model. Exceedance probabilities and predictive quantiles are only supported for the Gaussian copula model. Note that it may occur that the predictive distribution has no finite moments. In this case, a possible predictor is the median of the predictive distribution. If testMean=TRUE and the predictive means have no reasonable values, the median is automatically calculated and a warning is produced. The copula prediction method is computationally demanding. There is a possibility of running it as a parallel process by setting the parameter nclus > 1 for the interpolation process. This requires a previous installation of the package doSNOW.

References

Kazianka, H. and Pilz, J. (2009), Spatial Interpolation Using Copula-Based Geostatistical Models. GeoENV2008 - Geostatistics for Environmental Application (P. Atkinson, C. Lloyd, eds.), Springer, New York

See Also

copulaEstimation, spatialPredict, estimateParameters

Examples

Run this code
data(intamapExampleObject)
## estimate parameters for the copula model
copula<-list(method="norm")
anisotropy<-list(lower=c(0,1),upper=c(pi,Inf),params=c(pi/3,2))
correlation<-list(model="Ste",lower=c(0.01,0.01,0.01),upper=c(0.99,Inf,20),params=c(0.05,4,3))
margin<-list(name="gev",lower=c(0.01,-Inf),upper=c(Inf,Inf),params=c(30,0.5))
trend<-list(F=as.matrix(rep(1,196)),lower=-Inf,upper=Inf,params=40)
estimates<-copulaEstimation(intamapExampleObject,margin,trend,correlation,anisotropy,copula)
## make predictions at unobserved locations
predictions<-bayesCopula(intamapExampleObject,estimates,search=25,calc=list(mean=TRUE,variance=TRUE,excprob=40,quantile=0.95))

Run the code above in your browser using DataLab