remotes::install_github("gkikuchi/rlingam")
library(rlingam)
X <- gen_dummy_data(random_state = 10)
# icalingam
mdl <- ICALiNGAM$new()
mdl$fit(X)
# directlingam
mdl <- DirectLiNGAM$new()
mdl$fit(X)
print(mdl$causal_order)
print(mdl$adjacency_matrix)
plot_adjacency_mat(mdl$adjacency_matrix, node_labels = names(X))
Parameters for *LiNGAM$new(): - random_state (integer) - random seed - lasso_engine ("glmnet" or "lars") - library to use to estimate adjacency matrix. default="glmnet" - max_iter (integer) only for ICALiNGAM - maximum iterations for fastICA. default=1000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.