Date: Tue, 19 Oct 2010 00:26:00 +0100
Reply-To: "adel F." <adel_tangi@YAHOO.FR>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "adel F." <adel_tangi@YAHOO.FR>
Subject: proc arima
Content-Type: text/plain; charset=utf-8
Hi all,
I would be very thankful if you could comment on my pgm below. I have followed
example 7.2 (International airline passengers) in chapter 7 (the arima
procedure).
My problem is the following , I have a dataset on people being recruited for a
trial from January 08 to August 10. We aim to recruit 4500. My objective by
using proc arima is to predict the time I will need to acheive the target of
4500 by July 2012.
I have used time series analysis, I would be thankful if you could advise
whether the approach I have taken is correct or not, or whether the model I have
considered is correct or not.
Below is the dataset and the modelling
Thanks a lot
Adel
data mydataset;
retain time 0;
input date:monyy5. numpeople @@;
time = time + 1;
lag_people = LAG(numpeople);
xlog=log(numpeople);
format date monyy5.;
datalines;
Jan08 38
Feb08 33
Mar08 38
Apr08 37
May08 49
Jun08 48
Jul08 66
Aug08 47
Sep08 70
Oct08 66
Nov08 72
Dec08 41
Jan09 75
Feb09 89
Mar09 82
Apr09 70
May09 55
Jun09 76
Jul09 79
Aug09 49
Sep09 82
Oct09 85
Nov09 81
Dec09 64
Jan10 63
Feb10 98
Mar10 95
Apr10 75
May10 89
Jun10 96
Jul10 103
Aug10 69
;
run;
symbol i=join v=dot;
proc gplot data=mydataset;
plot numpeople* date =1;
run;
proc arima data=mydataset;
identify var=xlog(1,12) nlag=15;
estimate q=(1)(12) noconstant method=uls;
run;
forecast out=b lead=24 id=date interval=month noprint;
run;
data c;
set b;
x=exp(xlog);
forecast=exp(forecast +std*std/2);
l95=exp(l95);
u95=exp(u95);
run;
symbol1 i=none v=star;
symbol2 i=join v=circle;
symbol3 i=join v=none l=3;
proc gplot data=c;
where date >= '1JAN08'd;
plot x*date = 1 forecast * date = 2
l95 * date = 3 u95 * date = 3 /
overlay haxis= '1JAN08'd to '1AUG12'd by year;
run;
|