Description Usage Arguments Details Value Author(s) Examples
gp
Simulate a spatial Gaussian process given a certain covariance function.
1 |
s1 |
First coordinate |
s2 |
Second coordinate |
cov.model |
A character or function indicating the covariance function that Should be used to compute the variance-covariance matrix |
cov.params |
A list of the parameters required by the |
details.
A vector of the realization of the Gaussian Process
Erick A. Chacon-Montalvan
1 2 3 4 5 6 7 8 9 10 | # Generate coordinates
N <- 1000
s1 <- 2 * runif(N)
s2 <- 2 * runif(N)
# Simulate and plot the realization of a Gaussian process
y <- gp(s1, s2, "exp_cov", list(phi = 0.05, sigma2 = 1))
plot(s1, s2, cex = y)
# Plot with ggplot
# ggplot(data.frame(s1, s2, y), aes(s1, s2, col = y)) +
# geom_point(size = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.