require(RandomFields)
n.site <- 50
locations <- matrix(runif(2*n.site, 0, 10), ncol = 2)
colnames(locations) <- c("lon", "lat")
##Simulate a max-stable process - with unit Frechet margins
ms0 <- MaxStableRF(locations[,1], locations[,2], grid=FALSE, model="wh",
param=c(0,1,0,1, 2), maxstable="extr",
n = 40)
ms0 <- t(ms0)
##Compute the F-madogram
fmadogram(ms0, locations)Run the code above in your browser using DataLab