The R Project SVN R

Rev

Rev 60908 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 60908 Rev 61160
Line 60... Line 60...
60
require(graphics)
60
require(graphics)
61
 
61
 
62
arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
62
arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
63
          sd = sqrt(0.1796))
63
          sd = sqrt(0.1796))
64
# mildly long-tailed
64
# mildly long-tailed
65
arima.sim(n = 63, list(ar=c(0.8897, -0.4858), ma=c(-0.2279, 0.2488)),
65
arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
66
          rand.gen = function(n, ...) sqrt(0.1796) * rt(n, df = 5))
66
          rand.gen = function(n, ...) sqrt(0.1796) * rt(n, df = 5))
67
 
67
 
68
# An ARIMA simulation
68
# An ARIMA simulation
69
ts.sim <- arima.sim(list(order = c(1,1,0), ar = 0.7), n = 200)
69
ts.sim <- arima.sim(list(order = c(1,1,0), ar = 0.7), n = 200)
70
ts.plot(ts.sim)
70
ts.plot(ts.sim)