Learn R Programming

GulFM (version 0.5.0)

verify_mean: Verify zero-mean preservation (Theorem 10 assumption 2a)

Description

Draws n i.i.d. N(0, I_m) latent factors, applies g component-wise, and checks whether |E[g(x)]| < tol on every coordinate.

Usage

verify_mean(g_fun, m = 5, n = 10000, tol = 0.001)

Value

logical TRUE if |mean| < tol on all coords

Arguments

g_fun

vectorised map g: R -> R

m

latent dimension

n

Monte-Carlo sample size

tol

numerical tolerance (default 1e-3)

Examples

Run this code
  tmp <- g_fun("weak_nonlinear")
  verify_mean(tmp$g_fun, m = 5)

Run the code above in your browser using DataLab