Description Usage Arguments Value Examples
View source: R/analyze_factor.R
Analyze a particular factor in the matrix of factor scores by loading the metadata for grouped observations of positive scores and negative scores defined by the score threshold. Looking into this subset of metadata may provide an idea of the latent variable, and whether it could be confounding the analysis (e.g. all observations being male or female if the cancer is not gender specific).
1 | analyze_factor(clean_metadata, fi_mat, factor_num = 1, score_threshold = 0.75)
|
clean_metadata |
Clean metadata returned by standardize_metadata(). |
fi_mat |
Full matrix of factor scores for the observations. |
factor_num |
The factor number to analyze. Default value is 1 (the first factor). |
score_threshold |
Score cutoff for positive and negative scores. Default value is 0.75. |
A list containing 2 metadata data frames.
positive_group - Observations corresponding to positive scores above the threshold.
negative_group - Observations corresponding to negative scores below the threshold.
1 2 3 4 5 6 7 | # Using tcga_metadata from package.
library(MetaConIdentifier)
ca_info <- run_ca(tcga_meta_clean)
# Find the optimal number of factors to extract.
obs_groupings <- analyze_factor(tcga_meta_clean, ca_info$fi_mat,
factor_num = 1, score_threshold = 0.75)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.