<< reshape Time series series >>

Grocer >> Time series > seasdummy

seasdummy

create a seasonal dummy variable

CALLING SEQUENCE

dum=seasdummy(boun,subperiod)

PARAMETERS

Input

* boun = a (2x1) string vector of dates

* subperiod = a scalar corresponding the yearly period when the dummy variables is set to 1 (for instance 3 for a march-june-september-december dummy with monthly data)

 

Output

* dummy = a ts equal to 1 for the chosen season, O otherwise

DESCRIPTION

Creates a seasonal dummy variable equal to 1 over a define season, 0 over the rest of the period.

EXAMPLE

m3=seasdummy(['1970m1';'2007m3'],3) //  creates a seasonal dummy variable on the period going
// from the 1st month of 1970 until the the 3rd month of 2007, equal to 1 every third month
// of the year (on march therefore!) and 0 elsewhere.
q1=seasdummy(['1970q1';'2007q4'],1) // creates a seasonal dummy variable on the period going
// from the 1st quarter of 1970 until the the last quarter of 2007, equal to 1 every first quarter and 0 elsewhere

AUTHOR

Eric Dubois 2007

Report an issue
<< reshape Time series series >>