Forecasting using SAS Forecast Server, SAS/ETS, and more

proc ucm forecast breakdown

Reply
Frequent Contributor
Posts: 126

proc ucm forecast breakdown

Hi all,

I am kinda stuck at something and i would appreciate any help available.

I have ran a proc ucm for some sales data using a variable like promotion as well as level ,trend and season.

I proceed with a forecast to test my models fit.

In the outfor dataset i cant seem to be able to see the contribution in the forecasted value that is generated from my x variable (promotion), i only see from the unobserved components,

What could i do? cause my goal is to show in the end that the forecasted value consists of lets say 20% level, 20% season and a percent of my x variable(promotion).

Kind regards,

SAS Employee
Posts: 416

Re: proc ucm forecast breakdown

Posted in reply to chemicalab

Hi -

Not sure if this is what you were asking for, but check out the code below.

Thanks,

Udo

DATA WORK.airline;

    LENGTH

        Passengers         8

        DATE               8 ;

    FORMAT

        Passengers       BEST10.

        DATE             DATE9. ;

    INFORMAT

        Passengers       BEST10.

        DATE             DATE9. ;

    INPUT

        Passengers DATE;

if date="01SEP2001"d then event=1;

else event=0;

DATALINES;

37208190 01JAN1990

36078394 01FEB1990

44154535 01MAR1990

41355578 01APR1990

41234923 01MAY1990

44190605 01JUN1990

46036310 01JUL1990

48866148 01AUG1990

38989264 01SEP1990

41247525 01OCT1990

39346113 01NOV1990

39342008 01DEC1990

36716670 01JAN1991

33688621 01FEB1991

39477477 01MAR1991

39878137 01APR1991

41018839 01MAY1991

43166181 01JUN1991

45727485 01JUL1991

47802583 01AUG1991

38628284 01SEP1991

41170282 01OCT1991

37451867 01NOV1991

41159310 01DEC1991

36719242 01JAN1992

35757887 01FEB1992

41861145 01MAR1992

39651142 01APR1992

41800746 01MAY1992

47431207 01JUN1992

51806387 01JUL1992

53163782 01AUG1992

42510606 01SEP1992

42253840 01OCT1992

39566414 01NOV1992

40849861 01DEC1992

38529065 01JAN1993

36539132 01FEB1993

43775242 01MAR1993

43125070 01APR1993

44300992 01MAY1993

46334965 01JUN1993

49482654 01JUL1993

50934128 01AUG1993

43364388 01SEP1993

45930858 01OCT1993

42769377 01NOV1993

43872406 01DEC1993

40665800 01JAN1994

39264392 01FEB1994

48963885 01MAR1994

46124425 01APR1994

47883199 01MAY1994

50554571 01JUN1994

54026538 01JUL1994

54735918 01AUG1994

46918744 01SEP1994

49220347 01OCT1994

46742038 01NOV1994

47700305 01DEC1994

44687190 01JAN1995

41896823 01FEB1995

50985658 01MAR1995

49212746 01APR1995

49824307 01MAY1995

52881186 01JUN1995

54957670 01JUL1995

56585046 01AUG1995

47709592 01SEP1995

50595784 01OCT1995

48310520 01NOV1995

49158213 01DEC1995

45722827 01JAN1996

47130093 01FEB1996

55909079 01MAR1996

52390127 01APR1996

53777332 01MAY1996

56095234 01JUN1996

58058659 01JUL1996

59802408 01AUG1996

49758328 01SEP1996

53679750 01OCT1996

48464209 01NOV1996

53181172 01DEC1996

49228750 01JAN1997

47152265 01FEB1997

58163010 01MAR1997

53944329 01APR1997

55635847 01MAY1997

58172771 01JUN1997

61153800 01JUL1997

61907945 01AUG1997

51761004 01SEP1997

55026915 01OCT1997

51524528 01NOV1997

53801076 01DEC1997

49493435 01JAN1998

47935244 01FEB1998

58134392 01MAR1998

56871713 01APR1998

57787100 01MAY1998

60218576 01JUN1998

64890982 01JUL1998

62715323 01AUG1998

52507440 01SEP1998

56988546 01OCT1998

53904572 01NOV1998

55301435 01DEC1998

50996487 01JAN1999

49598613 01FEB1999

61104493 01MAR1999

58753327 01APR1999

59026650 01MAY1999

62607968 01JUN1999

66663065 01JUL1999

65309471 01AUG1999

55473871 01SEP1999

60425711 01OCT1999

58067248 01NOV1999

56156443 01DEC1999

51750091 01JAN2000

53589785 01FEB2000

64948291 01MAR2000

61998314 01APR2000

64349644 01MAY2000

67807620 01JUN2000

69852555 01JUL2000

68484270 01AUG2000

58107878 01SEP2000

62153577 01OCT2000

60213479 01NOV2000

57943798 01DEC2000

55108316 01JAN2001

52915977 01FEB2001

65068044 01MAR2001

62373365 01APR2001

62622321 01MAY2001

66193520 01JUN2001

69529176 01JUL2001

70133361 01AUG2001

38730506 01SEP2001

47746624 01OCT2001

48250267 01NOV2001

49816945 01DEC2001

47844272 01JAN2002

47055580 01FEB2002

59210469 01MAR2002

55059178 01APR2002

57283840 01MAY2002

60462592 01JUN2002

63263816 01JUL2002

63450360 01AUG2002

49890724 01SEP2002

58113746 01OCT2002

54351302 01NOV2002

60266707 01DEC2002

53399694 01JAN2003

50187136 01FEB2003

60504638 01MAR2003

56394469 01APR2003

58730501 01MAY2003

63367220 01JUN2003

68449976 01JUL2003

66720119 01AUG2003

54119709 01SEP2003

60225641 01OCT2003

56951134 01NOV2003

49866044.9 01DEC2003

44223734 01JAN2004

45343339 01FEB2004

;run;

proc ucm data = airline;

   id date interval = month;

   model passengers = event;

   irregular;

   level;

   slope var = 0 noest;

   season length = 12 type=trig;

   estimate outest=est;

   forecast back=12 lead=12 plot=(decomp forecasts) outfor=for;

run;

data _null_;

set est;

if upcase(component) = upcase("event") then do;

  call symput('eventParm', estimate);

  call symput('eventParmStd', std);

end;

run;

data adjust(keep=date event contrib stdContrib);

set airline(keep=date event);

est = symgetn('eventParm');

    std = symgetn('eventParmStd');

    contrib = est*event;

    stdContrib = std*abs(event);

run;

Ask a Question
Discussion stats
  • 1 reply
  • 438 views
  • 0 likes
  • 2 in conversation