Describes how edwards-magee.com exited and shortened the market in January 2008 and went long in the gold market in 2003 Presents a powerful and simple system to replace Dow Theory Contains new patterns and methods, integrates new charts, as well as offers expanded material on Magee's Basing Points Procedure Expands coverage of pragmatic portfolio theory as a viable alternative to modern portfolio theory
用like的缺点是 按字精确匹配 scan则是要清楚所选词出现的具体位置 proc import dbms=excel out=ser datafile='F:\raw material\_69 of 70.xls' replace; run; data res; set ser; where job like '%manager%';/*严格按字匹配*/ run; data res2; set ser; where upcase(scan(job,2))='MANAGER';/*需要制定具体的位置,如第二个词*/ run; data res3; set ser; if upcase(substr(job,)) proc print data=res2; run;
结果不是 jo 186 . ja 2121 a joan 4695 . . 3567 fi joan 4698 m John 5463 accouting 而是 Obs Name empid department 1 Jill 1864 2 Jack 2121 accouting 3 3567 finance 4 Joan 4698 marketing 5 John 5463 accouting 因为指针是按照变量排序移动的 proc import dbms=excel out=one datafile='F:\raw material\_52 of 70_1.xls' replace; run; proc import dbms=excel out=two datafile='F:\raw material\_52 of 70_2.xls' replace; run; data all; merge one(in=o) two(in=d); by empid; if (o and not d) or (d and not o);/*其中有一个数组无效in=.,成立;注意指针下移是按照empid的排序的*/ run; proc print data=all; run;
之前一直对merge m:m不感冒,直到最近才发现它的好处。 废话少说,上log set obs 300 egen id=seq() gen firm=1 save "firmid" clear set obs 10000 egen id=seq() replace id=int(id/100) if id100*there will be firm id greater than 100 gen employ=id+100 save "employ" *i plan to assign each employ value in eploy.dta to firid.dta use firmid.dta sort id merge m:m id using employment *in this case, all firm id are kept clear use firmid.dta joinby id using employ.dta *in this case, only id =100 are kept.