pdf2Support: Guesses the support from a pdf

View source: R/helpers.R

pdf2SupportR Documentation

Guesses the support from a pdf

Description

The function is designed to allow a quick start into distributional data analysis and plotting.

Usage

pdf2Support(
  pdf,
  starts = exp(seq(-20, 20, by = 0.2)),
  minDensityFactor = dnorm(qnorm(alpha/2))/dnorm(0),
  alpha = 0.01
)

Arguments

pdf

a probability density function of a real random variable

starts

a vector of values, where the algorithm should look for a nonzero pdf. If the pdf is nowhere positive the computation will fail.

minDensityFactor

a factor of the maximum density used to compute an effective range. should be a numeric in (0,0.5).

alpha

a way to specify minDensityFactor by providing an alpha level for the normal distribution.

Value

a Support object with the guessed support

See Also

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

Examples

pdf2Support(dnorm)
pdf2Support(dunif)



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