| Date: | Sun, 17 Mar 2002 19:13:41 -0500 |
| Reply-To: | shireen p <shireenp@HOTMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | shireen p <shireenp@HOTMAIL.COM> |
| Subject: | logical operator |
| Content-Type: | text/html |
|---|
<html><div style='background-color:'><DIV><FONT face="Courier New" color=#000080>
<P><FONT size=2><STRONG>Hello;</STRONG></FONT></P>
<P><FONT size=2>Could anyone tell me why when I execute these statements below the datafile <EM><STRONG>nboundtheta</STRONG></EM> contains cases that contain values that cater to the logical statement </P>
<P><STRONG><FONT color=#ff0066><FONT face="Courier New"><FONT size=2>if {lp(i)> </FONT></FONT><FONT face="Courier New"><FONT size=2>0</FONT></FONT><FONT size=2><FONT face="Courier New"> & up(i)> </FONT><FONT face="Courier New">0</FONT></FONT></STRONG></FONT><FONT size=2><STRONG><FONT color=#ff0066><FONT face="Courier New">} OR {lp(i) < </FONT><FONT face="Courier New">0</FONT></FONT><FONT size=2><FONT face="Courier New"> & up(i) < </FONT><FONT face="Courier New">0</FONT></FONT></STRONG></FONT><FONT face="Courier New"><FONT color=#ff0066 size=2><STRONG>}then output nboundtheta;</STRONG></FONT></P>
<P></FONT>as well as produces all the cases present in the datafile <EM><STRONG>remainof</STRONG></EM>. I would like to have the dataset <EM><STRONG>nboundtheta</STRONG></EM> only to contain intervals that do not contain zero. Is there any other way I can do this. Any help is appreciated.</P>
<P>Thank you,</P>
<P>Shireen</P>
<P></FONT><FONT size=2><STRONG>data</STRONG></FONT></FONT><FONT face="Courier New"><FONT size=2> nboundtheta;</FONT></P></FONT>
<P><FONT face="Courier New" color=#0000ff><FONT size=2>set</FONT></FONT><FONT face="Courier New"><FONT size=2> remainof;</FONT></P></FONT><FONT face="Courier New" color=#0000ff>
<P><FONT size=2>array</FONT></FONT><FONT size=2><FONT face="Courier New"> lp(</FONT><B><FONT face="Courier New" color=#008080>6</B></FONT></FONT><FONT face="Courier New"><FONT size=2>)lp1-lp6;</FONT></P></FONT><FONT face="Courier New" color=#0000ff>
<P><FONT size=2>array</FONT></FONT><FONT size=2><FONT face="Courier New"> up(</FONT><B><FONT face="Courier New" color=#008080>6</B></FONT></FONT><FONT face="Courier New"><FONT size=2>)up1-up6;</FONT></P></FONT><FONT face="Courier New" color=#0000ff>
<P><FONT size=2>array</FONT></FONT><FONT size=2><FONT face="Courier New"> theta(</FONT><B><FONT face="Courier New" color=#008080>6</B></FONT></FONT><FONT face="Courier New"><FONT size=2>) p10-p15;</FONT></P></FONT><FONT face="Courier New" color=#0000ff>
<P><FONT size=2>array</FONT></FONT><FONT size=2><FONT face="Courier New"> mean2(</FONT><B><FONT face="Courier New" color=#008080>6</B></FONT></FONT><FONT size=2><FONT face="Courier New">,</FONT><B><FONT face="Courier New" color=#008080>1</B></FONT></FONT><FONT face="Courier New"><FONT size=2>);</FONT></P></FONT><FONT face="Courier New" color=#0000ff>
<P><FONT size=2>array</FONT></FONT><FONT size=2><FONT face="Courier New"> mean1(</FONT><B><FONT face="Courier New" color=#008080>6</B></FONT></FONT><FONT size=2><FONT face="Courier New">,</FONT><B><FONT face="Courier New" color=#008080>1</B></FONT></FONT><FONT face="Courier New"><FONT size=2>);</FONT></P></FONT><FONT face="Courier New" color=#0000ff>
<P><FONT size=2>array</FONT></FONT><FONT size=2><FONT face="Courier New"> vams(</FONT><B><FONT face="Courier New" color=#008080>6</B></FONT></FONT><FONT face="Courier New"><FONT size=2>) ms10-ms15;</FONT></P></FONT><FONT face="Courier New" color=#0000ff>
<P><FONT size=2>do</FONT></FONT><FONT size=2><FONT face="Courier New"> i = </FONT><B><FONT face="Courier New" color=#008080>1</B></FONT></FONT><FONT size=2><FONT face="Courier New"> </FONT><FONT face="Courier New" color=#0000ff>to</FONT><FONT face="Courier New"> </FONT><B><FONT face="Courier New" color=#008080>6</B></FONT></FONT><FONT face="Courier New"><FONT size=2>;</FONT></P>
<P><FONT size=2>mean1(i,</FONT></FONT><B><FONT face="Courier New" color=#008080><FONT size=2>1</FONT></B></FONT><FONT face="Courier New"><FONT size=2>)=vams(i);</FONT></P>
<P><FONT size=2>mean2(i,</FONT></FONT><B><FONT face="Courier New" color=#008080><FONT size=2>1</FONT></B></FONT><FONT size=2><FONT face="Courier New">)=mean1(i,</FONT><B><FONT face="Courier New" color=#008080>1</B></FONT></FONT><FONT size=2><FONT face="Courier New">)*</FONT><B><FONT face="Courier New" color=#008080>2</B></FONT></FONT><FONT face="Courier New"><FONT size=2>;</FONT></P>
<P><FONT size=2>lp(i)=theta(i)- mean2(i,</FONT></FONT><B><FONT face="Courier New" color=#008080><FONT size=2>1</FONT></B></FONT><FONT face="Courier New"><FONT size=2>);</FONT></P>
<P><FONT size=2>up(i)=theta(i)+mean2(i,</FONT></FONT><B><FONT face="Courier New" color=#008080><FONT size=2>1</FONT></B></FONT><FONT face="Courier New"><FONT size=2>);</FONT></P>
<P></FONT><FONT size=2><FONT face="Courier New" color=#0000ff>if</FONT><FONT face="Courier New"> theta(i)LT </FONT><B><FONT face="Courier New" color=#008080>0</B></FONT></FONT><FONT size=2><FONT face="Courier New"> </FONT><FONT face="Courier New" color=#0000ff>then</FONT><FONT face="Courier New"> </FONT><FONT face="Courier New" color=#0000ff>do</FONT></FONT><FONT face="Courier New"><FONT size=2>;</FONT></P>
<P></FONT><STRONG><FONT color=#ff0066><FONT face="Courier New"><FONT size=2>if {lp(i)> </FONT></FONT><FONT face="Courier New"><FONT size=2>0</FONT></FONT><FONT size=2><FONT face="Courier New"> & up(i)> </FONT><FONT face="Courier New">0</FONT></FONT></STRONG></FONT><FONT size=2><STRONG><FONT color=#ff0066><FONT face="Courier New">} OR {lp(i) < </FONT><FONT face="Courier New">0</FONT></FONT><FONT size=2><FONT face="Courier New"> & up(i) < </FONT><FONT face="Courier New">0</FONT></FONT></STRONG></FONT><FONT face="Courier New"><FONT color=#ff0066 size=2><STRONG>}then output nboundtheta;</STRONG></FONT></P>
<P></FONT><FONT size=2><FONT face="Courier New" color=#0000ff>end</FONT><FONT face="Courier New">;</P></FONT></FONT><FONT face="Courier New" color=#0000ff>
<P><FONT size=2>end</FONT></FONT><FONT face="Courier New"><FONT size=2>;</FONT></P></FONT><B><FONT face="Courier New" color=#000080>
<P><FONT size=2>proc</FONT></B></FONT><FONT size=2><FONT face="Courier New"> </FONT><B><FONT face="Courier New" color=#000080>print</B></FONT></FONT><FONT size=2><FONT face="Courier New"> </FONT><FONT face="Courier New" color=#0000ff>data</FONT><FONT face="Courier New">=nboundtheta (keep=rep lp1-lp6 up1-up6 p10-p15) ;</P></FONT></FONT><FONT face="Courier New" color=#0000ff>
<P><FONT size=2>title</FONT></FONT><FONT size=2><FONT face="Courier New"> </FONT><FONT face="Courier New" color=#800080>'nonboundary'</FONT><FONT face="Courier New">;</P></FONT></FONT><B><FONT face="Courier New" color=#000080>
<P><FONT size=2>run</FONT></B></FONT><FONT face="Courier New"><FONT size=2>; </FONT></P></FONT></DIV></div><br clear=all><hr>Chat with friends online, try MSN Messenger: <a href='http://g.msn.com/1HM305401/12'>Click Here</a><br></html>
|