State-space models are models that use state variables to describe a system by a set of first-order differential or difference equations, rather than by one or more nth-order differential or difference equations. State variables x(t) can be reconstructed from the measured input-output data, but are not themselves measured during an experiment.
Questions tagged [state-space]
186 questions
1
vote
1 answer
When ets() is used, why R is not responding and crashes?
I am trying to find the best model to forecast the average monthly rainfall of a particular region.
So far I have used a a seasonal naive method and SARIMA. But when trying to run ets(), R crashes without producing an output.

noob
- 13
- 5
1
vote
1 answer
Where can I find the Scilab balanc() function to calculate the similarity transform to program it in Maxima
I'm trying to program the z-transform in wxMaxima which doesn't have it programmed but not by definition but by using the Scilab approach. Scilab to calculate the z-transform first converts the transfer function to the state space, after that the…

vram
- 85
- 8
1
vote
1 answer
state_cov is being ignored when using the Kalman filter in statsmodels
I am trying to create an affine term structure model derived from statsmodels.tsa.statespace.MLEModel (code below) which is initialized using least squares.
'''
class affine_term_structure(sm.tsa.statespace.MLEModel):
def __init__(self, yields,…

raghav
- 11
- 1
1
vote
1 answer
How to generate a state space model from data?
I am trying to identify a state space model from discrete time series data in Python using statsmodels library: statsmodel.tsa.statespace.sarimax.SARIMAX.
I need the matrices of the state space general form (here the statsmodel reference): from the …

giulia
- 13
- 3
1
vote
0 answers
How do estimate GARCH-M in state space form in R or Python language?
I need to estimate GARCH-M in state space form to find time varying risk aversion. The model is this:
Where r is the return of any asset.
I tried to estimate this model in Eviews, using Kalman filter, for the return of any asset, but the…

Alien
- 116
- 8
1
vote
1 answer
Passing matrix element as function handle
I have applied inverse laplace transform to a matrix and now it is a function of t. My goal is to substitute t value and get the result matrix. I intended this code to be pretty straight foward but I'm not getting it work. This is what I…

Rezik
- 31
- 5
1
vote
0 answers
How to implement special cases of state space models in dlm? Or how to obtain a Kalman-smoother from the FKF package?
I am trying to estimate a state-space model to obtain the potential output (y_p) from data on output (y) and the unemployment rate (u) using R. The model is already programmed in EViews and I simply want to reproduce its results. The model is…

samuel
- 11
- 3
1
vote
1 answer
Derive state space matrix from ODEs in Matlab
I would like to create Matlab codes that automatically convert ODEs to state space matrix. All I need is the A matrix and B matrix.
I have partially finished it and this is what it looks like. After I run this code, I copy and paste the result V…

EOFF
- 83
- 1
- 8
1
vote
0 answers
Python Statespace Calculation from Transfer Function
I have a simple transfer function in Matlab, i.e.:
num = [1,2,3]
den = [300,5000,80000]
sys_tf = tf(num,den)
then, I transform sys_tf into statespace form as;
sys_ss = ss(sys_tf)
The resulting system consists of;
>> sys_ss.A = [-16.67,…

xfile
- 11
- 1
1
vote
1 answer
How can I code a specific game in Prolog?
I have a problem with coding the program described below
Consider the following game. A board with three black stones, three white stones and an empty space is given. The goal of the game is to swap places of black pawns with white pawns. Moving…

Olga
- 61
- 3
1
vote
0 answers
Implementing Sequential Variational Autoencoder (State-Space Model) on TensorFlow
I'm currently trying to implement a version of variational autoencoder in a sequential setting. I work on TensorFlow with eager execution mode.
As the problem setting, I have two sequences of variables: action (2D) and observation (2D). It is…

lalala.yeyeye
- 51
- 4
1
vote
1 answer
DFS "Can Return Any Path"
This is from a practice AI exam from University of Berkeley, California.
The question posits
Consider the state space graph shown above. A is the start state and G
is the goal state. The costs for each edge are shown on the graph.
Each edge can be…

maddie
- 1,854
- 4
- 30
- 66
1
vote
0 answers
state space using package DLM and FKF
The state space model I am trying to implement is as follows:
$ y_t= CY + FF* X_t + Ve_t$
$(X_t-m0)= GG (X_{t-1}-m0) +W\eta_t$
In DLM I am using following modification (because DLM does not allow intercept in measurement and transition…

Sudarshan Kumar
- 11
- 2
1
vote
0 answers
R dse package and kalman filter
I starting with the package dse in R, my goal is to estimate matrix G and Q from a state space model:
z(t) =Fz(t-1) + Gu(t) + Kw(t-1)
y(t) = Hz(t) + w(t)
u_t is my input vector that I call tx_cho and which is defined quarterly and y_t is my output…

Tochoka
- 65
- 5
1
vote
1 answer
Using equationsToMatrix with functions (dependent variables)
I'm trying to find state space model of inverted (one piece) pendulum using the equationsToMatrix function. I'm using the following code:
%Declaration of Variables
syms x(t) t M m ddx(t) l th(t) ddth(t) dth(t) b1 b2 dx(t) F(t) I
%Nonlinear…

Isam Asaad
- 23
- 1
- 1
- 6