Date: Sun, 3 Aug 2008 14:02:21 -0400
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>"
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>"
Subject: Re: conditonally add/remove variables and numerical programming
On Sun, 3 Aug 2008 09:02:58 -0700, Learner <cnfengshuang@GMAIL.COM> wrote:
>I have a large set of time series data to process, variables include
>month, flow, and other values.
>For each month, if flow>0, then I will generate a variable a_month,
>where month refers to the particular month. I know how to generate
>this "a_month" variable now. (Thanks to the help I got here!) There
>will be a group of such variables for each year. For my computation, I
>need delete all these "a_month" at the end of each year, and I will
>repeat the same thing for the next year. I need to drop all the
>a_month variables to save the system resource.
>For each month, with the variables created above, I need to do a
>numerical "Goal seek" programming. Without, creating/deleting the
>variables correctly, now I couldn't do this.
>Basically, what I want to do is as below:
>=> create a new variable "a_month" for this month
>=> use all the up-to-current "a_month" variables to do numerical "Goal
>=>...(Do this for each month during a year)
>=> at year end, delete all the previous "a_month" variables
>=>create a new "a_month" variable in the first month of the following
>=>repeat the above routine for each year.
>What I know now, is to create global "a_month" variables. But I hope
>to execute the program month by month, instead of having a "a_month"
>variable for all the month. Could anyone help me? Thanks a lot!!
Please post an example and indicate what language you intend to use (DATA
step, IML, ...).