| Date: | Fri, 15 Apr 2011 00:16:10 +0800 |
| Reply-To: | Murphy Choy <goladin@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Murphy Choy <goladin@GMAIL.COM> |
| Subject: | Re: Simple Scenario - Sum One |
|
| In-Reply-To: | <5B1372272ABB7B4DB178622784D52BC10D62607988@MOR-EXMBPRD01.bvnet.bv> |
| Content-Type: | text/plain; charset="iso-8859-1" |
Hi,
Try this.
DATA CONTRIBUTION;
INPUT NAME $ WALD;
CARDS;
FX_BX_REF_AT_0 95.3832
FX_SK_R_PONT_Y_T_456 88.1765
FX_SK_R_PONT_Y_T_0 68.4168
FX_CPASS_BCO_31_98 47.1986
FX_VL_PONTUAL_167122 40.0283
FX_CCF_Z_498 33.8209
FX_SK_R_PONT_Y_T_3 25.4753
FX_CCF_REF_PART_AT_1 23.9809
FX_CPASS_BCO_31_19 22.2409
FX_NPF_SK_119 18.4465
FX_BX_REF_PART_ZT_7 15.0211
FX_VL_PONTUAL_392212 13.1879
FX_REF_SS_T_0 9.9452
FX_CPASS_BCO_9_7 9.8452
FX_CPASS_BCO_31_14 9.2506
FX_VL_PAGTO_815_5266 8.3348
FX_R_REF_TT_C_0 8.1534
FX_VL_PAGTO_1630_296 6.7866
SETOR_SK 4.8066
;
RUN;
DATA CONTRIBUTION2;
DO until (EOF);
SET CONTRIBUTION END = EOF;
TOTAL = SUM(TOTAL,WALD);
END;
DO until (EOF2);
SET CONTRIBUTION END = EOF2;
WALDPCT = WALD/TOTAL;OUTPUT;
END;
RUN;
Regards,
Murphy Choy
The Unofficial SAS Gardener
Let the truth pave the land we tread.
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Ricardo
Gonçalves da Silva
Sent: Friday, April 15, 2011 12:13 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Simple Scenario - Sum One
Hi,
The following data represents the independent variables' contribution to a
model.
How can I make all then sum one (percentage), keeping the order, using SAS?
DATA CONTRIBUTION;
INPUT NAME $ WALD;
CARDS;
FX_BX_REF_AT_0 95.3832
FX_SK_R_PONT_Y_T_456 88.1765
FX_SK_R_PONT_Y_T_0 68.4168
FX_CPASS_BCO_31_98 47.1986
FX_VL_PONTUAL_167122 40.0283
FX_CCF_Z_498 33.8209
FX_SK_R_PONT_Y_T_3 25.4753
FX_CCF_REF_PART_AT_1 23.9809
FX_CPASS_BCO_31_19 22.2409
FX_NPF_SK_119 18.4465
FX_BX_REF_PART_ZT_7 15.0211
FX_VL_PONTUAL_392212 13.1879
FX_REF_SS_T_0 9.9452
FX_CPASS_BCO_9_7 9.8452
FX_CPASS_BCO_31_14 9.2506
FX_VL_PAGTO_815_5266 8.3348
FX_R_REF_TT_C_0 8.1534
FX_VL_PAGTO_1630_296 6.7866
SETOR_SK 4.8066
;
RUN;
Rick
Esta mensagem e seus anexos podem conter informações confidenciais ou
privilegiadas. Se você não é o destinatário, você não está autorizado a
utilizar o material para qualquer fim. Solicitamos que você apague a
mensagem e avise imediatamente o remetente. O conteúdo desta mensagem e seus
anexos não representam necessariamente a opinião e a intenção da empresa,
não implicando em qualquer obrigação ou responsabilidade por parte desta.
This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose or take any action based on this message or any
information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. The
contents of this message and its attachments do not necessarily express the
opinion or the intention of the company, and do not imply any legal
obligation or responsibilities from this company.
|