Learn R Programming

GulFM (version 0.5.0)

g_fun: Smooth link functions compliant with Theorems 9&10

Description

Returns a vectorised map \(g(\cdot)\) and its exact Lipschitz constant \(L_g\) for three increasingly nonlinear choices.

Usage

g_fun(type = c("linear", "weak_nonlinear", "strong_nonlinear"))

Value

Named list with components

g_fun

vectorised function \(g(\cdot)\)

L_g

scalar Lipschitz constant of \(g\)

Arguments

type

Character string selecting the map: "linear", "weak_nonlinear", or "strong_nonlinear".

Examples

Run this code
## pick a link with L_g = 1
tmp  <- g_fun("linear")
dat  <- generate_gfm_data(n = 500, p = 200, m = 5, g_fun = tmp$g_fun)
est  <- estimate_gul_loadings(dat$X, m = 5)
err  <- norm(est$hat_Ag - dat$Ag, "F")
sprintf("F-error (L_g = %d) = %.3f", tmp$L_g, err)

Run the code above in your browser using DataLab