cdf2Support: Try to guess the support from cdf

View source: R/helpers.R

cdf2SupportR Documentation

Try to guess the support from cdf

Description

This function essentially tries to infere the support from a cdf.

Usage

cdf2Support(cdf, alpha = 0.01, eps = 1e-07, digits = 5)

Arguments

cdf

the cummulative density function from which the support shall be guessed.

alpha

the support cutoff probability for effective supports if the support is infinite

eps

the computational precision for computing the boundaries

digits

the number of digits the boundaries and jumps shall be rounded to.

Value

a 'Support' object describing the support inferred from the 'cdf'. Its 'a' and 'b' elements give the (possibly infinite) lower and upper support boundaries, its 'lim' element the effective lower and upper boundaries (a numeric vector of length two, cut at probability 'alpha/2' and '1 - alpha/2' when the support is unbounded), and 'X' any detected points of positive probability mass.

See Also

Other Support: Support(), pdf2Support(), plotFuncs(), sample2Support()

Examples

cdf2Support(pnorm)
cdf2Support(punif)
cdf2Support(
  function(x){
  ifelse(x< -pi,0,((pmax(x,0)+pi)/pi)*0.5) +
      ifelse(x<0,0,0.25+(pmax(x,pi)/pi)*0.25)
  }
)


DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.