set.seed(14342)
# Simulation of 20 locations
Ns <- 20
sites <- matrix(runif(Ns*2)*10-5,nrow=Ns,ncol=2)
for(i in 1:2) sites[,i] <- sites[,i] - mean(sites[,i])
# Simulation of 50 replicates from the Extremal-t model
Ny <- 50
z <- rExtDepSpat(Ny, sites, model="ET", cov.mod="powexp", DoF=1,
range=3, nugget=0, smooth=1.5,
control=list(method="exact"))
# Fit the extremal-t using the full Stephenson-Tawn likelihood
args1 <- list(Nmax=50L, Nmin=5L, eps=0.001, logeps=FALSE)
args2 <- list(Nmax=500L, Nmin=50L, eps=0.001, logeps=TRUE)
if (FALSE) {
fit1 <- fExtDepSpat(model="ET", z=z$vals, sites=sites, hit=z$hits,
par0=c(3,1,1), parallel=TRUE, ncores=6,
args1=args1, args2=args2, control = list(trace=0))
fit1$est
}
Run the code above in your browser using DataLab