quantile_conflation | R Documentation |
quantile_conflation: Calculate the quantile for a given probabiliy under a conflated distribution
quantile_conflation(p, data, output = c("quantile", "optim"))
p |
A float with the desired probability for which the quantile is to be calculated. |
data |
A data frame which results from calling 'conflate'. |
output |
One of two values, either "quantile" or "optim". The former returns only the optimised quantile value, whereas the latter returns the complete output from 'optim'. Useful for checking whether optimisation converged. |
Either a vector of length one withe the quantile value, or a list as returned by optim.
conflated = density(rnorm(1000000, 0, 1))[c("x", "y")]
quantile_conflation(0.5, conflated, output = "quantile")
quantile_conflation(0.5, conflated, output = "opt")
quantile_conflation(0.025, conflated, "quan")
quantile_conflation(0.975, conflated, "q")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.