biometrician / abe

An R package for Augmented Backward Elimination
GNU General Public License v3.0
3 stars 0 forks source link

#16: improve `plot(abe_object, type.plot = "variables")` #16

Closed biometrician closed 1 year ago

biometrician commented 1 year ago

1) I think setting horiz = TRUE as default for type.plot = "variables", would increase readability of the variable names.

2) My model was selected using criterion = "AIC" and tau = INF. In this case the title of the plot is only "tau = INF". Can you add the AIC or BIC. If the `criterion = "alpha" then the title correctly also show the alpha level.

3) I tried to order the variables by the VIF frequency, but I failed. It would be really nice, if the user could change the order.

4) Can you add an axis label "VIF (%)".

Thanks!

biometrician commented 1 year ago

I would suggest to ask Gregor to do this task.

gregorsteiner commented 1 year ago

Done! Some comments:

  1. I changed this at the level of the summary function, since the plot function uses the names from the summary function. Only for the coefficients plots I changed this "manually" in the plot function. I did some testing, but I hope this doesn't cause any problems that I am not aware of.
  2. There is now an additional argument decreasing in the plot.abe function. If TRUE (default) the variables are ordered in a decreasing fashion, if FALSE they are ordered in an increasing fashion. Is this sufficient or would you also need arbitrary (i.e. not simply increasing or decreasing) orderings?
gregorsteiner commented 1 year ago

This is now also based on ggplot. This makes the horiz argument redundant. Also, the ordering is a bit more difficult now. As far as I know it is not possible to order them separately in each facet. So the ordering is now based on the first facet. Maybe i can find a better solution.

biometrician commented 1 year ago

Hi Gregor, I am testing the new plotting options. It looks really good with ggplot. I think it is absolutely okay, if the variables are always sorted from the largest to the smallest VIF.

I have only one request: In the linear model, can you delete the variable (Intercept) from the plot. This has to be included in all models per definition. Thanks!