View source: R/simulation_functions.R
fast_Gp_sim | R Documentation |
Calculates an approximation to the inverse Cholesky factor of the covariance matrix using Vecchia's approximation, then the simulation is produced by solving a linear system with a vector of uncorrelated standard normals
fast_Gp_sim(covparms, covfun_name = "matern_isotropic", locs, m = 30)
covparms |
A vector of covariance parameters appropriate for the specified covariance function |
covfun_name |
See |
locs |
matrix of locations. Row |
m |
Number of nearest neighbors to use in approximation |
vector of simulated values
locs <- as.matrix( expand.grid( (1:50)/50, (1:50)/50 ) )
y <- fast_Gp_sim(c(4,0.2,0.5,0), "matern_isotropic", locs, 30 )
fields::image.plot( matrix(y,50,50) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.