I have some data with different time stamps where the response variable is categorical. I want to fit a Bayesian logistic regression model using these data. Specifically, for the data at a time (t), I want to use non-informative priors but for the data at the succeeding time (t+1), I want to use the posteriors from the model fitted using data at a time (t) as priors. To use the posteriors, I generated the non-empirical distributions using Kernel Density. The challenge is I do not know how to incorporate these distributions as priors. I will appreciate any help out there.

Thanks in advance

Using the posterior from a previous fit as a prior for new data is straightforward in theory, but not as simple in practice because we usually only obtain samples and no closed form solution.

I guess the usual way would be to approximate the posterior with a parametric distribution. Then you could use the estimated parameters as prior for your new data.

But is there a reason why you can’t fit all your data at once? This is mathematically identical to fitting it first on time t and then using your posterior as a prior for t+1, but you can avoid the awkward step in between (and loss of accuracy).

1 Like

@daniel_h Thank you for your response. I cannot combine the data from different time stamps because the impacts of the variables in these data evolve with time. I am currently approximating the posterior to a parametric distribution that they closely follow, e.g., normal distribution but I was looking for way to avoid this step.

Can you post the model you have right now? (even better with some fake data)

Because this

I cannot combine the data from different time stamps because the impacts of the variables in these data evolve with time.

sounds like something that can (and should!) be included directly into the assumptions of the model,

possibly through some auto-regressive component.