Date: Tue, 17 Jun 2003 02:38:58 0700
ReplyTo: Tomasz <zombek_1@YAHOO.COM>
Sender: "SAS(r) Discussion" <SASL@LISTSERV.UGA.EDU>
From: Tomasz <zombek_1@YAHOO.COM>
Organization: http://groups.google.com/
Subject: Calculating trend in Data step
ContentType: text/plain; charset=ISO88591
Dear SASL,
This time I wonder how to calculate a trend or extrapolate a line in a
data step.
Let's suppose my data:
time sales
1 56
2 50
3 56
4 59
5 55
6 58
7 59
8 60
9 63
10 62
11 63
12 65
My question is how to calculate the values for variable sales for next
12 months. Let's assume this will by done by trend line.One solution
is to use proc reg with model sales=time and then I got a trend
equation. Then I put 13 to the equation and I will have the value for
sales and so on...
Can you find a better way, in just one data step?
I will appreciate all suggestions,
Tom
