p_value_on_sampled {emcAdr} | R Documentation |
Calculate p-value of sampled value
Description
Calculate p-value of sampled value
Usage
p_value_on_sampled(
empirical_distribution,
sampled_values,
isFiltered = FALSE,
includeZeroValue = FALSE
)
Arguments
empirical_distribution |
A numeric vector of values representing the empirical distribution (return value of DistributionAproximation function) |
sampled_values |
A scalar or a vector of real valued number representing the sampled value (score to be tested) |
isFiltered |
A boolean representing if we want to use the filtered distribution or the distribution as is (False by default) |
includeZeroValue |
A boolean that indicate if you want to take into account the null score (False by default) |
Value
A numeric value representing the empirical p-value
Examples
data("ATC_Tree_UpperBound_2024")
data("FAERS_myopathy")
cocktails = list(c(561, 904),
c(1902, 4585))
estimated_score_distribution = DistributionApproximation(epochs = 10,
ATCtree = ATC_Tree_UpperBound_2024,
observations = FAERS_myopathy)
Hypergeom_of_cocktails = compute_hypergeom_on_list(cocktails = cocktails,
ATCtree = ATC_Tree_UpperBound_2024,
observations = FAERS_myopathy)
p_value = p_value_on_sampled(empirical_distribution = estimated_score_distribution,
sampled_values = Hypergeom_of_cocktails)
[Package emcAdr version 1.2 Index]