Learn R Programming

rSPDE (version 2.5.1)

simulate.spacetimeobj: Simulation of space-time models

Description

Simulation of space-time models

Usage

# S3 method for spacetimeobj
simulate(
  object,
  nsim = 1,
  seed = NULL,
  kappa = NULL,
  sigma = NULL,
  gamma = NULL,
  rho = NULL,
  ...
)

Value

A matrix with the simulations as columns.

Arguments

object

Space-time object created by spacetime.operators()

nsim

The number of simulations.

seed

an object specifying if and how the random number generator should be initialized (‘seeded’).

kappa

kappa parameter if it should be updated

sigma

sigma parameter if it should be updated

gamma

gamma parameter if it should be updated

rho

rho parameter if it should be updated

...

Currently not used.

Examples

Run this code
s <- seq(from = 0, to = 20, length.out = 101)
t <- seq(from = 0, to = 20, length.out = 31)

op_cov <- spacetime.operators(space_loc = s, time_loc = t,
                             kappa = 5, sigma = 10, alpha = 1,
                             beta = 2, rho = 1, gamma = 0.05)
x <- simulate(op_cov, nsim = 1) 
image(matrix(x, nrow = length(s), ncol = length(t)))                              

Run the code above in your browser using DataLab