# NOT RUN {
# Initial parameter values
phi <- 5; rho <- 0.45
tau2 <- 0.80; sigma2 <- 2
# Simulating data
n1 <- 10 # Number of spatial locations
n2 <- 5 # Number of temporal index
set.seed(1000)
x.co <- round(runif(n1,0,10),5) # X coordinate
y.co <- round(runif(n1,0,10),5) # Y coordinate
coord <- cbind(x.co,y.co) # Cartesian coordinates without repetitions
time <- as.matrix(seq(1,n2)) # Time index without repetitions
# Covariance matrix
Ms <- as.matrix(dist(coord)) # Spatial distances
Mt <- as.matrix(dist(time)) # Temporal distances
Cov <- CovarianceM(phi,rho,tau2,sigma2,distSpa=Ms,disTemp=Mt,kappa=0,type.S="exponential")
# }
Run the code above in your browser using DataLab