Thanks Andreas.
This is just the start point I was needing.
Best,
Rick
From: Andreas Hary
Sent: Tuesday, November 03, 2009 7:19 AM
To: Ricardo Gonçalves Silva
Subject: Re: [R] AR Simulation with non-normal innovations - Correct
Have a look at function arima.sim. It allows you to specify a random number
generator, so you could try something like the following:
arModel - list(ar = 0, ma = 0, order = c(0, 1, 0))
tGarchGen - function(a, b, c) {
# your stuff here, must return a vector of random deviates
}
arima.sim(arModel, n = 100, rand.gen = tGarchGen)
If you would like to generate a bunch of series, say 200, all at once try
mySeries - replicate(200, arima.sim(arModel, n = 100, rand.gen = tGarchGen))
HTH,
Andreas
2009/11/2 Ricardo Gonçalves Silva ricard...@terra.com.br
Dear Users,
I would like to simulate an AR(1) (y_t=ct1+y_t-1+e_t) model in R where the
innovations are supposed to follow a t-GARCH(1,1) proccess.
By t-GARCH I want to mean that:
e_t=n_t*sqrt(h_t) and
h_t=ct2+a*(e_t)^2+b*h_t-1.
where n_t is a random variable with t-Student distribution.
If someone could give some guidelines, I can going developing the model.
I did it in matlab, but the loops are very slowly, so I would like to try R.
Thanks in advance,
Rick
[[alternative HTML version deleted]]
__
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.
No virus found in this incoming message.
Checked by AVG - www.avg.com
05:51:00
[[alternative HTML version deleted]]
__
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.