LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 6 Dec 2005 14:23:32 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: array correct?
In-Reply-To:  <BAY101-F1059F5668E7F0FDA7DCED3DE400@phx.gbl>
Content-Type: text/plain; format=flowed

Mah-j,

Wrote me privately to explain that the untested code I submitted was throwing a problem. After revue I found the problem:

It should have been:

if ( sum(of reshed: , 0) ) = 0 then att_r = . ; else att_r = sum(of rehab: , 0) /sum(of reshed: , 0) ;

if ( sum(of yeshed: , 0) ) = 0 then att_y = . ; else att_y = sum(of yattend: , 0)/ sum(of yshed: , 0) ;

Toby Dunn

From: toby dunn <tobydunn@HOTMAIL.COM> Reply-To: toby dunn <tobydunn@HOTMAIL.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Re: array correct? Date: Tue, 6 Dec 2005 04:53:21 +0000

mah-j,

I don't think your gettingwhat you want.

Try Untested:

if ( sum(of reshed: , 0) ) = 0 then att_r = . ; else att_r = sum(of rehab: , 0) / sum(reshed: , 0) ;

if ( sum(of yeshed: , 0) ) = 0 then att_y = . ; else att_y = sum(of yattend: , 0) / sum(yshed: , 0) ;

Toby Dunn

From: "mah-j@statworks.com" <msoobader@VERIZON.NET> Reply-To: mah-j@statworks.com To: SAS-L@LISTSERV.UGA.EDU Subject: Re: array correct? Date: Mon, 5 Dec 2005 23:43:47 -0500

Is this array doing what I want it to?

I want 2 ratio's: 1. sum of rehab1-rehab11/sum of reshed1-reshed11 2. sum of yattend1-yattend11/sum of yshed1-yshed11

array rehab (11) rehab1-rehab11 ; array reshed (11)reshed1-reshed11; array yattend (11)yattend1-yattend11 ; array yshed (11) yshed1-yshed11; DO i= 1 to 11; if reshed(i)=. or reshed(i)=0 then att_R=.; else att_R=rehab(i)/reshed(i); if yshed(i)=. or yshed(i)=0 then att_Y=.; else att_Y=yattend(i)/yshed(i); end; run;

Still learning thanks, Mah-J


Back to: Top of message | Previous page | Main SAS-L page