1/I have data monthly from 2000m01 2015m12, my probleme is to create some series contained numbers of day, weeks, or nombers of weekday (Mondays, Tuesdays,..., Sundays) in month or in quarterly, and make the sum by row or by function for my seris "x_07" with the following code: (the code doesn't work correctly for the some parts )

Code: Select all

`' part 1 trade`

for !i=1 to 7

series d_0!i=@weekday(!i)

next

group g1 d*

equation eq_trade.ls y c g1

series x_07=@sum({d_0!i}) 'sum of d_* by row

'part 2 model01

for !j=1 to 6

series x_0!j=d_0!i-x_07

next

group g2 x*

equation eq_model01a.ls y c g2

'tpart 3 model01 regular diff

equation eq_model01d.ls d(y) d(g2)

'part 4 model02 with regular and seasonal diff

equation eq_model02ds.ls d(y,1,12) d(g2,1,12)

' part 5 model03: ma(1)

equation eq_model03dsma.ls d(y,1,12) d(g2,1,12) ma(1)

' part 6 model04: ma(1) and sma(12)

equation eq_model03dsmas.ls d(y,1,12) d(g2,1,12) ma(1) sma(12)

' part 7 final model

equation eq_model05dsmas.ls d(y,1,12) d(g2,1,12) ar( 1 to 2) ma(1) sma(12)

the series d_01 should contained:

2000m01 5

2000m02 4

....etc

5 and 4 represent the number of Mondays for each month, d_02 contained numbers of Tuesdays for each month,...etc.

how can make the sum of the series by row or by function date "x_07" of d_01+...+d_07.

2/ In general case when frequency is monthly or quarterly by functions:

how can genarate series contained the number of days in month or in quarterly by function not by @sum?

how can genarate series contained number of Mondays, Tuesdays,..., Sundays in a month or in quarterly by function (not d01+d_02...+d_07)?

how can genarate series contained number of weeks in month or in quarterly?

any help would be appreciated