Thanks
--
View this message in context: http://r.789695.n4.nabble.com/simulating-stable-VAR-process-tp4261177p4261177.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-h...@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
My problem is that I want to generate such processes...
When I try to generate random VAR(p) processes they seems to explode
(clearly they are not weakly stationary...)
Is there a way somebody know?
--
View this message in context: http://r.789695.n4.nabble.com/simulating-stable-VAR-process-tp4261177p4261210.html
Beware that the condition Modulus <1 depends on whether your lagged
parameters are specified on the left or right side of the equation. This
changes the sign of the lag parameters and inverts the condition. Dse
assumes lagged terms are specified on the left side, which is a bit
unusual compared to introductory text books. However, when you get to
hard problems it has advantages because the AR term is a matrix
polynomial ring and so it is easier to apply some useful mathematics.
Paul
Date: Wed, 4 Jan 2012 05:17:05 -0800 (PST)
From: statquant2<stat...@gmail.com>
To:r-h...@r-project.org
Subject: Re: [R] simulating stable VAR process
Message-ID:<1325683025141...@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii
More specifically.
I know that a condition for a VAR(p) process to be stable (weakly
stationary) is that the companion form of the equation (see AWESOME Pfaff
book analysis of integrated and cointegrated time series in R) as
eigenvalues of modulus<1.
My problem is that I want to generate such processes...
When I try to generate random VAR(p) processes they seems to explode
(clearly they are not weakly stationary...)
Is there a way somebody know?
______________________________________________
We know a condition that assure that it is stable (see first message) but
this is not a condition on coefficients etc...
What I want is
generate say a 1000 random VAR(3) processes over say 500 time periods that
will be STABLE (meaning If I run stability() all will pass the test)
When I try to do that it seems that none of the VAR I am generating pass
this test, so I assume that the class of stable VAR(p) is very small
compared to the whole VAR(p) process.
--
View this message in context: http://r.789695.n4.nabble.com/simulating-stable-VAR-process-tp4261177p4291835.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
1 Draw a set of random eigenvalues with modulus < 1
2 Draw a set of random eigenvalues vectors.
3 From these you can, with some matrix manipulations, derive the
corresponding Var coefficients.
If your original coefficients were drawn at random I suspect that the VAR
would not be stable. I am curious about what you are trying to do.
John
--
John C Frain
Economics Department
Trinity College Dublin
Dublin 2
Ireland
www.tcd.ie/Economics/staff/frainj/home.html
mailto:fra...@tcd.ie
mailto:fra...@gmail.com
[[alternative HTML version deleted]]
As I understand the question it is not to test if a VAR is stable but how
to construct a VAR that is stable and automatically satisfies the condition
Mark has taken from Lutkohl. The algorithm that I have set out will
automatically satisfy that condition.The matrix that should be "estimated
by the algorithm is A on the last line of page 15 of Lutkepohl.
Incidentally the corresponding matrix for the example on page 15 is
singular. The algorithm that I have set out will only lead to systems with
a non-singular matrix.
I still don't see how a matrix generated in this way corresponds to a real
economic system. Of course you may have some other constraints in mind
that would make the generated system correspond to something more real.
John
On Saturday, 14 January 2012, Mark Leeds <markl...@gmail.com> wrote:
> Hi statquant2 and john: In the first chapter of Lutkepohl, it is shown
that stability f
> a VAR(p) is the same as
>
> det(I_k - A1z - .... Ap Z^p ) does not equal zero for z < 1.
>
> where I_k - A1z - ... Ap z^p is referred to as the reverse characteristic
polynomial.
>
> So, statquant2, given your A's, one way to do it but be would be to
check the roots of the
> polynomial implied by taking the determinant of the your polynomial.
>
> There's an example on pg 17 of lutkepohl if you have it. If you don't, I
can fax it to you
> over the weekend if you want it.
This should be reasonably straightforward. In the simplest case you wih to
draw a random complex number in the unit circle. This is best done in polar
coordinates.
If r is a random mumber on (0,1) and theta a random number on (0, 2 Pi)
then if x=r cos(theta) and y= r sin(theta), x + i y is inside the unit
circle. As such roots come in conjugate pairs a second is x-iy. If you
then need an odd number of roots the final can simply be a random number on
(0,1). You do not need to use a uniform distribution but can use any
distribution on the required intervals or restrain more or the eigenvalues
to be real.
John
On Sunday, 15 January 2012, Mark Leeds <markl...@gmail.com> wrote:
> hi john. I think I follow you. but , in your algorithm, it is
straightforward to
> generate a set of eigenvalues with modulus less than 1 ? thanks.