Displaying 2 results from an estimated 2 matches for "tgarchgen".
2009 Nov 02
1
AR Simulation with non-normal innovations - Correct
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
2009 Nov 04
0
Help with a Loop in function
Dear Users,
I follow Andreas idea to simulate an ar(1) model with a new kind of innovation process.
The new argument rand.gen, for the arima.sim function, I'm trying to generate as:
tGarchGen <- function(a, b, c) {
# must return a vector of random deviates (eta(t))
for (t in 1:100){
z(t) <- c+a*(eta(t)^2)+b*z(t-1)
eta(t) <-rt(100, 5)*sqrt(z(t)) #rt is the R random t-Student generator function rt(n,df)
}
}
arModel <- list(ar=0, ma = 0, order = c(0, 1, 0))
arima....