fitdi {dynia} | R Documentation |
The function FitDI will fit the dynamic Intervention Model based on the optimized likelihood value and corresponding delta in the function.
fitdi(z, T, xint, itype = c("step", "pulse"), delta = NA, delta0=NA,...)
z |
The series which we intend to fit the intervention model. |
T |
T denotes the start of the intervention in the model. |
xint |
xint denotes for the possible covariates included in the model.By default,xint=NA |
itype |
itype includes the type of the intervention:"step" and "pulse" intervention |
delta |
The optimization process will be incorporated if the specific delta is not provided. |
delta0 |
Optional with default=NA.P-value for null hypothesis:delta=delta0 will be provided when delta0 get value. |
... |
the supported argments for arima function could be put here |
Fixed delta or specific delta provided. Intervention output for the model
Jinkun Xiao and A. I. McLeod
####Casualties Intervention####
fitdi(z=casualties[,1],T=70,xint=scale(casualties[,2]),itype="s",order=c(1,0,0),
seasonal=list(order=c(0,0,1),period=12),delta0=0)
####Nile River Intervention####
fitdi(z=Nile,T=34,itype="p",order=c(0,0,1),delta=1)