Simple question, but is there a quick way to use pp_check while changing the scale of the y (dependant) variable such that I can get my y_rep on a linear scale (even though it is on log scale in the brms model object)? Adding this ggplot style line to the pp_check output is doing nothing for me:
pp_checkobject <- pp_check( model_fit, newdata = newdataex, type = "stat", stat="median", nsamples = 100) + scale_x_continuous(trans="exp")
The brms model fit object I have uses a log(dependant variable). This is the issue.
I see the output from pp_check is a ggplot compatible object but can’t seem to find an easy way to extract the value from the object and put it on the linear scale by exponentiating it when plotting it.
I know the value of y_rep is housed here such that this does what I want but not within the ggplot environment:
I also tried changing the scale in the option for “y=” within pp_check but did not change anything for me.