fitdi: Fit Dynamic Intervention Model

Description Usage Arguments Value Author(s) Examples

View source: R/fitdi.R

Description

The function FitDI will fit the dynamic Intervention Model based on the optimized likelihood value and corresponding delta in the function.

Usage

1
fitdi(z, T, xint, itype = c("step", "pulse"), delta = NA, delta0=NA,...)

Arguments

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

Value

Fixed delta or specific delta provided. Intervention output for the model

Author(s)

Jinkun Xiao and A. I. McLeod

Examples

1
2
3
4
5
6
####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)

dynia documentation built on May 29, 2017, 1:24 p.m.

Related to fitdi in dynia...