The distribution objects represent one or more statistical distributions.
The generic functions stddev()
returns the standard deviation for these
distributions.
stddev(x, ...)
# Default S3 method
stddev(x, ...)
# S3 method for class 'distribution'
stddev(x, ...)
A numeric vector with one or more standard deviations.
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