Question on Incorporating Uncertainty

Hi everyone!

I’m pretty new to stan (and bayesian stats in general). I have an idea of what I want to do and how, but due to inexperience I’m not sure if I made any mistakes in my reasoning or if I’m misunderstanding the techniques. I’m hoping to describe my thought process here to double check.

I’ve got a bunch of different vectors of values, x1, x2, etc., and I’m fitting a weibull density function individually to each vector. I’m interested in the average slope (so, average derivative across each density distribution). So we get the slope of density function x1, slope of x2, etc., as our data values that will be input into my eventual brms model. So far so good.

Here’s where I get a little tripped up: when I fit the density function to each vector, I also get a CI of parameters for the distribution (e.g., weibull with shape between 0.5-0.9 and scale between 0.3-2, or something). That means I don’t have just one fitted density to each vector, there’s uncertainty. Furthermore, there’s also uncertainty in the slope of each function (after all, derivative changes across the density distribution), which I’d like to be able to incorporate into the model as well.

My thought was to do the following: for vector x1, randomly pull distribution parameters from within their CIs and fit multiple density functions based on these random draws. Calculate the slopes across all randomly selected distributions and combine into a single vector (so we get one large vector of all the slopes calculated for the possible random distributions for vector x1). Then, get the mean and se of these slopes. Repeat for all vectors x2, x3, etc. Finally, for the final brms model, use the | mi(<se_response> to incorporate uncertainty in slopes in the model.

Is this a good approach? Or am I making an error somewhere? Please let me know if any of this is unclear, I know that methods can be kind of tricky to follow in text form.

Thank you!

Adam