- Add argument to turn on/off the toggle warnings and messages when showing the model fit table.
- Fix error from CRAN
- Submitted just for the upstream package (
prediction
) issue. - Removed
margins
for the author would not maintain or update it in the foreseeable future.
Continue to removed the reference to broomExtra
per CRAN's requirement (email on 2024-02-19)
- Removed the reference to
broomExtra
per CRAN's requirement (email on 2024-01-23)
- Adding the argument
show_stats
todwplot
andsmall_multiple
to show model fits beneath the plot - Adding a hidden function
dw_stats
to extract model fits from the model outputs.
- Allowing
model_order
accurately work whenrelabel_predictors
is used. - Letting the vignette correctly shown.
- Adding argument
model_order
andsubmodel_order
insmall_multiple
to allow customizing the order of models to present. - Adding argument
axis_switch
insmall_multiple
to allow switching the positions of the variable labels and y axis ticks.
- Fixed the error when setting
style = "distribution"
. Thanks for Indrajee @IndrajeetPatil pointing that out.
- Adding argument
model_order
indwplot
to allow customizing the order of models to present. - Adding argument
fontSize
inadd_brackets
to allow customizing the font size of bracket labels, and opening possibility for users to further customize bracket labels. - Using the
parameters
instead ofbroomExtra
as the plotting data frame creator. Thanks for the suggestion from @IndrajeetPatil.
- Models and margins present in the correct order.
- Adding changing the
dw_tidy
engine tobroomExtra::tidy_parapmeter
. - Adding the function to plot AME based on
margins::margins
.
- Allowing the data.frame output varying based on confidence intervals.
- Setting the default value of
by_2sd
to FALSE.
-
The
vline
argument is now available fordwplot()
. Passing ageom_vline()
object to this argument, typically one withxintercept = 0
, will plot this line behind the plotted coefficients, which most will find aesthetically preferable. The default for this argument isNULL
, so if you prefer not to include such lines or just like them plotted last and foremost, there's no need to change your code. -
dwplot()
now again accepts thewhisker_arg
argument to change the appearance of the whiskers representing the confidence intervals that has been lost since v0.3.0. This means you can, for example, specify different colors for the dots and the whiskers:
# load the library
library(dotwhisker)
#> Loading required package: ggplot2
# linear model of interest
lm_object <- stats::lm(formula = wt ~ am * cyl, data = mtcars)
# creating the plot with dwplot
dwplot(x = lm_object,
dot_args = list(color = "red"), # color for the dot
whisker_args = list(color = "black"), # color for the whisker
vline = ggplot2::geom_vline(xintercept = 0, # put vline _behind_ coefs
colour = "grey60",
linetype = 2,
size = 1))
Created on 2018-06-27 by the reprex package (v0.2.0).
- Fixed a bug in
add_brackets()
that caused brackets to overlap in large models or when many models were included in a single plot.
- A new plot style! Specifying
style = "distribution"
in the arguments todwplot()
presents regression coefficients as normal distributions, underscored with a line representing the desired confidence interval. relabel_predictors()
now conveniently reorders the predictors as well.add_brackets()
can now be added directly to the end of a chain of commands that generate a dotwhisker plot; the intermediate object necessary in past versions is no longer needed. Just wrap the plotting commands in braces ({
and}
) before piping them toadd_brackets()
!
- The
alpha
argument todwplot()
should no longer be used to change the width of confidence intervals; useconf.int
(to be passed tobroom::tidy
via...
) instead. - When
dwplot()
is passed model objects rather than a tidy data frame, the regression coefficients are now rescaled by two standard deviations of their respective variables in the analyzed data (perby_2sd()
) by default. This may be changed by settingby_2sd = FALSE
.
- Fixed a bug in
add_brackets()
that de-centered the brackets - Fixed a bug that caused
dot_args
to be ignored after plots were passed torelabel_predictors()
- Fixed a bug that prevented
small_multiple()
from directly reading confidence intervals from a model. - Fixed a bug in
by_2sd()
now adjusts, if present, any confidence intervals in tidy data frames passed to the function.
Thanks to Steven V. Miller and Ryan Burge for bug reports, and to Ben Edwards and Jay Jacobs for inspiring style = "distribution"
!
- Rewrote the plotting functions based on the
ggstance
functions. The newdwplot
allows cooperating with moreggplot
functions, such asfacet_*
. - Drew whiskers based on the CI estimates directly from the model output. See more details in
tidy.lm
) andconfint
. - Clarified the description of
by_2sd
.
- Fixed the bug in
relabel_predictors
.
- Expanded capabilities of
relabel_predictors
.relabel_predictors
now accepts plots as well as tidy dataframes as input; that is, it may now be used both before and after calls todwplot
. - Deprecated
relabel_y_axis
. It is easy to mistakenly mislabel variables withrelabel_y_axis
, and it has a conflict withadd_brackets
in single-model plots. - Provided example of using multiple shapes for multiple models in vignette.
dwplot
works forpolr
projects.
- Improved the presentation of
small_multiple
.
- Fixed the error of variable ordering with a single model.
- Fixed the error in presenting multiple models.
- Fixed the error due to the update of
dplyr::group_by
- Fixing the errors in vignette.
- Adding the
show_intercept
argument. - Shorten the version number to three digits as
devtools
suggests.
- Fixed the error due to the update of
gridExtra
. - Fixed the error due to the update of
ggplot2
.
- Fixed presenting error in multilevel models (#44)
- Fixed the link error in
kl2007_example.Rmd
.
- Improving the vignette.
- The function works for
ggplot2
2.0.0.
- Fixed the error in the vignette.
- Allowing directly using model objects besides
tidy
data.frame. - Adding two new special plotting functions:
secret_weapon
andsmall_multiple
. - Adding two graph adjusting functions:
relabel_predictor
andrelabel_y_axis
.
More details about the new functions are available in the vignette.