decision_highCMC_identifyHighCMCThetas: Classify theta values in CMC-theta distribution as having...

View source: R/decision.R

decision_highCMC_identifyHighCMCThetasR Documentation

Classify theta values in CMC-theta distribution as having "High" or "Low" CMC candidate counts

Description

Classify theta values in CMC-theta distribution as having "High" or "Low" CMC candidate counts

Usage

decision_highCMC_identifyHighCMCThetas(cmcThetaDistrib, tau = 1)

Arguments

cmcThetaDistrib

output of the decision_highCMC_cmcThetaDistrib function

tau

constant used to define a "high" CMC count. This number is subtracted from the maximum CMC count achieved in the CMC-theta distribution. Theta values with CMC counts above this value are considered to have "high" CMC counts.

Value

A vector of the same length as the input containing "High" or "Low" classification based on whether the associated theta value has a High CMC Candidate count.

Note

This function is a helper internally called in the decision_CMC function. It is exported to be used as a diagnostic tool for the High CMC method

Examples

## Not run: 
data(fadul1.1_processed,fadul1.2_processed)

comparisonDF <- purrr::map_dfr(seq(-30,30,by = 3),
                              ~ comparison_allTogether(fadul1.1_processed,
                                                       fadul1.2_processed,
                                                       theta = .))

highCMCthetas <- comparisonDF %>%
dplyr::mutate(cmcThetaDistribClassif = decision_highCMC_cmcThetaDistrib(cellIndex = cellIndex,
                                                                 x = x,
                                                                 y = y,
                                                                 theta = theta,
                                                                 corr = pairwiseCompCor)) %>%
decision_highCMC_identifyHighCMCThetas(tau = 1)


highCMCthetas %>%
dplyr::filter(cmcThetaDistribClassif == "CMC Candidate") %>%
ggplot2::ggplot(ggplot2::aes(x = theta,fill = thetaCMCIdentif)) +
ggplot2::geom_bar(stat = "count")

## End(Not run)

cmcR documentation built on Dec. 10, 2022, 5:06 p.m.