Date: Tue, 19 Feb 2002 17:30:02 +0100
Reply-To: Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
Subject: Re: Format question
Content-Type: text/plain; charset="iso-8859-1"
Dear Fabrice,
AFAIK (in vs. 6.12) you just can't do that. In a format declaration you can
only associate a (single, unformatted) value with a formatted value once,
not more than once. What you want is some kind of broken down totals, which
of course can be programmed, but in quite different ways.
Or is something like this allowed since vs. 8? If so I apologize in advance
for being ignorant in this regard.
Regards - Jim.
--
Y. (Jim) Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407 070
senior statistician, P.O. Box 1 fax. +31 412 407 080
senior data manager 5350 AA BERGHEM IMRO TRAMARKO: a CRO
J.Groeneveld@ITGroups.com the Netherlands in clinical research
As time elapses it is getting later.
Notice of confidentiality: this e-mail may contain confidential information
intended for the addressed recipient only.
If you have received this e-mail in error please delete this e-mail and
please notify the sender so that proper delivery
can be arranged.
> -----Original Message-----
> From: ROTH Fabrice [SMTP:fabrice.roth@STATEC.ETAT.LU]
> Sent: Tuesday, February 19, 2002 5:01 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Format question
>
> --------------7143D3D50B32ED1361D68BFE
> Content-Type: text/plain; charset=iso-8859-2
> Content-Transfer-Encoding: 8bit
>
> Hello,
>
> I just wanted to know if it's possible to define the order of the result
>
> in a proc tabulate in the following way:
>
> When I declare my format I "choose" an order:
>
> proc format;
> value $f_tyme (multilabel)
> '0','1','2','3'='Tous les ménages'
> '1','2','3','4','5','6','8','9'='Ménages d''une famille'
> '1','2'='Couples sans enfants'
> '1'='Couples sans enfants sans autres personnes'
> '2'='Couples sans enfants avec d''autres personnes' ;
> run;
>
> proc tabulate data=t410 missing out=r_t410(drop=_type_ _page_ _table_);
> class tyme /mlf ;
> var r1;
> table tyme='', r1*sum=''*f=5.;
> format tyme $f_tyme.;
> run;
>
> what I want in my output is the following order for tyme:
> tyme r1
>
> Tous les ménages 1000
> Ménages d''une famille 300
> Couples sans enfants 150
> Couples sans enfants sans autres personnes 80
> Couples sans enfants avec d''autres personnes 20
>
>
> So the order is not that of the data or format but the "order" in which
> I declared my format.
>
> I tried all the possibilities of the ORDER= option without success. As I
> have to do this for about
> 500 Tables (and have already write the whole code for them) I hope there
> exists an easy way ;-)
>
> --
> ROTH Fabrice
>
>
>
> --------------7143D3D50B32ED1361D68BFE
> Content-Type: text/html; charset=iso-8859-2
> Content-Transfer-Encoding: 8bit
>
> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>
> <tt>Hello,</tt>
> <p><tt>I just wanted to know if it's possible to define the order of the
> result</tt>
> <br><tt>in a proc tabulate in the following way:</tt>
> <p><tt>When I declare my format I "choose" an order:</tt>
> <p><tt>proc format;</tt>
> <br><tt> value $f_tyme (multilabel)</tt>
> <br><tt> '0','1','2','3'='Tous les ménages'</tt>
> <br><tt> '1','2','3','4','5','6','8','9'='Ménages d''une
> famille'</tt>
> <br><tt> '1','2'='Couples sans enfants'</tt>
> <br><tt> '1'='Couples sans enfants sans autres personnes'</tt>
> <br><tt> '2'='Couples sans enfants avec d''autres personnes' ;</tt>
> <br><tt>run;</tt>
> <p><tt>proc tabulate data=t410 missing out=r_t410(drop=_type_ _page_
> _table_);</tt>
> <br><tt> class tyme /mlf ;</tt>
> <br><tt> var r1;</tt>
> <br><tt> table tyme='', r1*sum=''*f=5.;</tt>
> <br><tt> format tyme $f_tyme.;</tt>
> <br><tt>run;</tt>
> <p><tt>what I want in my output is the following order for tyme:</tt>
> <br><tt>
> tyme &nbs
> p;
> &n
> bsp;
> r1</tt>
> <p><tt> Tous les
> ménages &
> nbsp; &nb
> sp;
> 1000</tt>
> <br><tt> Ménages d''une
> famille &
> nbsp; &nb
> sp;
> 300</tt>
> <br><tt> Couples sans
> enfants &
> nbsp; &nb
> sp;
> 150</tt>
> <br><tt> Couples sans enfants sans autres
> personnes
> 80</tt>
> <br><tt> Couples sans enfants avec d''autres
> personnes
> 20</tt>
> <br>
> <p><tt>So the order is not that of the data or format but the "order" in
> which I declared my format.</tt><tt></tt>
> <p><tt>I tried all the possibilities of the ORDER= option without success.
> As I have to do this for about</tt>
> <br><tt>500 Tables (and have already write the whole code for them) I hope
> there exists an easy way ;-)</tt>
> <p><tt>--</tt>
> <br><tt>ROTH Fabrice</tt>
> <br><tt></tt>
> <br> </html>
>
> --------------7143D3D50B32ED1361D68BFE--
|