calculate_full_set_pvalue: Calculate Proportion-Based P-Value for Entire Feature Set

View source: R/calculatePvalues.R

calculate_full_set_pvalueR Documentation

Calculate Proportion-Based P-Value for Entire Feature Set

Description

This function calculates the proportion-based p-value for the entire feature set by comparing the observed sum of absolute deviations from the mean feature importance to those from permuted data. It is particularly useful in permutation tests to assess the statistical significance of the observed data.

Usage

calculate_full_set_pvalue(permutedvalues, quantiledata)

Arguments

permutedvalues

A data frame containing the permuted feature importances. It should include columns for feature importance and permutation number. Typically, this data frame is generated by a function that performs permutation tests.

quantiledata

A data frame containing quantile information of feature importances. This data frame should include columns for feature rank, mean permuted importance, observed true importance, and optionally their logarithmic transformations. This is usually output from calculateQuantiles function.

Value

A data frame with a single column "p_val_set". This column contains the calculated p-value, which quantifies the probability of observing a sum of absolute deviations as extreme as the one observed, under the null hypothesis. If the p-value is extremely low (below the resolution of the number of permutations), it is reported as less than the reciprocal of the number of permutations.

Examples

pvalue_set <- calculate_full_set_pvalue(feat_importances$permuted_importances, quantile_data)

tkolisnik/Rf2pval documentation built on Feb. 20, 2024, 5:39 a.m.