Hi,
I would like to know how I can conduct a simple slope analysis in Bayesian analysis with priors.
I managed to do it by shifting data (please see below).
df2$pol.c <- df2$pol - mean(df2$pol)
df2$past.p <- df2$past-1
brm(endorse~pol.c*past.p, data = df2, prior = priors_simple_past_eds1,seed = 2020, iter = 100000) %>% summary()
However, the coefficient I obtained through the above approach was not identical with the coefficient I calculated from the output below (not shifting data).
brm(endorse ~ pol * past, data = df2, prior = priors_full_eds1,save_all_pars = TRUE, seed=2020, iter=100000)
I need to have information about estimate error and credible intervals.
Could you let me know how I can conduct a simple slope analysis in Bayesian analysis without shifting data?
Is there a function to do it?
or how can I calculate it?
Thank you so much in advance.
Kind regards,
IK Kim
- Operating System: Window, R
- brms Version: 2.12