Date: Tue, 21 Sep 2010 14:11:29 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: what is wrong with this code?
In-Reply-To: <AANLkTimhq7neGiWDm+yV27VvSCmXtG_vttpOtWb4tnib@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Can you just set ALL of the datasets together, and then use a WHERE
statement to only include records with a significant predictor? I don't use
regression, so I don't know how these datasets come out, but it should be
possible to do something like this, not using macro code at all.
-Joe
On Tue, Sep 21, 2010 at 1:58 PM, Jeff <zhujp98@gmail.com> wrote:
> Thanks,
> Yes, I am trying to conditionally create a dataset. I have about 100
> regression results datasets, I am trying to pick the all datasets with
> predictor &con being significant.
> how can I do "o the conditional bit in your first step"?
> Thanks,
> Jeff
>
>
>
> On Tue, Sep 21, 2010 at 2:42 PM, Joe Matise <snoopy369@gmail.com> wrote:
>
>> How can a character value be less than a numeric value, among other
>> things; and macro variables don't use decimals in regular evaluations. You
>> should really be using a data step to work that out anyway.
>>
>> What are you trying to achieve? Your code doesn't really make sense to
>> me. Are you trying to conditionally create a single dataset? If so then
>> just do the conditional bit in your first step, if nothing else...
>>
>> -Joe
>>
>>
>> On Tue, Sep 21, 2010 at 1:37 PM, Jeff <zhujp98@gmail.com> wrote:
>>
>>> Why %if "&cutoff"<=0.05 %then %do;
>>> can never be true?
>>> Thanks.
>>> Jeff
>>>
>>> On Tue, Sep 21, 2010 at 2:14 PM, Data _null_; <iebupdte@gmail.com>
>>> wrote:
>>>
>>> > Also this statement can never be true.
>>> >
>>> > %if "&cutoff"<=0.05 %then %do;
>>> >
>>> > Please, RTM regarding macro expressions.
>>> >
>>> > On Tue, Sep 21, 2010 at 1:05 PM, Jeff <zhujp98@gmail.com> wrote:
>>> > > %macro m;
>>> > > data _null_;
>>> > > set param.&desc.&con.;
>>> > > if variabe="&con." then do;
>>> > > call symput("cutoff", probt);
>>> > > end;
>>> > > run;
>>> > >
>>> > > %put &cutoff;
>>> > > %if "&cutoff"<=0.05 %then %do;
>>> > > data sigparam.&desc.&con.;
>>> > > set param.&desc.&con;
>>> > > %end;
>>> > > run;
>>> > > %mend;
>>> > >
>>> > >
>>> > >
>>> > > WARNING: Apparent symbolic reference CUTOFF not resolved.
>>> > > &cutoff
>>> > > WARNING: Apparent symbolic reference CUTOFF not resolved.
>>> > >
>>> > > NOTE: There were 18 observations read from the data set
>>> > > PARAM.CONTINUEMPRLEVELC1I7.
>>> > > NOTE: The data set SIGPARAM.CONTINUEMPRLEVELC1I7 has 18 observations
>>> and
>>> > 9
>>> > > variables.
>>> > > NOTE: Compressing data set SIGPARAM.CONTINUEMPRLEVELC1I7 decreased
>>> size
>>> > by
>>> > > 0.00 percent.
>>> > > Compressed is 1 pages; un-compressed would require 1 pages.
>>> > > NOTE: DATA statement used (Total process time):
>>> > > real time 0.01 seconds
>>> > > cpu time 0.01 seconds
>>> > >
>>> >
>>>
>>
>>
>
|