diff --git a/NAMESPACE b/NAMESPACE index 851bbaedb..29f0dea16 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -179,6 +179,7 @@ S3method(estimate_density,blrm) S3method(estimate_density,brmsfit) S3method(estimate_density,data.frame) S3method(estimate_density,default) +S3method(estimate_density,double) S3method(estimate_density,draws) S3method(estimate_density,emmGrid) S3method(estimate_density,emm_list) diff --git a/R/estimate_density.R b/R/estimate_density.R index bde761d40..d44233c17 100644 --- a/R/estimate_density.R +++ b/R/estimate_density.R @@ -345,6 +345,12 @@ estimate_density.grouped_df <- function(x, do.call(rbind, out) } +# to avoid class conflicts - e.g., numeric variables imported with the +# haven package are of class "haven_labelled" and "double", which causes +# problems with the generic or numeric method. + +#' @export +estimate_density.double <- estimate_density.numeric #' @export estimate_density.emmGrid <- function(x, diff --git a/man/diagnostic_posterior.Rd b/man/diagnostic_posterior.Rd index ab4e39938..d99d377dd 100644 --- a/man/diagnostic_posterior.Rd +++ b/man/diagnostic_posterior.Rd @@ -38,21 +38,13 @@ with one or more of these options: \code{"ESS"}, \code{"Rhat"}, \code{"MCSE"} or \item{effects}{Should parameters for fixed effects, random effects or both be returned? Only applies to mixed models. May be abbreviated.} -\item{component}{Which type of parameters to return, such as parameters for the +\item{component}{Should all predictor variables, predictor variables for the conditional model, the zero-inflated part of the model, the dispersion -term, the instrumental variables or marginal effects be returned? Applies -to models with zero-inflated and/or dispersion formula, or to models with -instrumental variables (so called fixed-effects regressions), or models -with marginal effects from \pkg{mfx}. May be abbreviated. Note that the +term or the instrumental variables be returned? Applies to models +with zero-inflated and/or dispersion formula, or to models with instrumental +variable (so called fixed-effects regressions). May be abbreviated. Note that the \emph{conditional} component is also called \emph{count} or \emph{mean} -component, depending on the model. There are three convenient shortcuts: -\code{component = "all"} returns all possible parameters. -If \code{component = "location"}, location parameters such as \code{conditional}, -\code{zero_inflated}, \code{smooth_terms}, or \code{instruments} are returned -(everything that are fixed or random effects - depending on the \code{effects} -argument - but no auxiliary parameters). For \code{component = "distributional"} -(or \code{"auxiliary"}), components like \code{sigma}, \code{dispersion}, -\code{beta} or \code{precision} (and other auxiliary parameters) are returned.} +component, depending on the model.} \item{parameters}{Regular expression pattern that describes the parameters that should be returned.}