Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cds<- structure(c(2580L, 2263L, 3679L, 3461L, 3645L, 3716L, 3955L,
- 3362L, 2637L, 2524L, 2084L, 2031L, 2256L, 2401L, 3253L, 2881L,
- 2555L, 2585L, 3015L, 2608L, 3676L, 5763L, 4626L, 3848L, 4523L,
- 4186L, 4070L, 4000L, 3498L), .Dim = c(29L, 1L), .Dimnames = list(
- NULL, "CD"), .Tsp = c(2012, 2014.33333333333, 12), class = "ts")
- fit4 <- arimax(log(cds), order = c(1,1,0),include.mean=FALSE,
- xtransf = data.frame(Oct13 = 1*(seq_along(cds)==22)),
- transfer = list(c(1,0))
- ,xreg=1*(seq_along(cds)==3))
- fit4
- # ARIMA(1,1,0)
- # Coefficients:
- # ar1 xreg Oct13-AR1 Oct13-MA0
- # -0.0184 0.2718 0.4295 0.4392
- # s.e. 0.2124 0.1072 0.3589 0.1485
- # sigma^2 estimated as 0.02176: log likelihood=13.85
- # AIC=-19.71 AICc=-16.98 BIC=-13.05
- int_vect1<-1*(seq_along(cds)==22)
- wo<- 0.4392
- delta<-0.4295
- mt<-rep(0,length(int_vect1))
- for (i in 1:length(int_vect1))
- {
- if (i>1)
- {
- mt[i]<-wo*int_vect1[i]+delta*mt[i-1]
- }
- }
- mt
- sum(exp(fitted(fit4)) - (exp(fitted(fit4) - mt)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement