If your model has a policy reaction function, you will observe that the variables on the right-hand side change, while the left-hand side is constant. The only way to square this is to estimate big monetary policy shocks. For that reason, people often use a shadow rate estimate.

# Theoretical Questions Related to Bayesian Estimation

**sp1589**#22

In other words, are you saying that because the short-term rate still affects the economy through expectations for the length of the zero lower bound for instance, this would be captured by the error term in the policy rule and that model would not be able to account for forward guidance for instance. In short, is that a reason why people may not want to estimate the model using the actual fed funds rate as an observable?

To give you context, I have a model with financial frictions and for the purposes of simulations, a financial shock is of key interest. Obviously, it is a sticky price economy hence why I have monetary policy. As you said, I can consider a shadow rate, but what if I am willing to ignore the precise impact of monetary policy during the ZLB without considering monetary policy. I know that this would affect the coefficient estimates, but I am wondering how much this may be a subjective choice based on the question of study versus an actual bias that must be remedied.

**jpfeifer**#23

That is hard to tell. Without properly accounting for the ZLB, the ZLB period will be associated with big implied estimated monetary policy shocks. In order for estimation to not assign too large shocks, it will consider other shocks as having happened as also quite likely. That is the general problem with the ZLB.

An additional complication/measurement error comes from unconventional monetary policy. This is not reflected in the nominal interest rate. So if you abstract from this, you will think monetary policy was more contractionary than it actually was. At the same time, having unconventional monetary policy implies that the ZLB was less binding, meaning that problem 1 was less severe.That is why I suggested to use the shadow rate as it (partially) gets around both problems.

**sp1589**#25

I had asked a couple of questions on this post, which I had deleted since I figured out my issues. Instead, in this post I would post a solution to the common issue of how does one go about in finding the mode of the prior distribution (which is what my initial questions were related to).

I had struggled with this issue for a few days and I am posting what worked for me.

First, I recommend that you use the `estimated_params_init* block. Hence, for each parameter you do the following:

```
estimated_params_init;
parameter 1, initial value;
parameter 2, initial values;
...(and so on for all your estimated parameters (and shocks))
end;
```

Note, initially you have no prior knowledge on what the standard deviations of the shock should be. Do not restrict them to any values. Keep the standard deviations of the shocks to inf.

Set the initial values to your calibrated parameters in the beginning of the mod file (or the mean of your prior distribution).

Next, use `mode_compute=6`

. It is a monte-carlo computation and is a global mode optimizer. The output of that optimizer will (most likely) not find the optimal local maximum for each parameter. However it will proceed with the estimation. At this point, you can stop the estimation, since it is pointless to continue. (Your results will never converge).

However, use the mode estimates from this optimization and update your initial parameter values in the `estimated_params_init`

block. After you update all values, switch to `mode_compute=4`

. Hopefully, absent any additional problems, this optimizer should find the local maximum for each parameter and it would proceed with the estimation.

**sp1589**#26

I am wondering if my definition for hours and the wage is correct. I am first differencing my trending variables while keeping the mean (I have a trend in the model). However, for hours I take the growth rate (LN(hours_t)-LN(hours_t-1)*100 and then demean it. Is this a correct way of specifying hours? My model labor variable is a standard one (between 0 and 1).

On a separate note, when and why would one want to have more shocks than observables in the estimation. What are the pros/cons with that?

**sp1589**#27

Hi Johannes,

If you can spare a few minutes if your time, can you please look at my mod file and tell me if you think something seems off? I think something is wrong in the model, but I cannot identify it. The model runs under mode_compute=4, and I have also attached the prior and posterior plots, but I don’t think some of my estimates make sense. The calvo wage parameter theta_w for instance is getting estimated at zero. b and L are levels of public and private debt, whereas R_L is a bond yield. The other observables are as in smets and wouters (2007).model.zip (258.1 KB)

**jpfeifer**#28

Regarding hours: as long as you use the demeaned growth rate of hours in the data and map it to the growth rate of hours in the model (which is already mean 0), this will be correct. The guiding principle is to treat empirical and model data the same way.

**jpfeifer**#29

It seems to me you are not handling parameter dependence correctly. Use model-local variables. See Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”

**sp1589**#30

Thank you Johannes.

I have 2 general questions. 1

- If I were to seasonally adjust data series, do I seasonally adjust the data across

-the sample period in my estimation

-the entire period for which the data is available

I suppose the question is what is the best way to compare this data with the rest of the series which have already been seasonally adjusted.

- What is the role of indexation to past and steady state inflation as opposed to steady state inflation only when it comes to sticky prices and sticky wages? I have seen indexation to past inflation used in models with financial frictions whereas a standard NK doesn’t really use it as often. Smets and Wouters do have it in their paper, but other than that haven’t seen it used in anything other than estimation of models with financial frictions.

**jpfeifer**#31

- That depends. If your data does not have a structural break as the reason you restrict the sample, the longer time series will allow for a better estimate of the seasonal pattern you remove.
- It is usually a matter of taste/convenience. The one with past inflation is a bit more complicated and often does not add that much in terms of fit. So people prefer to keep it simple.

**sp1589**#32

Thanks again for your feedback. I have another question.

Suppose I have 3 types of households that integrate to 1. Call it h_a, h_b and h_c as an example. I want to estimate their fraction. Once I specify say h_a follows a beta distribution which restricts it to 0-1 interval, how should I specify the estimate for one of the other households? It would seem that I would need to have an endogenous bound on the values one of the other households would have to take. What is the best way to specify this in dynare?

**jpfeifer**#33

That is a problem. Theoretically, you would like to have a joint prior over the three share, but in Dynare you can currently only use independent priors. What I would do is specify a prior for `h_a`

and `h_b`

and define `h_c`

as a model-local variable

```
h_c=1-h_a-h_b;
```

**sp1589**#34

Sure, but how should I specify the priors for h_a and h_b? For instance, if both are a beta distribution which constrains them on the unit interval, there is no way to guarantee that h_c would be a well defined share, since it may end up to be negative conditional on the estimates for h_a and h_b. In other worlds, I think that this still does not allow me to control for the summation of the three shares to be bounded on the unit interval. Unless I misunderstood?

**jpfeifer**#35

Now I understand the problem. Do you use a steady state file? If yes, you can use that to discard invalid draws.

**sp1589**#36

I don’t use a steady state file. How can I discard those draws if I do? Is there an example code I can look at?

Can you tell me if the following would bias the share estimates?

Instead of trying to estimate h_aC_a+h_bC_b+h_cC_c=C where the h_j is the share, I can do the following:

Let h_aC_a+(1-h_a)*C_bc=C

Then (1-h_a)C_bc=h_bc(C_b)+(1-h_bc)(C_c). That way, I can have h_a and h_bc as a beta distribution between 0 and 1 while guaranteeing that the shares would equal to the total C.

However, I am not sure if this would bias the estimates of the shares relative to hypothetical original case where I can estimate all 3 shares in one step as in the first equation. Can you tell me what you think?

Thanks

**jpfeifer**#37

Is your model linear? Or do you solve for the steady state numerically?

What you suggest should work. You have simply transformed the original problem into a mathematically equivalent one, using the restriction that the parameters need to sum to 1. You should not get any bias. The only issue is that the beta prior for the two parameters may imply a strange prior for the untransformed original shares. But very that is the case depends on your own prior about the parameters. You are the one to chose them.

**sp1589**#38

The model is linear. Thanks for your feedback.

I have an issue with the acceptance ratio and was wondering what kind of a problem that indicates. The ratio would be somewhere between 25% and 33% through the first quarter of running the first chain (after properly finding the modes of the prior) and then steadily start to decline and go to less than 1%.

Do you know what kind of a problem this indicates?

**jpfeifer**#39

Have a look at the trace plots:

```
generate_trace_plots(1);
```

Is the chain going to a prior boundary?

**sp1589**#40

I had a lack of identification for one parameter, which was causing the issue.

In general, how should one think about using ratios of variables as observables? For instance, if I want to use the ratio of a variable X say as a fraction of GDP how should one declare these as observables in either HP filtering or first-differencing case?

Actually, let me describe what my issue is. In one of my equations, I have the following term. A*(Cr/B_l) where Cr is level of credit and B is level of long_term debt. Now, in my model, I have both short and long-term debt. The issue is that if I have long-term debt only as observable, the fiscal shock and the parameter governing the response of debt to taxes cannot be estimated. If I have the ratio of LT to ST debt, then all parameters are estimated, but the Cr/B measure essentially becomes (Cr/(B_l/B). Cr here is still in level. For the purposes of what I am doing and for correct interpretation of A, both of these parameters would have to be expressed in the same units. Hence, I can convert Cr to be Cr/Y. My issue is that I have never seen the ratio of credit being estimated. I guess the issue is similar to having (say) consumption being estimated as the ratio of output rather than the level. What would be the implications of this in terms of interpretation and estimation?