comp_complement: Compute a probability's complement probability.

View source: R/comp_prob_prob.R

comp_complementR Documentation

Compute a probability's complement probability.

Description

comp_complement computes the probability complement of a given probability prob.

Usage

comp_complement(prob)

Arguments

prob

A numeric probability value (in range from 0 to 1).

Details

The type and range of prob is verified with is_prob.

Value

A numeric probability value (in range from 0 to 1).

See Also

is_complement verifies numeric complements; comp_comp_pair returns a probability and its complement; is_prob verifies probabilities.

Other functions computing probabilities: comp_FDR(), comp_FOR(), comp_NPV(), comp_PPV(), comp_accu_freq(), comp_accu_prob(), comp_acc(), comp_comp_pair(), comp_complete_prob_set(), comp_err(), comp_fart(), comp_mirt(), comp_ppod(), comp_prob_freq(), comp_prob(), comp_sens(), comp_spec()

Examples

comp_complement(0)    # => 1
comp_complement(1)    # => 0

comp_complement(2)    # => NA + warning (beyond range)
comp_complement("p")  # => NA + warning (non-numeric)


riskyr documentation built on Aug. 15, 2022, 9:09 a.m.