rmfcm: Random generation from the exponential Factor Copula Model...

View source: R/rmfcm.R

rmfcmR Documentation

Random generation from the exponential Factor Copula Model (eFCM)

Description

Draws n samples from the eFCM.

Usage

rmfcm(
  lambda,
  delta,
  dist = NULL,
  coord = NULL,
  nu = 0.5,
  n = 5e+05,
  miles = FALSE,
  seed = NULL
)

Arguments

lambda, delta

Positive scalars: rate \lambda and range \delta.

dist

Optional d\times d distance matrix. If NULL, provide coord.

coord

Optional two-column matrix/data.frame of station coordinates (lon, lat). Used to build dist via fields::rdist.earth().

nu

Matérn smoothness parameter (default 0.5).

n

Number of simulated rows (default 5e5).

miles

Logical passed to fields::rdist.earth (default FALSE).

seed

Optional integer seed for reproducibility.

Value

A numeric matrix of size n x d (rows = samples, cols = stations).

Examples


data(LonLat)
sim <- rmfcm(lambda = 2, delta = 100, coord = LonLat[1:2, ], n = 10000)
dim(sim)  # 10000 x 2


eFCM documentation built on Sept. 9, 2025, 5:52 p.m.