Simulate paths from a NSGEV model conditional on the covariates.

# S3 method for NSGEV
simulate(object, nsim = 1, seed = NULL, data = NULL, psi = NULL, ...)

Arguments

object

A NSGEV model.

nsim

Number of simulations (paths).

seed

Not used yet.

data

The data frame of covariates. By default, the model data frame is used.

psi

Vector of model parameters. By default, the model parameters are used.

...

Not used yet.

Value

A matrix with nrow(data) rows and nsim

columns, each column representing a time.

See also

rGEV to simulate from varying GEV parameters.

Author

Yves Deville

Examples

df <- data.frame(t = 1:10)
## model structure
ns <- NSGEV(formulas = list("loc" = ~ alpha + beta * t,
                            "scale" = ~ delta,
                            "shape" = ~ xi),
             data = df)
df.new <- data.frame(t = 11:20)
psi <- c("alpha" = 1, "beta" = 0.1, "delta" = 0.6, "xi" = 0.06)
ysim <- simulate(ns, nsim = 20, psi = psi)
ysim.new <- simulate(ns, nsim = 20, data = df.new, psi = psi)
matplot(df$t, ysim, type = "l", xlab = "t",
        col = "orange", xlim = c(1, 20))
matlines(df.new$t, ysim.new, type = "l", col = "firebrick")