Date: Mon, 18 Mar 2002 01:36:53 GMT
Reply-To: Arthur Tabachneck <atabachneck@ROGERS.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <atabachneck@ROGERS.COM>
Subject: Re: logical operator
Content-Type: multipart/alternative;
This is a multi-part message in MIME format.
------=_NextPart_000_0010_01C1CDF3.71BDDDA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I would change the line:
if {lp(i)> 0 & up(i)> 0} OR {lp(i) < 0 & up(i) < 0}then output =
nboundtheta;
to, just: if {lp(i)> 0 & up(i)> 0} OR {lp(i) < 0 & up(i) < 0};
shireen p <shireenp@HOTMAIL.COM> wrote in message =
news:F150e8XoAifH68lH1eM000075ae@hotmail.com...
Hello;
Could anyone tell me why when I execute these statements below the =
datafile nboundtheta contains cases that contain values that cater to =
the logical statement=20
if {lp(i)> 0 & up(i)> 0} OR {lp(i) < 0 & up(i) < 0}then output =
nboundtheta;
as well as produces all the cases present in the datafile remainof. I =
would like to have the dataset nboundtheta only to contain intervals =
that do not contain zero. Is there any other way I can do this. Any help =
is appreciated.
Thank you,
Shireen
data nboundtheta;
set remainof;
array lp(6)lp1-lp6;
array up(6)up1-up6;
array theta(6) p10-p15;
array mean2(6,1);
array mean1(6,1);
array vams(6) ms10-ms15;
do i =3D 1 to 6;
mean1(i,1)=3Dvams(i);
mean2(i,1)=3Dmean1(i,1)*2;
lp(i)=3Dtheta(i)- mean2(i,1);
up(i)=3Dtheta(i)+mean2(i,1);
if theta(i)LT 0 then do;
if {lp(i)> 0 & up(i)> 0} OR {lp(i) < 0 & up(i) < 0}then output =
nboundtheta;
end;
end;
proc print data=3Dnboundtheta (keep=3Drep lp1-lp6 up1-up6 p10-p15) ;
title 'nonboundary';
run;=20
-------------------------------------------------------------------------=
-----
Chat with friends online, try MSN Messenger: Click Here
------=_NextPart_000_0010_01C1CDF3.71BDDDA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<P><FONT size=3D2>I would change the line:</FONT></P>
<P><STRONG><FONT color=3D#ff0066><FONT face=3D"Courier New"><FONT =
size=3D2>if=20
{lp(i)> </FONT></FONT><FONT face=3D"Courier New"><FONT=20
size=3D2>0</FONT></FONT><FONT size=3D2><FONT face=3D"Courier New"> & =
up(i)>=20
</FONT><FONT face=3D"Courier New">0</FONT></FONT></FONT><FONT =
size=3D2><FONT=20
color=3D#ff0066><FONT face=3D"Courier New">} OR {lp(i) < =
</FONT><FONT=20
face=3D"Courier New">0</FONT></FONT><FONT size=3D2><FONT face=3D"Courier =
New"> &=20
up(i) < </FONT><FONT face=3D"Courier =
New">0</FONT></FONT></FONT></STRONG><FONT=20
face=3D"Courier New"><FONT color=3D#ff0066 size=3D2><STRONG>}then output =
nboundtheta;</STRONG></FONT></P>
<P></FONT><FONT face=3DArial>to, just: <STRONG><FONT =
color=3D#ff0066><FONT=20
face=3D"Courier New"><FONT size=3D2> if {lp(i)> =
</FONT></FONT><FONT=20
face=3D"Courier New"><FONT size=3D2>0</FONT></FONT><FONT size=3D2><FONT=20
face=3D"Courier New"> & up(i)> </FONT><FONT=20
face=3D"Courier New">0</FONT></FONT></STRONG></FONT><FONT =
size=3D2><STRONG><FONT=20
color=3D#ff0066><FONT face=3D"Courier New">} OR {lp(i) < =
</FONT><FONT=20
face=3D"Courier New">0</FONT></FONT><FONT size=3D2><FONT face=3D"Courier =
New"> &=20
up(i) < </FONT><FONT face=3D"Courier =
New">0</FONT></FONT></STRONG></FONT><FONT=20
face=3D"Courier New"><FONT color=3D#ff0066 =
size=3D2><STRONG>};</STRONG></FONT></P>
<P></FONT></FONT></FONT>shireen p <<A=20
href=3D"mailto:shireenp@HOTMAIL.COM">shireenp@HOTMAIL.COM</A>> wrote =
in message=20
<A=20
href=3D"news:F150e8XoAifH68lH1eM000075ae@hotmail.com">news:F150e8XoAifH68=
lH1eM000075ae@hotmail.com</A>...</P></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV>
<DIV><FONT color=3D#000080 face=3D"Courier New">
<P><FONT size=3D2><STRONG>Hello;</STRONG></FONT></P>
<P><FONT size=3D2>Could anyone tell me why when I execute these =
statements below=20
the datafile <EM><STRONG>nboundtheta</STRONG></EM> contains cases that =
contain=20
values that cater to the logical statement </P>
<P><STRONG><FONT color=3D#ff0066><FONT face=3D"Courier New"><FONT =
size=3D2>if=20
{lp(i)> </FONT></FONT><FONT face=3D"Courier New"><FONT=20
size=3D2>0</FONT></FONT><FONT size=3D2><FONT face=3D"Courier New"> =
& up(i)>=20
</FONT><FONT face=3D"Courier New">0</FONT></FONT></STRONG></FONT><FONT =
size=3D2><STRONG><FONT color=3D#ff0066><FONT face=3D"Courier =
New">} OR {lp(i)=20
< </FONT><FONT face=3D"Courier New">0</FONT></FONT><FONT =
size=3D2><FONT=20
face=3D"Courier New"> & up(i) < </FONT><FONT=20
face=3D"Courier New">0</FONT></FONT></STRONG></FONT><FONT=20
face=3D"Courier New"><FONT color=3D#ff0066 size=3D2><STRONG>}then =
output=20
nboundtheta;</STRONG></FONT></P>
<P></FONT>as well as produces all the cases present in the datafile=20
<EM><STRONG>remainof</STRONG></EM>. I would like to have the dataset=20
<EM><STRONG>nboundtheta</STRONG></EM> only to contain intervals that =
do not=20
contain zero. Is there any other way I can do this. Any help is=20
appreciated.</P>
<P>Thank you,</P>
<P>Shireen</P>
<P></FONT><FONT size=3D2><STRONG>data</STRONG></FONT></FONT><FONT=20
face=3D"Courier New"><FONT =
size=3D2> nboundtheta;</FONT></P></FONT>
<P><FONT color=3D#0000ff face=3D"Courier New"><FONT =
size=3D2>set</FONT></FONT><FONT=20
face=3D"Courier New"><FONT size=3D2> remainof;</FONT></P></FONT><FONT=20
color=3D#0000ff face=3D"Courier New">
<P><FONT size=3D2>array</FONT></FONT><FONT size=3D2><FONT =
face=3D"Courier New">=20
lp(</FONT><B><FONT color=3D#008080 face=3D"Courier =
New">6</B></FONT></FONT><FONT=20
face=3D"Courier New"><FONT size=3D2>)lp1-lp6;</FONT></P></FONT><FONT =
color=3D#0000ff=20
face=3D"Courier New">
<P><FONT size=3D2>array</FONT></FONT><FONT size=3D2><FONT =
face=3D"Courier New">=20
up(</FONT><B><FONT color=3D#008080 face=3D"Courier =
New">6</B></FONT></FONT><FONT=20
face=3D"Courier New"><FONT size=3D2>)up1-up6;</FONT></P></FONT><FONT =
color=3D#0000ff=20
face=3D"Courier New">
<P><FONT size=3D2>array</FONT></FONT><FONT size=3D2><FONT =
face=3D"Courier New">=20
theta(</FONT><B><FONT color=3D#008080=20
face=3D"Courier New">6</B></FONT></FONT><FONT face=3D"Courier =
New"><FONT size=3D2>)=20
p10-p15;</FONT></P></FONT><FONT color=3D#0000ff face=3D"Courier New">
<P><FONT size=3D2>array</FONT></FONT><FONT size=3D2><FONT =
face=3D"Courier New">=20
mean2(</FONT><B><FONT color=3D#008080=20
face=3D"Courier New">6</B></FONT></FONT><FONT size=3D2><FONT=20
face=3D"Courier New">,</FONT><B><FONT color=3D#008080=20
face=3D"Courier New">1</B></FONT></FONT><FONT face=3D"Courier =
New"><FONT=20
size=3D2>);</FONT></P></FONT><FONT color=3D#0000ff face=3D"Courier =
New">
<P><FONT size=3D2>array</FONT></FONT><FONT size=3D2><FONT =
face=3D"Courier New">=20
mean1(</FONT><B><FONT color=3D#008080=20
face=3D"Courier New">6</B></FONT></FONT><FONT size=3D2><FONT=20
face=3D"Courier New">,</FONT><B><FONT color=3D#008080=20
face=3D"Courier New">1</B></FONT></FONT><FONT face=3D"Courier =
New"><FONT=20
size=3D2>);</FONT></P></FONT><FONT color=3D#0000ff face=3D"Courier =
New">
<P><FONT size=3D2>array</FONT></FONT><FONT size=3D2><FONT =
face=3D"Courier New">=20
vams(</FONT><B><FONT color=3D#008080 face=3D"Courier =
New">6</B></FONT></FONT><FONT=20
face=3D"Courier New"><FONT size=3D2>) =
ms10-ms15;</FONT></P></FONT><FONT=20
color=3D#0000ff face=3D"Courier New">
<P><FONT size=3D2>do</FONT></FONT><FONT size=3D2><FONT face=3D"Courier =
New"> i =3D=20
</FONT><B><FONT color=3D#008080 face=3D"Courier =
New">1</B></FONT></FONT><FONT=20
size=3D2><FONT face=3D"Courier New"> </FONT><FONT color=3D#0000ff=20
face=3D"Courier New">to</FONT><FONT face=3D"Courier New"> =
</FONT><B><FONT=20
color=3D#008080 face=3D"Courier New">6</B></FONT></FONT><FONT=20
face=3D"Courier New"><FONT size=3D2>;</FONT></P>
<P><FONT size=3D2>mean1(i,</FONT></FONT><B><FONT color=3D#008080=20
face=3D"Courier New"><FONT size=3D2>1</FONT></B></FONT><FONT=20
face=3D"Courier New"><FONT size=3D2>)=3Dvams(i);</FONT></P>
<P><FONT size=3D2>mean2(i,</FONT></FONT><B><FONT color=3D#008080=20
face=3D"Courier New"><FONT size=3D2>1</FONT></B></FONT><FONT =
size=3D2><FONT=20
face=3D"Courier New">)=3Dmean1(i,</FONT><B><FONT color=3D#008080=20
face=3D"Courier New">1</B></FONT></FONT><FONT size=3D2><FONT=20
face=3D"Courier New">)*</FONT><B><FONT color=3D#008080=20
face=3D"Courier New">2</B></FONT></FONT><FONT face=3D"Courier =
New"><FONT=20
size=3D2>;</FONT></P>
<P><FONT size=3D2>lp(i)=3Dtheta(i)- mean2(i,</FONT></FONT><B><FONT =
color=3D#008080=20
face=3D"Courier New"><FONT size=3D2>1</FONT></B></FONT><FONT=20
face=3D"Courier New"><FONT size=3D2>);</FONT></P>
<P><FONT size=3D2>up(i)=3Dtheta(i)+mean2(i,</FONT></FONT><B><FONT =
color=3D#008080=20
face=3D"Courier New"><FONT size=3D2>1</FONT></B></FONT><FONT=20
face=3D"Courier New"><FONT size=3D2>);</FONT></P>
<P></FONT><FONT size=3D2><FONT color=3D#0000ff face=3D"Courier =
New">if</FONT><FONT=20
face=3D"Courier New"> theta(i)LT </FONT><B><FONT color=3D#008080=20
face=3D"Courier New">0</B></FONT></FONT><FONT size=3D2><FONT =
face=3D"Courier New">=20
</FONT><FONT color=3D#0000ff face=3D"Courier New">then</FONT><FONT=20
face=3D"Courier New"> </FONT><FONT color=3D#0000ff=20
face=3D"Courier New">do</FONT></FONT><FONT face=3D"Courier New"><FONT=20
size=3D2>;</FONT></P>
<P></FONT><STRONG><FONT color=3D#ff0066><FONT face=3D"Courier =
New"><FONT size=3D2>if=20
{lp(i)> </FONT></FONT><FONT face=3D"Courier New"><FONT=20
size=3D2>0</FONT></FONT><FONT size=3D2><FONT face=3D"Courier New"> =
& up(i)>=20
</FONT><FONT face=3D"Courier New">0</FONT></FONT></STRONG></FONT><FONT =
size=3D2><STRONG><FONT color=3D#ff0066><FONT face=3D"Courier =
New">} OR {lp(i)=20
< </FONT><FONT face=3D"Courier New">0</FONT></FONT><FONT =
size=3D2><FONT=20
face=3D"Courier New"> & up(i) < </FONT><FONT=20
face=3D"Courier New">0</FONT></FONT></STRONG></FONT><FONT=20
face=3D"Courier New"><FONT color=3D#ff0066 size=3D2><STRONG>}then =
output=20
nboundtheta;</STRONG></FONT></P>
<P></FONT><FONT size=3D2><FONT color=3D#0000ff face=3D"Courier =
New">end</FONT><FONT=20
face=3D"Courier New">;</P></FONT></FONT><FONT color=3D#0000ff =
face=3D"Courier New">
<P><FONT size=3D2>end</FONT></FONT><FONT face=3D"Courier New"><FONT=20
size=3D2>;</FONT></P></FONT><B><FONT color=3D#000080 face=3D"Courier =
New">
<P><FONT size=3D2>proc</FONT></B></FONT><FONT size=3D2><FONT =
face=3D"Courier New">=20
</FONT><B><FONT color=3D#000080 face=3D"Courier =
New">print</B></FONT></FONT><FONT=20
size=3D2><FONT face=3D"Courier New"> </FONT><FONT color=3D#0000ff=20
face=3D"Courier New">data</FONT><FONT face=3D"Courier =
New">=3Dnboundtheta (keep=3Drep=20
lp1-lp6 up1-up6 p10-p15) ;</P></FONT></FONT><FONT color=3D#0000ff=20
face=3D"Courier New">
<P><FONT size=3D2>title</FONT></FONT><FONT size=3D2><FONT =
face=3D"Courier New">=20
</FONT><FONT color=3D#800080 face=3D"Courier =
New">'nonboundary'</FONT><FONT=20
face=3D"Courier New">;</P></FONT></FONT><B><FONT color=3D#000080=20
face=3D"Courier New">
<P><FONT size=3D2>run</FONT></B></FONT><FONT face=3D"Courier =
New"><FONT size=3D2>;=20
</FONT></P></FONT></DIV></DIV><BR clear=3Dall>
<HR>
Chat with friends online, try MSN Messenger: <A=20
href=3D"http://g.msn.com/1HM305401/12">Click=20
Here</A><BR></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0010_01C1CDF3.71BDDDA0--