P contains the poles, and Q contains the zeroes, or nills. In this post, I use only Q = 1.
The criterion for stability is that all roots of P is in the unit circle. To get a uniform sampling from the unit circle, we can sample an angle from a uniform distribution, and an absolute value from a triangle distribution (since the density must increase linearly with the absolute value). The code:
This output format fits perfectly into the ArmaProcess object from statsmodels.
![]() |
Random stable AR process from 5 pairs of poles. |
Inga kommentarer:
Skicka en kommentar