tag 标签: Reference经管大学堂:名校名师名课

相关帖子

版块 作者 回复/查看 最后发表
Financial Risk Manager Handbook,Test Bank (6th Edt.) attachment 财会类 ramirali 2013-8-22 6 4101 xiaosyu 2015-12-15 13:42:37
Time-Series Reference Manual, Release 10 attachment 计量经济学与统计软件 bookbug 2007-12-23 194 40662 2356669813 2015-10-3 20:31:45
stata longgitudinalpanel data manual reference release 10 attachment 计量经济学与统计软件 bookbug 2008-5-21 158 39900 vincepc 2015-3-14 07:44:44
MATA REFERENCE MANUAL VOLUME1 [M-0]-[M-3] RELEASE 10 attachment 计量经济学与统计软件 bookbug 2008-5-23 50 16842 cristineharbe 2014-12-3 18:25:55
Stata Survey Data Reference Manual Release 10 attachment digest 计量经济学与统计软件 bookbug 2008-6-15 55 15383 zhangyiyiw 2013-11-13 16:34:52
Stata Reference Q-Z Release 10 attachment 计量经济学与统计软件 bookbug 2008-6-30 37 11842 wc202 2013-11-12 10:14:19
Stata Quick Reference and Index Release 10 attachment 计量经济学与统计软件 bookbug 2008-6-29 34 10375 wc202 2013-11-12 10:09:47
Stata Data Management reference Manual Release 10 attachment 计量经济学与统计软件 bookbug 2008-6-17 48 14207 wc202 2013-11-12 10:01:37
MATA VOLUME2 REFERENCE MANUAL RELEASE 10 attachment digest 计量经济学与统计软件 bookbug 2008-5-28 58 18102 wc202 2013-11-12 09:54:29
Supply Chain Disruptions Theory and Practice of Managing Risk attach_img 运营管理(物流与供应链管理) Toyotomi 2013-2-19 4 2917 olderp 2013-9-16 08:00:56
Stata Programming Reference Manual Release 10 attachment 计量经济学与统计软件 bookbug 2008-5-30 69 21412 lclray 2013-7-5 17:43:52
伯克利大学高等概率论课程安排以及推荐书籍 经济金融数学专区 352693585 2013-7-1 1 3926 benji427 2013-7-1 20:51:05
悬赏 论文求助!急!急! - [悬赏 10 个论坛币] attachment 求助成功区 文具盒 2013-3-12 4 2035 文具盒 2013-3-14 11:20:05
Useful packages for predictions in machine learning R语言论坛 ltx5151 2012-8-27 0 4329 ltx5151 2012-8-27 09:03:12
NLOGIT reference manual MATLAB等数学软件专版 fei355 2012-8-22 0 2822 fei355 2012-8-22 09:32:19
SAS Macro Language Reference attachment 数据分析与数据科学 llulla 2007-5-11 34 8052 nelsonruan 2012-4-30 09:50:18
Stata Multivariate Statistics Reference Manual Release 10 attachment 计量经济学与统计软件 bookbug 2008-6-2 50 15917 iamaxing21 2012-3-20 22:17:40
stata9 programming reference manual[pdf] attachment 计量经济学与统计软件 saihuatuo 2007-7-15 53 18603 zhoucf 2011-12-8 12:55:46
Stata Reference I-P Release 10 attachment 计量经济学与统计软件 bookbug 2008-6-29 39 11328 mygolden 2010-6-2 09:08:09
Stata Reference A-H Release 10 attachment 计量经济学与统计软件 bookbug 2008-6-29 23 9918 Seanlxz 2010-1-3 08:16:44

相关日志

分享 如果你希望成功
艾肯法莱 2014-7-6 20:31
If you wish to succeed, you should use persistence as your good friend, experience as your reference, prudence as your brother and hope as your sentry.------如果你希望成功,当以恒心为良友、以经验为参谋、以谨慎为兄弟、以希望为哨兵。
个人分类: 情感|32 次阅读|0 个评论
分享 Use CALL EXECUTE to submit SAS code or macro code in a DATA step
intheangel 2014-5-15 22:59
reference: "SAS® Code and Macros: How They Interact" write byBruce Gilsen, Federal Reserve Board from support.sas.com every time you get the step boundary, the code start compile and execute; %macro to %mend the macro finish the compile and stored in the catalog in a library, when then macro finish the execute, it can be treated as the code user has typed between the other code; The macro will be execute when you invokes it or in the step boundary; eg. %macro mac5; (1) %local j; (2) %do j = 1 %to 3; (3) xj = yj (4) %end; (5) %mend mac5; (6) data two; (7) set one; (8) rename (9) %mac5 (10) ; (11) run; (12) to (6) , then macro finish the compile, then to(12), it start execute, then (10) will become the text just like x1=y1 x2=y2 x3=y3; then execute the data step; then we talk about the call execute to submit SAS code or macro code in a DATA step; data one; input obs company $ audited; cards; 1 ibm 1 2 microsoft 0 3 ao1 1 ; run; %macro mac7(firm=); %put in mac7 firm= firm; %mend mac7; data two; set one; where audited = 1; call execute ( '%mac7(firm= '||company||')' ); put "at end of TWO " company=; run; when you execute this data step, when to the call execute, then execute the macro at once, then it can be a text between the code; %macro mac8(firm=, vars=); %put in mac8 firm= firm vars= vars; proc print data= firm; title firm; var vars; run; %mend mac8; data two; set one; if audited = 1 then call execute ( '%mac8(firm='||company||', vars=income tax)' ); else call execute ( '%mac8(firm='||company||', vars=income)' ); put "at end of TWO " company=; run; be caution that the proc print will be executed after the data step has finished; %macro mac9 ( state= ); (1) proc summary data = all_state_sales; (2) var sales; (3) where state1="state"; (4) output out = summary1 max=maxsale1; (5) run; (6) data _null_; (7) set summary1; (8) call symputx ( 'maxsale' , maxsale1 ); (9) run; (10) %if maxsale 200 %then %do; (11) title "Maximum Sale in state is maxsale"; (12) proc print data = all_state_sales; (13) where state1="state"; (14) run; (15) %end; (16) %mend mac9; (17) data _null_; (18) input state1 $2.; (19) call execute ( '%nrstr(%mac9(state=' || state1 ||'))' ); datalines; (21) CA NY ;run; when you just use statement like 'call execute ( '%mac9(state=' || state1 ||')' ), the sas will execute the macro and the first two data step will execute aftert the data step and then execute %if at first and then you will see syntax error, because the macro variable maxsale has no value yet, but 'call execute ( '%nrstr(%mac9(state=' || state1 ||'))' ) just like add %mac9(...) after this data step, and it will execute then macro directly and the problem can bu resolved. So, it is important to add %nrstr before the %macro(variable='||..||')
个人分类: macro|50 次阅读|0 个评论
GMT+8, 2025-12-5 14:51