Reputation: 13
I am trying to plot the Beta Coefficients of multiple models on one graph. I have a log transformed dependent (y) variable. I would like to be able to display the dependent variable in its original units.
This is what ive done using mtcars as an example. The dependent variable is still in units "log(mpg)" and I would like to just have it in "mpg" Ive tried use transform = "exp" however this just transforms the beta coefficient and not the response variable.
library(sjPlot)
library(ggplot2)
mtcars <- mtcars
mod_disp <- lm(log(mpg) ~ disp, data = mtcars)
mod_hp <- lm(log(mpg) ~ hp, data = mtcars)
plot_models(mod_disp, mod_hp, show.values = TRUE) + ylim(-0.1, 0.1)
Upvotes: 0
Views: 75