Properly set up codes to get posterior predictions without re-running the original model

Hi

I always use the generated quantities block to get my posterior predictions while estimating the model. But I am working on a big model right now (using reduce-sum) and I need to get posterior predictions with covariate values, which are dependent on the business-people’s suggestions (unknown to me right now). I don’t want to re-run the original model every time I am using a different a set of covariate values. Is there a way to set it up so that I can run the generating quantities block? I am aware that I will need to use the fixed_param=TRUE option. But I just don’t know what the data block should be, since it needs the posterior draws from the parameters for the model. Thanks.

1 Like

Wouldn’t Run Stan's standalone generated quantities method — model-method-generate-quantities • cmdstanr be what you need?

2 Likes