The distribution objects represent one or more statistical distributions.
The generic functions stddev()
returns the standard deviation for these
distributions.
Usage
stddev(x, ...)
# S3 method for default
stddev(x, ...)
# S3 method for distribution
stddev(x, ...)
Arguments
- x
A distribution object, as from the {distributional} package.
- ...
Further arguments (not used yet).
Examples
library(distributional)
n1 <- dist_normal(mu = 1, sigma = 1.5)
n1
#> <distribution[1]>
#> [1] N(1, 2.2)
class(n1)
#> [1] "distribution" "vctrs_vctr" "list"
family(n1)
#> [1] "normal"
mean(n1)
#> [1] 1
variance(n1)
#> [1] 2.25
stddev(n1)
#> [1] 1.5