Format a p-value as a significance symbol

Description

Annotate a significance-test result with the conventional symbol for its p-value range.

Usage

pval2stars(p.value)

Arguments

p.value

p-value

Details

Use a symbol for compact plot labels while retaining the numeric p-value for interpretation. The cut points are 0.001, 0.01, 0.05 and 0.1, with symbols ***, **, *, + and an open circle in order of increasing p. An equality belongs to the interval ending at that cut point. For legacy strings beginning with a less-than sign and space, the function classifies the printed bound. It does not calculate a test or adjust for multiple comparisons.

Value

A character vector of significance symbols: ***, **, *, + or an open circle, using cut points 0.001, 0.01, 0.05 and 0.1.

Validation

All tested symbol thresholds, their equality cases and the legacy printed bound agreed with their stated probability ranges. See S03 validation in the technical manual.

Scientific checks

See Also

print.skyscapeR.sigTest, plot.skyscapeR.sigTest

Examples

pval2stars(c(0.0005, 0.008, 0.03, 0.08, 0.2))