```Date: Thu, 16 Jun 2011 11:25:59 -0500 Reply-To: "Data _null_;" Sender: "SAS(r) Discussion" From: "Data _null_;" Subject: Re: PROC SUMMARY calculating _TYPE_. Comments: To: Joe Matise , Richard Read Allen In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jun 16, 2011 at 10:19 AM, Joe Matise wrote: > Not sure where you're getting at here. I'm just trying to gather information from folks with math skills. I thought I would get a bigger response. But if I think about from looking at the code written by my "colleagues" in Pharma most of them don't CLASS statements in MEANS/SUMMARY they like to sort and use BY. Or they don't know that SUMMARY has the median and use UNIVARIATE. I see you are comfortable with powers of 2, me not so much. Actually when I need to fiddle directly with the value of _TYPE_ I usually use the CHARTYPE option. I could use '0101001' and not have to think too hard. With the introduction of the BINARY informat I can still keep my thinking to a minimum if I need to know as in this case 41. 2337 data _null_; 2338 bdg=input('0101001',binary.); 2339 put bdg=; 2340 run; bdg=41 Thanks for the reference to the paper Richard I had not seen that one. On Thu, Jun 16, 2011 at 10:19 AM, Joe Matise wrote: > Not sure where you're getting at here. B*D*G would be _TYPE_=41 (1+8+32). > I think there's a way to determine it programmatically but I usually just > do the math by hand, or even just do the proc means and look if i'm feeling > particularly lazy and it's not too many lines :) > > -Joe > > On Thu, Jun 16, 2011 at 10:13 AM, Data _null_; wrote: >> >> Say for >> >> CLASS A B C D E F G; >> >> How would YOU determine the value of _TYPE_ for the B*D*G conbinations. >> >> I know TYPES B*D*G; will output the records of interest but I want to >> know how YOU would calculate _TYPE_. > > ```

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