<p>This question is too broad as it stands. There is a longer answer already, but I think it is possible to deal with a core part of the question easily.</p>
<blockquote>
<p>The concrete question is what is a state-space representation, if possible with some of the intuition, its uses in economics (control theory)</p>
</blockquote>
<p>My background is in control systems theory, where the notion of a state space representation developed. Optimal control theory, including the Kalman filter, was developed mainly in the 1960s. Economists have kept using the core ideas, but migrated off to their own standards of mathematical presentation.</p>
<p>A state space model is a canonical representation of a mathematical system. The idea is to take a model derived from underlying dynamics, and re-cast it into a standard format, so that existing tools can be applied to it.</p>
<p>In control theory, the standard canonical form of a nonlinear state space system is:
<span class="math-container">$$
x(t+1) = f(t, x(t), w(t)),
$$</span>
<span class="math-container">$$
y(t) = g(t, x(t), w(t)),
$$</span>
<span class="math-container">$$
x(0) = x_0 \in R^n,
$$</span>
with:</p>
<ul>
<li><span class="math-container">$x(t)$</span> an n-dimensional state vector,</li>
<li><span class="math-container">$w(t)$</span> a vector of all external variables,</li>
<li><span class="math-container">$y(t)$</span> a vector of measured variables.</li>
</ul>
<p>A fairly typical simplification is that the system is linear and time invariant, where the description collapses to:
<span class="math-container">$$
x(t+1) = A x(t) + B w(t),
$$</span>
<span class="math-container">$$
y(t) = C x(t) + D w(t).
$$</span></p>
<p>Typical examples of external variables that appear in <span class="math-container">$w$</span> include:</p>
<ul>
<li>variables used to control the system (typically fixed by feedback rules),</li>
<li>variables that disturb the state variables,</li>
<li>noise that effects measurements.</li>
</ul>
<p>The vector <span class="math-container">$w$</span> is often partitioned into groups corresponding to these cases, and the <span class="math-container">$B,C,D$</span> matrices are correspondingly partitioned.</p>
<p>Once we have the system in this format, we can then apply existing tools. A typical example is applying the Kalman filter to infer the state variable <span class="math-container">$x(t)$</span> from directly measured variables. Numerical toolboxes will give results based on the <span class="math-container">$[A,B,C,D]$</span> representation.</p>
<p>In economics, the variable <span class="math-container">$r^*$</span> is typically inferred by the use of a Kalman filter (E.g.,  see <a href="https://www.newyorkfed.org/research/policy/rstar" rel="nofollow noreferrer">New York Fed r* page</a>). This variable roughly corresponds to what was called “the natural rate of interest”, and cannot be measured directly. Instead, it needs to be inferred from measured variables. This example underlines why we need to differentiate between the state vector, and the variables that are directly measurable. The state vector includes all variables need for the dynamical description of the system, and not just variables that are measured.</p>
<p>(Note: control theory uses a somewhat unintuitive definition of “observable.” A variable is observable if its value can be inferred from measurements - even if it is not directly measured. Since observability is a mathematical requirement for the Kalman Filter to converge, this needs to kept in mind when reading documentation prepared by control engineers.)</p>
<p>As a final technical note, state space representations may not always exist. A key example in control theory are linear continuous time systems with a time delay. It would require an infinite number of states to represent a time delay, and so engineers are forced to either use frequency domain representations, or an approximation.</p>

CC BY-SA 4.0
2020-10-24T18:37:11.710Z
2020-10-24T18:37:11.710Z
Brian Romanchuk
<p>State Space Representations of Linear Systems:</p>
<p><a href="https://lpsa.swarthmore.edu/Representations/SysRepSS.html" rel="nofollow noreferrer">https://lpsa.swarthmore.edu/Representations/SysRepSS.html</a></p>
<blockquote>
<p>As systems become more complex, representing them with differential equations or transfer functions becomes cumbersome.  This is even more true if the system has multiple inputs and outputs.  This document introduces the state space method which largely alleviates this problem.  The state space representation of a system replaces an nth order differential equation with a single first order matrix differential equation.</p>
</blockquote>
<blockquote>
<p>Advantages of this representation include:</p>
<ul>
<li>The notation is very compact.  Even large systems can be represented by two simple equations.</li>
<li>Because all systems are represented by the same notation, it is very easy to develop general techniques to solve these systems.</li>
<li>Computers easily simulate first order equations.</li>
</ul>
</blockquote>
<p>DSGEs are State-Space Models (see page 11 of 20 page presentation).</p>
<p><a href="https://www.karlwhelan.com/MAMacro/part10.pdf" rel="nofollow noreferrer">https://www.karlwhelan.com/MAMacro/part10.pdf</a></p>
<blockquote>
<p>In general, for a model to have well-defined econometric estimates, it is necessary that for every observable variable there be at least one unobservable shock.  This can either take the form of a “measurement error” or else involve a shock in each equation with a clear structural interpretation.</p>
</blockquote>
<blockquote>
<p>Log-linearised DSGE models with a mix of observable and unobservable variables are an example of state-space models.  Recall that these models can be described using two equations.</p>
</blockquote>
<blockquote>
<p>The first, known as the state or transition equation, describes how a set of unobservable state variables, S(t), evolve over time as follows:</p>
</blockquote>
<blockquote>
<p>S(t) = FS(t−1) + u(t).</p>
</blockquote>
<blockquote>
<p>The term u(t) can include either normally-distributed errors or perhaps zeros if the equation being described is an identity.  We will write this as u(t) ∼ N(0,Σu) though Σu may not have a full matrix rank.</p>
</blockquote>
<blockquote>
<p>The second equation in a state-space model, which is known as the measurement equation, relates a set of observable variables, Z(t), to the unobservable state variables</p>
</blockquote>
<blockquote>
<p>Z(t) = HS(t) + v(t)</p>
</blockquote>
<blockquote>
<p>Again, the term w(t) can include either normally-distributed errors or perhaps zeros if the equation being described is an identity.  We will write this as v(t) ∼ N(0,Σv) though Σv may not have a full matrix rank.</p>
</blockquote>
<p>In engineering the state-space representation is primarily a standard way to characterize the system in terms of standard matrix methods applied in software solvers. However the DSGE reference above says DSGEs are state-space models.</p>
<p>The 30 page working paper (2012) under this link has title Bayesian Estimation of DSGE Models:</p>
<p><a href="https://philadelphiafed.org/-/media/research-and-data/publications/working-papers/2012/wp12-4.pdf" rel="nofollow noreferrer">https://philadelphiafed.org/-/media/research-and-data/publications/working-papers/2012/wp12-4.pdf</a></p>
<p>It provides a short history of DSGE Model Estimation then describes the application of a Canonical New Keynesian DSGE Model. Page 12 describes the state-space representation of the NKDSGE. This quote is insight into the Bayesian assumption that there is no &quot;true&quot; model for the system in contrast to the Frequentist assumption:</p>
<blockquote>
<p>Bayesians avoid having to assume there exists a true or correctly specified DSGE model because of the likelihood principle (LP). The LP is a foundation of Bayesian statistics and says that all evidence about a DSGE model is contained in its likelihood conditional on the data; see Berger and Wolpert (1988).  Since the data’s probabilistic assessment of a DSGE model is summarized by its likelihood, the likelihoods of a suite of DSGE models possess the evidence needed to judge which “best” fit the data. Thus, Bayesian likelihood-based evaluation is consistent with the view that there is no true DSGE model because, for example, this class of models is afflicted with incurable misspecification.</p>
</blockquote>
<p>So DSGE models are data in search of the most likely underlying system models. The state-space representation is a method to structure the search for a solution using numerical theory and methods.</p>
<p>Two academic references on DSGE models have mentioned Dynare open source software which runs DSGE simulations on an underlying platform.</p>
<p><a href="https://www.dynare.org/" rel="nofollow noreferrer">https://www.dynare.org/</a></p>
<p>Questions are posted on the Dynare Forum:</p>
<p><a href="https://forum.dynare.org/" rel="nofollow noreferrer">https://forum.dynare.org/</a></p>
<p>PS - Despite this long answer I will add that my intuition as an electrical engineer and former commercial lawyer who follows financial markets as cash flow systems is as follows. When investors and credit dealers converge perceptions to &quot;put risk on&quot; in aggregate then balance sheets expand, cash flows increase, asset prices rise, good things happen, and GDP goes up. When investors take risk off and credit dealers converge to&quot; take risk off&quot; in aggregate then balance sheets attempt to unwind, cash flows decrease, asset prices fall, bad things happen, and GDP goes down or does not return to former rates of growth due to hysteresis in the behavior of intelligent agents. If perceptions do not converge then asset prices will be more stable and less prone to overshoot and collapse, but if perceptions converge to drive overshoot eventually they will converge to drive collapse in asset prices. Government spending, taxes, credit enhancements, and financial regulations or lack thereof can attenuate or amplify the market-based causes of overshoot and collapse patterns. The perceptions, decisions, and actions of intelligent agents are thus stochastic parameters endogenous to the financial and real economy and to an infinite possible number of toy DSGE models. The cell phone network has only so much bandwidth. Stochastic cell phone use patterns typically do not use up all the available bandwidth. One day an earth quake hit the East Coast. Stochastic use spiked when millions of people tried to call each other to discuss the quake. This &quot;fat tail&quot; event used up all the bandwidth in the cell phone network. Banks and other financial intermediaries (FI) are designed to provide credit and cash flow via the expansion of balance sheets with rising or steady asset prices. This is because assets are collateral for long term debt so when assets fall borrowers go underwater (negative equity) in their balance sheets. When investors all want to sell and few want to buy as asset prices collapse these intelligent agent inputs disrupt the liquidity and cash flow generating capacity of credit and money markets. Paradoxically the systemic market forces reduce and unwind balance sheet capacity when too many units demand liquidity at the same time which is a &quot;fat tail&quot; liquidity event.</p>

CC BY-SA 4.0
2020-09-23T11:11:04.833Z
2020-09-24T14:25:47.177Z
2020-09-24T14:25:47.177Z
SystemTheory
<p>I'm beginning with DSGE modeling, and a mathematical representation (perhaps trivial for most of the people that are more with this topic) is the space-state state representation of a dynamical model, like depicted <a href="http://users.ox.ac.uk/%7Eexet2581/Boe/dsge_day3.ppt#:%7E:text=Blanchard%2DKahn%20condition,%2Dlooking%20(control)%20variables." rel="nofollow noreferrer">here</a> (s.2), or similar documents.</p>
<p>I have already read the <a href="https://en.wikipedia.org/wiki/State-space_representation" rel="nofollow noreferrer">Wikipedia</a> article about this topic, and I get the general idea (in this case applied to engineering). But I want a further explanation in how this applies in DSGE modeling, and if possible some literature (preferably economics-focused). The concrete question is what is a state-space representation, if possible with some of the intuition, its uses in economics (control theory), and some key insights about the notation.</p>
<p>Thank you!</p>

CC BY-SA 4.0
2020-09-23T04:53:46.070Z
Hi: I think your question is too general which is why no one has provided an answer. The book at this link seems to do a reasonable job with DSGE and its components. https://www.amazon.com/Structural-Macroeconometrics-David-N-DeJong/dp/069115287X. There may be better ones but it looks decent.
mark leeds
<mathematical-economics><dynamic-programming><optimal-control>
What is state space representation for DSGE modeling
manifold
# What is state space representation for DSGE modeling

(Asked by: username_0 on 2020-09-22)

I'm beginning with DSGE modeling, and a mathematical representation (perhaps trivial for most of the people that are more with this topic) is the space-state state representation of a dynamical model, like depicted [here](http://users.ox.ac.uk/%7Eexet2581/Boe/dsge_day3.ppt#:%7E:text=Blanchard%2DKahn%20condition,%2Dlooking%20(control)%20variables.) (s.2), or similar documents.

I have already read the [Wikipedia](https://en.wikipedia.org/wiki/State-space_representation) article about this topic, and I get the general idea (in this case applied to engineering). But I want a further explanation in how this applies in DSGE modeling, and if possible some literature (preferably economics-focused). The concrete question is what is a state-space representation, if possible with some of the intuition, its uses in economics (control theory), and some key insights about the notation.

Thank you!

**Tags:** mathematical-economics, dynamic-programming, optimal-control

> **Comments:**
> **username_1**: Hi: I think your question is too general which is why no one has provided an answer. The book at this link seems to do a reasonable job with DSGE and its components. https://www.amazon.com/Structural-Macroeconometrics-David-N-DeJong/dp/069115287X. There may be better ones but it looks decent.  

---

## 2 answers

### Answer by username_2 on 2020-10-24. Score: 3

This question is too broad as it stands. There is a longer answer already, but I think it is possible to deal with a core part of the question easily.

> The concrete question is what is a state-space representation, if possible with some of the intuition, its uses in economics (control theory)

My background is in control systems theory, where the notion of a state space representation developed. Optimal control theory, including the Kalman filter, was developed mainly in the 1960s. Economists have kept using the core ideas, but migrated off to their own standards of mathematical presentation.

A state space model is a canonical representation of a mathematical system. The idea is to take a model derived from underlying dynamics, and re-cast it into a standard format, so that existing tools can be applied to it.

In control theory, the standard canonical form of a nonlinear state space system is:
$$
x(t+1) = f(t, x(t), w(t)),
$$
$$
y(t) = g(t, x(t), w(t)),
$$
$$
x(0) = x\_0 \in R^n,
$$
with:

* $x(t)$ an n-dimensional state vector,
* $w(t)$ a vector of all external variables,
* $y(t)$ a vector of measured variables.

A fairly typical simplification is that the system is linear and time invariant, where the description collapses to:
$$
x(t+1) = A x(t) + B w(t),
$$
$$
y(t) = C x(t) + D w(t).
$$

Typical examples of external variables that appear in $w$ include:

* variables used to control the system (typically fixed by feedback rules),
* variables that disturb the state variables,
* noise that effects measurements.

The vector $w$ is often partitioned into groups corresponding to these cases, and the $B,C,D$ matrices are correspondingly partitioned.

Once we have the system in this format, we can then apply existing tools. A typical example is applying the Kalman filter to infer the state variable $x(t)$ from directly measured variables. Numerical toolboxes will give results based on the $[A,B,C,D]$ representation.

In economics, the variable $r^\*$ is typically inferred by the use of a Kalman filter (E.g., see [New York Fed r\* page](https://www.newyorkfed.org/research/policy/rstar)). This variable roughly corresponds to what was called “the natural rate of interest”, and cannot be measured directly. Instead, it needs to be inferred from measured variables. This example underlines why we need to differentiate between the state vector, and the variables that are directly measurable. The state vector includes all variables need for the dynamical description of the system, and not just variables that are measured.

(Note: control theory uses a somewhat unintuitive definition of “observable.” A variable is observable if its value can be inferred from measurements - even if it is not directly measured. Since observability is a mathematical requirement for the Kalman Filter to converge, this needs to kept in mind when reading documentation prepared by control engineers.)

As a final technical note, state space representations may not always exist. A key example in control theory are linear continuous time systems with a time delay. It would require an infinite number of states to represent a time delay, and so engineers are forced to either use frequency domain representations, or an approximation.


---

### Answer by username_3 on 2020-09-23. Score: 2

State Space Representations of Linear Systems:

<https://lpsa.swarthmore.edu/Representations/SysRepSS.html>

> As systems become more complex, representing them with differential equations or transfer functions becomes cumbersome. This is even more true if the system has multiple inputs and outputs. This document introduces the state space method which largely alleviates this problem. The state space representation of a system replaces an nth order differential equation with a single first order matrix differential equation.

> Advantages of this representation include:
>
> * The notation is very compact. Even large systems can be represented by two simple equations.
> * Because all systems are represented by the same notation, it is very easy to develop general techniques to solve these systems.
> * Computers easily simulate first order equations.

DSGEs are State-Space Models (see page 11 of 20 page presentation).

<https://www.karlwhelan.com/MAMacro/part10.pdf>

> In general, for a model to have well-defined econometric estimates, it is necessary that for every observable variable there be at least one unobservable shock. This can either take the form of a “measurement error” or else involve a shock in each equation with a clear structural interpretation.

> Log-linearised DSGE models with a mix of observable and unobservable variables are an example of state-space models. Recall that these models can be described using two equations.

> The first, known as the state or transition equation, describes how a set of unobservable state variables, S(t), evolve over time as follows:

> S(t) = FS(t−1) + u(t).

> The term u(t) can include either normally-distributed errors or perhaps zeros if the equation being described is an identity. We will write this as u(t) ∼ N(0,Σu) though Σu may not have a full matrix rank.

> The second equation in a state-space model, which is known as the measurement equation, relates a set of observable variables, Z(t), to the unobservable state variables

> Z(t) = HS(t) + v(t)

> Again, the term w(t) can include either normally-distributed errors or perhaps zeros if the equation being described is an identity. We will write this as v(t) ∼ N(0,Σv) though Σv may not have a full matrix rank.

In engineering the state-space representation is primarily a standard way to characterize the system in terms of standard matrix methods applied in software solvers. However the DSGE reference above says DSGEs are state-space models.

The 30 page working paper (2012) under this link has title Bayesian Estimation of DSGE Models:

<https://philadelphiafed.org/-/media/research-and-data/publications/working-papers/2012/wp12-4.pdf>

It provides a short history of DSGE Model Estimation then describes the application of a Canonical New Keynesian DSGE Model. Page 12 describes the state-space representation of the NKDSGE. This quote is insight into the Bayesian assumption that there is no "true" model for the system in contrast to the Frequentist assumption:

> Bayesians avoid having to assume there exists a true or correctly specified DSGE model because of the likelihood principle (LP). The LP is a foundation of Bayesian statistics and says that all evidence about a DSGE model is contained in its likelihood conditional on the data; see Berger and Wolpert (1988). Since the data’s probabilistic assessment of a DSGE model is summarized by its likelihood, the likelihoods of a suite of DSGE models possess the evidence needed to judge which “best” fit the data. Thus, Bayesian likelihood-based evaluation is consistent with the view that there is no true DSGE model because, for example, this class of models is afflicted with incurable misspecification.

So DSGE models are data in search of the most likely underlying system models. The state-space representation is a method to structure the search for a solution using numerical theory and methods.

Two academic references on DSGE models have mentioned Dynare open source software which runs DSGE simulations on an underlying platform.

<https://www.dynare.org/>

Questions are posted on the Dynare Forum:

<https://forum.dynare.org/>

PS - Despite this long answer I will add that my intuition as an electrical engineer and former commercial lawyer who follows financial markets as cash flow systems is as follows. When investors and credit dealers converge perceptions to "put risk on" in aggregate then balance sheets expand, cash flows increase, asset prices rise, good things happen, and GDP goes up. When investors take risk off and credit dealers converge to" take risk off" in aggregate then balance sheets attempt to unwind, cash flows decrease, asset prices fall, bad things happen, and GDP goes down or does not return to former rates of growth due to hysteresis in the behavior of intelligent agents. If perceptions do not converge then asset prices will be more stable and less prone to overshoot and collapse, but if perceptions converge to drive overshoot eventually they will converge to drive collapse in asset prices. Government spending, taxes, credit enhancements, and financial regulations or lack thereof can attenuate or amplify the market-based causes of overshoot and collapse patterns. The perceptions, decisions, and actions of intelligent agents are thus stochastic parameters endogenous to the financial and real economy and to an infinite possible number of toy DSGE models. The cell phone network has only so much bandwidth. Stochastic cell phone use patterns typically do not use up all the available bandwidth. One day an earth quake hit the East Coast. Stochastic use spiked when millions of people tried to call each other to discuss the quake. This "fat tail" event used up all the bandwidth in the cell phone network. Banks and other financial intermediaries (FI) are designed to provide credit and cash flow via the expansion of balance sheets with rising or steady asset prices. This is because assets are collateral for long term debt so when assets fall borrowers go underwater (negative equity) in their balance sheets. When investors all want to sell and few want to buy as asset prices collapse these intelligent agent inputs disrupt the liquidity and cash flow generating capacity of credit and money markets. Paradoxically the systemic market forces reduce and unwind balance sheet capacity when too many units demand liquidity at the same time which is a "fat tail" liquidity event.


---

