Spatial and Spatio-temporal correlation or covariance of (non) Gaussian random fields (copula models)
Spatial and Spatio-temporal correlation or covariance of (non) Gaussian random fields (copula models)
The function computes the correlations of a spatial or spatio-temporal or a bivariate spatial Gaussian or non Gaussian copula randomm field with a given covariance model and a set of spatial (temporal) distances.
UTF-8
corrmodel: String; the name of a correlation model, for the description see the Section Details .
model: String; the type of RF. See GeoFit.
copula: String; the type of copula. The two options are Gaussian and Clayton.
distance: String; the name of the spatial distance. The default is Eucl, the euclidean distance. See GeoFit.
param: A list of parameter values required for the covariance model.
radius: Numeric; a value indicating the radius of the sphere when using covariance models valid using the great circle distance. Default value is the radius of the earth in Km (i.e. 6371)
n: Numeric; the number of trials in a (negative) binomial random fields. Default is 1.
covariance: Logic; if TRUE then the covariance is returned. Default is FALSE
variogram: Logic; if FALSE then the covariance/coorelation is returned. Otherwise the associated semivariogram is returned
Returns
Returns a vector of correlations or covariances values associated to a given parametric spatial and temporal correlation models.
library(GeoModels)###################################################################### Example 1. Correlation of a (mean reparametrized) beta random field with underlying ### Matern correlation model using Gaussian and Clayton copulas################################################################### Define the spatial distancesx = seq(0,0.4,0.01)# Correlation Parameters for Matern model CorrParam("Matern")NuisParam("Beta2")# corr Gaussian copulaparam=list(smooth=0.5,sill=1,scale=0.2/3,nugget=0,mean=0,min=0,max=1,shape=0.5)corr1= GeoCorrFct_Cop(x=x, corrmodel="Matern", param=param,copula="Gaussian",model="Beta2")plot(corr1,ylab="corr",main="Gauss copula correlation",lwd=2)# corr Clayton copulaparam=list(smooth=0.5,sill=1,scale=0.2/3,nugget=0,mean=0,min=0,max=1,shape=0.5,nu=2)corr2= GeoCorrFct_Cop(x=x, corrmodel="Matern", param=param,copula="Clayton",model="Beta2")lines(x,corr2$corr,ylim=c(0,1),lty=2)plot(corr1,ylab="corr",main="Clayton copula correlation",lwd=2)