stat_test_subgroups {YAPSA} | R Documentation

## Test for differences in average signature exposures between subgroups

### Description

Apply Kruskal-Wallis tests to detect differences in the signature exposures between different subgroups. Uses `split_exposures_by_subgroups`. Algorithm analogous to `stat_test_SMC`.

### Usage

    stat_test_subgroups(
      in_exposures_df,
      in_subgroups_df,
      in_subgroups.field = "subgroup",
      in_PID.field = "PID"
    )

### Arguments

`in_exposures_df` | Numerical data frame of the exposures (i.e. contributions of the different signatures to the number of point mutations per PID)
`in_subgroups_df` | Data frame indicating which PID belongs to which subgroup
`in_subgroups.field` | Name indicating which column in `in_subgroups_df` contains the subgroup information
`in_PID.field` | Name indicating which column in `in_subgroups_df` contains the PID information

### Value

A list with entries `kruskal_df`, `kruskal_posthoc_list`,

- `kruskal_df`: A data frame containing results (statistic and p values) of the Kruskal Wallis tests (tests for enrichment or depletion in the different strata for every signature independently).

- `kruskal_posthoc_list`: A list of results of pairwise posthoc tests carried out for those signatures where the Kruskal Wallis test yielded a significant p-value (carried out by `posthoc.kruskal.nemenyi.test`).

### See Also

`split_exposures_by_subgroups`

`stat_test_SMC`

`posthoc.kruskal.nemenyi.test`

`kruskal.test`

### Examples

     NULL

[Package YAPSA version 1.18.0 Index]