View source: R/dst_parametric.R
dst_parametric | R Documentation |
When a distribution has p
, d
, q
, r
functions available (such as
pnorm()
, dnorm()
, etc.), dst_parametric()
creates a distribution
that draws on these four functions.
dst_parametric(
.name,
...,
.variable = c("unknown", "continuous", "discrete", "mixed"),
.env = parent.frame()
)
.name |
Name of the distribution. Specifically, a string with
the suffix of the |
... |
Name-value pairs of parameters. Names must be found in the
parameter names of the |
.variable |
Type of random variable represented by the distribution. Warning: defaults to "unknown", where density, pmf, and hazard cannot be evaluated. |
.env |
Environment beginning the search path when looking for the
representation, or the name of an environment (or any object that
can be coerced to an environment with |
d <- dst_parametric("norm", mean = 0, sd = 1, .variable = "continuous")
eval_density(d, at = -3:3)
eval_pmf(d, at = -3:3, strict = FALSE)
eval_hazard(d, at = -3:3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.