analyze_factor: analyze_factor

Description Usage Arguments Value Examples

View source: R/analyze_factor.R

Description

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).

Usage

1
analyze_factor(clean_metadata, fi_mat, factor_num = 1, score_threshold = 0.75)

Arguments

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.

Value

A list containing 2 metadata data frames.

Examples

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)

ahnjedid/MetaConIdentifier documentation built on Dec. 18, 2021, 11:26 p.m.