Plotting individual points of a lognormal BRM

  Kiến thức lập trình

I apologize if I am titled this question oddly, I’ve never had a situation like this.

I am creating a BRMS model shown here:

model1 <- brm(distance ~ time + height + (1|sid), data = a03,
             family = lognormal(),
             prior = c(set_prior("normal(0,1)", class = "b")), 
             init = "random", 
             chains = 4, iter = 4000, warmup = 2000, thin = 1,
             cores = getOption("mc.cores", 4L),
             control = list(adapt_delta = 0.95, max_treedepth = 15),
             silent = TRUE, seed = 13, backend = "rstan", save_pars = save_pars(all = TRUE)

with family = lognormal(), which I then plot like this:

model1.gge   <- ggemmeans(model1, terms = c("height"))
model1.plot  <- plot(model1.gge,add.data=TRUE)+theme_bw()+theme(text = element_text(size = 15))

However add.data=TRUE is plotting the raw data instead of data transformed to lognormal:

You can see the difference in scale between the scatter plot and the plotted BRMS. I have been looking up plotting data with the BRM, but I don’t know the correct phrasing for this in the BRM manual posted on R-projects. Can anyone give me some direction as to what parameter I need to look up to transform the plotted points? Thank you for your time!

3

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website Kho Theme wordpress Kho Theme WP Theme WP

LEAVE A COMMENT