# Dynare BCA Estimation/Implementation

**URL:** <https://forum.dynare.org/t/dynare-bca-estimation-implementation/19104>\
**Category:** ML/Bayesian estimation\
**Created:** [15 October 2021 15:35 UTC](https://forum.dynare.org/t/dynare-bca-estimation-implementation/19104 "2021-10-15T15:35:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kofiemma](https://forum.dynare.org/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@kofiemma](https://forum.dynare.org/u/kofiemma)\
**Post date:** [15 October 2021 15:35 UTC](https://forum.dynare.org/t/dynare-bca-estimation-implementation/19104/1 "2021-10-15T15:35:53Z")

</div>

In business cycle accounting, one must estimate the parameters of the Markov process s\_t = P\_0 + Ps\_{t-1} + \epsilon\_t,\;\; var(\epsilon\_t) = V = QQ', using, say, MLE.

For replication purposes, prof. Johannes Pfeifer uses values for P\_0, P, Q from the original paper in both the `parameters;` block and `estimated_params;` block (i.e., as priors) in dynare.

1. For other countries, we need to change the initial values of the parameter in `parameters;` block and priors in `estimated_params;` block, for P\_0, P, Q, yeah? Or no major issues on the results for using similar values in the original paper?
2. Also, in the replication mod file, the log of the data is linearly detrended. But one could have also used the HP filter, right?
3. And also in the mod file, it says government spending enters model in logs. So, for example, in resource constraint, g is in logs and other variables are in levels? But you cannot add levels and logs data, right…I know my understanding here is wrong, but I cannot understand that statement.

```auto
%resource constraint (A.2.1)
exp(c)+exp(g)+(1+gamma_z)*(1+gamma_n)*exp(k(+1))-(1-delta)*exp(k)=exp(y);

```

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [18 October 2021 08:13 UTC](https://forum.dynare.org/t/dynare-bca-estimation-implementation/19104/2 "2021-10-18T08:13:12Z")

</div>

1. You can either try that or work with a “more standard prior”. For example, and AR(1) with 0.9 on the diagonal. Ideally, you verify that the starting values do not make a difference.
2. No, the HP filter is a two-sided, i.e. non-causal filter. It contradicts the state space representation of the model.
3. That is a mistake in the comment. Thanks for pointing it out. I fixed it.
