Latent Factor Mixed Models (LFMMs) are factor regression models.
The lfmm2 function estimates latent factors based on an exact least-squares
approach.
Usage
lfmm2_med(input, env, K, lambda = 1e-05, effect.sizes = FALSE)
Arguments
- input
Continuous intermediary variables matrix encompassing potential mediators with n rows and p columns.
- env
An explanatory variable matrix with n rows and d columns.
- K
latent factor number
- lambda
ridge penalization parameter
- effect.sizes
true or false to obtain effect sizes
Value
an object with the following attributes
U
V
Author
Florence Pittion, Magali Richard, Olivier Francois
Examples
data(simu_data)
K = 5
mod.lfmm1 = lfmm2_med(input = simu_data$M1,
env = simu_data$X_binary,
K = K,
effect.sizes = FALSE)