Date: Thu, 24 Aug 2006 09:53:47 -0500
Reply-To: OR Stats <stats112@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: OR Stats <stats112@GMAIL.COM>
Subject: Re: Dynamic Selection of Blocks from Dataset Table by row number
In-Reply-To: <200608221737.k7MAliER014717@mailgw.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Thank you so much for your comments. That is a very good fix that works,
Howard. Greatly appreciate it.
And giving more thought to David's first comment, it would be great to code
all in 1 environment, but as you pointed out SAS may not be the best
environment in doing so. So if we wanted to estimate and iterate thru
models and glean from the results continuously, would you recommend then to
code C or the like in say Codewarrior and then call SAS in my C code and
have SAS say export the results back for processing? In running successive
models that updates w.r.t. results from the prior model is heart of the
question. And doing this w. minimal comp time and data prep of course is
ideal. Thanks again.
On 8/22/06, Howard Schreier <hs AT dc-sug DOT org> <nospam@howles.com>
wrote:
>
> On Tue, 22 Aug 2006 04:28:20 -0500, OR Stats <stats112@GMAIL.COM> wrote:
>
> >Hi Howard,
> >
> >Thank you also for the input to this problem! A second data set that I
> am
> >finding difficulty in creating is one which someone else had written
> about,
> >but I couldn't find it on our List Serve. The basic cusp of the problem
> is
> >again recursion in a dataset. The pseudo code:
> >
> >DATA temp;
> >
> > /*read from a dataset that already exists*/
> > set mydata;
> >
> > /*initialize a forthcoming recursive variable or col so that the
> first
> >obs or row is set to a constant*/
> > x=.001;
> >run;
> >
> >DATA mydata2;
> >
> > /*read temp that contain the other data and initialization of
> variable
> >x, which I make recursive in this step*/
> > set temp;
> >
> > /* x col is created by iterative lags of itself and an
> exogeneous
> >col found in the mydata set*/
> > x = a*lag(y)**2 + b*lag(x);
> > /*where a and b are constants, and y is the variable that
> originally
> >came from mydata*/
> >RUN;
> >
> >So that in the first row, X = .001, but in the second row,
> >X_obs2 = a*(Y_obs1)^2 + b*(.001). And in the third row,
> >X_obs3 = a*(Y_obs2)^2+ b*(X_obs2).
> >
> >But unfortunately, the pseudo code doesn't work properly.
>
> So please show the code which you ran, and the evidence for "doesn't work
> properly", which is unhelpfully vague. A sample of MYDATA would also be
> useful.
>
> >Suggestions from
> >the Group will be really helpful! Many thanx
>
> [snip]
>
|