Learn R Programming

GulFM (version 0.5.0)

gul_simulation: Single-replication GUL simulation

Description

Generates one synthetic data set, estimates loadings with the GUL, and evaluates estimation accuracy.

Usage

gul_simulation(n, p, m, g_fun)

Value

Named numeric vector with components error_F : Frobenius norm ||hat(Ag) - Ag||_F

Arguments

n

Integer: sample size.

p

Integer: number of observed variables.

m

Integer: number of latent factors (both layers).

g_fun

Function: element-wise, smooth transformation applied to the latent factors (e.g. `tanh`, `sin`).

Examples

Run this code
gul_simulation(200, 50, 5, g_fun = tanh)

Run the code above in your browser using DataLab