Mcmc sampling from composite parameters

Dear all,

I’m trying to estimate the slope of a NKPC slope in the basic NK model (gali). From my understanding I could estimate the individual parameters that make it up then put those in and obtain the value for the slope. But is there a way I can estimate (same use the mcmc to sample) the slope so that I could get the standard error for example for the slope?
Thank you al in advancel.

There are two ways you could do this.

  1. Define an auxiliary variable (not parameter) that stores the slope of the NKPC slope and then compute its distribution via moments_varendo
  2. Use the posterior_function-command to sample from the posterior and write a function to compute the NKPC slope in this posterior function