# Unable to calibrate simple parameter value to steady state target

I’m doing a simple exercise of calibrating numerically a parameter value. Concretely \theta (theta), is the parameter that controls labor disutility (i.e. u=...-\theta \frac{n_t^{1+\xi}}{1+\xi}). I want to calibrate it such that in the steady state n=1. I’ve already did it analytically (keeping all other parameter values fixed), and found that the value 0.2184 sets accomplish ss target.

I designed a simple routine for calibrating theta using Dynare’s numerical computation of the steady state, and MATLAB’s non-linear equation solver fsolver().

In a nutshell, my code: Having fixed parameter values except for theta directly in the mod file. A MATLAB routine takes an initial value of theta=1 and then tries to solve a function l2_norm() to zero. The function just computes the stochastic simulation (and thus the steady state) with the value of theta provided, and then returns the difference between the target steady state value and the current steady state value (i.e. n_tgt - n_ss = n_tgt - 1).

Nonetheless, the solver stops and displays:

No solution found.

fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
value of the function tolerance.


I’ve tried changing some of the TolX and TolFun parameters, but still unable to get the program to compute the calibrated value for theta. Worth noting, when I use the analytically calibrated value (0.2184) as initial value, it gets computed correctly “at the initial point”, but if I change it a bit this value to e.g. 0.5 it becomes unable to solve it.

A guidance in what I’m doing wrong and what should I take care of when doing this sort of computation would be very appreciated. Since in a real life escenario I probably won’t have access to a very good approximation of what the parameter should be for using as initial value.

Thanks!!

calibration.m (2.6 KB)
num_cal.mod (9.4 KB)

This is not a good strategy. You are essentially using Dynare in a circular way.
You should compute the steady state analytically. With n fixed, that should be feasible.

1 Like

Yes, but in the case that an analytic computation of the steady state is not at my hand, is there an alternative, for numerically calibrating and fully finding the steady state? I mean for example which strategy would you recommend for calibrating a very large model in which it’s very difficult to find an analytic form for most of the variables.

Many thanks for your help Professor Pfeifer!

As I said, with fixing n to a particular value, you should usually be able to compute the steady state by hand. That’s why we usually do this trick.

1 Like

Indeed, but I’m a bit worried when I want to calibrate more complicated things, I think I’ll advance more in my model and maybe ask a more precise question when some trouble arises. Thanks Prof. Pfeifer!