The simulate function in dse lets you specify the model and the distribution of the noise term (or even their values so you can get any distribution you like). So, you should be able to do what you want, with either a VAR(p) or a vector ARMA process. If you are getting a process that explodes then your model is probably not stable. If it is a dse TSmodel you can check it with stability(), see ?stability in dse.

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<statqu...@gmail.com>
To:r-help@r-project.org
Subject: Re: [R] simulating stable VAR process
Message-ID:<1325683025141-4261210.p...@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?

______________________________________________
R-help@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.

Reply via email to