fsolt / dotwhisker

Dot-and-Whisker Plots of Regression Results
https://fsolt.org/dotwhisker/
Other
57 stars 10 forks source link

correct distribution plot and add Bayes plot #105

Open Jianjun-yu opened 3 years ago

Jianjun-yu commented 3 years ago

1) correct distribution plot when I read how you plot normal distribution of coefficients, I find a small mistake. The orignal plot method can not work when sd of a coefficient is small. In this case, the normal distibution of the coefficient will be very tall therefore it will compress all other coefficients. I correct it by limiting the height of each normal distribution and keep the shape of the normal distributions. 2) add bayes plot I slightly change the dwplot to make it draw plots for bayesian models. In order to minimize the change of dwplot, I introduce a new function to transfer the result of a bayesian model to a data frame that dwplot can read. The data frames can also add together with rbind() and input dwplot to compare different models.