From 3a721691d597095e27d8ebc53e137d6b4466973a Mon Sep 17 00:00:00 2001 From: mitchelloharawild Date: Tue, 17 Sep 2024 16:21:10 +1000 Subject: [PATCH] Change default of quantile.dist_mvnorm() to use equicoordinate quantiles This reverts commit 10e8ef9d9033c6e9e59a09f45e9f7bdf47a7d897. --- NEWS.md | 6 ++++++ R/dist_multivariate_normal.R | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index d09af6ff..c7537eb2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,11 @@ # distributional (development version) +## Breaking changes + +* The `quantile()` method for `dist_multivariate_normal()` now defaults to + equicoordinate quantiles. To obtain marginal quantiles, you should use + `quantile(dist, p, type = "marginal")`. + # distributional 0.5.0 ## New features diff --git a/R/dist_multivariate_normal.R b/R/dist_multivariate_normal.R index ed8d2734..49a15409 100644 --- a/R/dist_multivariate_normal.R +++ b/R/dist_multivariate_normal.R @@ -56,7 +56,7 @@ log_density.dist_mvnorm <- function(x, at, ..., na.rm = FALSE){ } #' @export -quantile.dist_mvnorm <- function(x, p, type = c("marginal", "equicoordinate"), +quantile.dist_mvnorm <- function(x, p, type = c("equicoordinate", "marginal"), ..., na.rm = FALSE){ type <- match.arg(type) q <- if (type == "marginal") {