Description Usage Arguments Value
View source: R/sim_create_groups_seperate_overlap_v2.R
A function to create a list of random variables clustered based
on a predefined cluster size. Currently, cluster sizes are based on
pathway size curated from KEGG database load(pathway_dr_ds_key_value)
,
and stored as vector of integers (outlier excluded
cluster_size <- cluster_size[-1]
). In case of overlap, a variable
can be present in more than one group.
1 2 3 4 5 6 7 | create_groups(
npred = 1000,
nassoc = 10,
nassoc_percent = 10,
overlap = FALSE,
overlap_size = 10
)
|
npred |
p, number of prediction variables. |
nassoc |
p_t, number of variables with true effect size = 0. |
nassoc_percent |
an integer from 0 to 100, indicating percentage of variables in a cluster with true effect size > 0. |
overlap |
boolean, default: FALSE. It determines if the clusters should be overlapping. |
overlap_size |
an integer, default: 10. It determines the percentage of variables to overlap across clusters. |
A list of
csd
: Cluster size data, as a data.table containing cluster,
cluster size, group weights as in the sqrt(cluster size)
, and
number of variables with true effect size.
groups
: A named list of integers of length length equal to the
number npred
containing the cluster and named with the variable name.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.