Hi everybody! I’m triying to replicate a paper wich include price dispersion in input demands, i.e. i have an expresion like: ∫_0^1〖(P_t/(P_t (i)))^θ di〗. My question is, someone knows how can i include the integral into the dynare code? Thanks in advance.
There is no way to enter this integral directly. The way to go is usually to define an auxiliary variable s=∫_0^1〖(P_t/(P_t (i)))^θ di〗which is substituted for every occurence of the integral. Moreover, there appears a law of motion for this variable s, see page 19 of columbia.edu/~mu2166/nberma/nberma_expanded.pdf
In this case, the trick works similar, but only if you linearize the model by hand. Have a look at the model appendix to Smets/Wouters (2007) posted on the AER homepage. For the general non-linear case, there is no way as far as I know.