R/methods.R
sccomp_proportional_fold_change.Rd
This function calculates the proportional fold change for single-cell composition data from sccomp analysis, comparing two conditions.
sccomp_proportional_fold_change(.data, formula_composition, from, to)
A tibble with cell groups and their respective proportional fold change.
Note! This statistic is just descriptive and should not be used to define significance. Use sccomp_test() for that. This statistics is just meant to help interpretation. While fold increase in proportion is easier to understand than fold change in logit space, the first is not linear (the same change for rare cell types does not necessarily have the same weight that for abundant cell types), while the latter is linear, and used to infer probabilities.
if (FALSE) { # \dontrun{
# Example usage
result <- sccomp_proportional_fold_change(sccomp_data, formula_composition, "healthy", "cancer")
} # }