LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 17 Jun 2003 02:38:58 -0700
Reply-To:     Tomasz <zombek_1@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Tomasz <zombek_1@YAHOO.COM>
Subject:      Calculating trend in Data step
Content-Type: text/plain; charset=ISO-8859-1

Dear SAS-L,

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,


Back to: Top of message | Previous page | Main SAS-L page