<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>From a Logical Point of View</title>
	<atom:link href="http://www.jiangtanghu.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jiangtanghu.com/blog</link>
	<description>Hello World by A SAS programmer/CDISC consultant</description>
	<lastBuildDate>Thu, 30 May 2013 16:07:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>List Processing With SAS: A Github Repository</title>
		<link>http://www.jiangtanghu.com/blog/2013/03/31/list-processing-with-sas-a-github-repository/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/03/31/list-processing-with-sas-a-github-repository/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 02:24:02 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[GIThub]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[Macro]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1177</guid>
		<description><![CDATA[I have a function like macro (recursive version) to create a sequence: %macro _list(n,pre=ff); &#160;&#160;&#160; %if &#38;n=1 %then &#38;pre.1; &#160;&#160;&#160;&#160; %else %_list(%eval(&#38;n-1)),&#38;pre.&#38;n; %mend _list; %put %_list(3); *produces ff1, ff2, ff3; But when I read one of Ian Whitlock’s papers, Names, Names, Names &#8211; Make Me a List (SGF 2007, SESUG 2008),&#160; I say: stop! I&#8217;m [...]]]></description>
				<content:encoded><![CDATA[<p>I have <a href="http://jiangtanghu.com/docs/en/Latin2Eng.sas">a function like macro (recursive version) to create a sequence</a>:</p>
<blockquote><p><font face="Courier New">%macro _list(n,pre=ff);        <br />&#160;&#160;&#160; %if &amp;n=1 %then &amp;pre.1;         <br />&#160;&#160;&#160;&#160; %else %_list(%eval(&amp;n-1)),&amp;pre.&amp;n;         <br />%mend _list;</font></p>
<p><font face="Courier New">%put %_list(3); *produces ff1, ff2, ff3;</font></p>
</blockquote>
<p>But when I read one of Ian Whitlock’s papers, <em>Names, Names, Names &#8211; Make Me a List</em> (<a href="http://www2.sas.com/proceedings/forum2007/052-2007.pdf">SGF 2007</a>, <a href="http://analytics.ncsu.edu/sesug/2008/SBC-128.pdf">SESUG 2008</a>),&#160; I say: stop! I&#8217;m gonna use Ian’s %range and I create <a href="https://github.com/Jiangtang/Programming-SAS/blob/master/ListProcessing/range.sas">Github</a> page to hold it (with minimum modifications due to personal preference).</p>
<p>I once posted <a href="http://www.jiangtanghu.com/blog/2011/11/08/my-collection-of-sas-macro-repositories/"><em>My Collection of SAS Macro Repositories</em></a><em>&#160;</em>credited to some SAS gurus like Richard DeVenezia. When facing a programming challenge, there is always a trade-off: should I take a look at what others wrote, or I just write from the scratch? Searching also needs lots of efforts, so I plan to utilize Github pages to minimum my own searching efforts and hope it would be helpful for you (no <em>intelligence waste anymore!</em>). I begin with SAS list processing:</p>
<p><a title="https://github.com/Jiangtang/Programming-SAS/tree/master/ListProcessing" href="https://github.com/Jiangtang/Programming-SAS/tree/master/ListProcessing">https://github.com/Jiangtang/Programming-SAS/tree/master/ListProcessing</a></p>
<p>I got most of such utilities macros (with detailed comments, examples and sources) from papers, blogs and other websites and honors belong to their authors! Sometimes I will also add <a href="https://github.com/Jiangtang/Programming-SAS/blob/master/ListProcessing/slice.sas">my own</a> if I think there are some holes to fill up. To get start, you may read a <em><a href="https://github.com/Jiangtang/Programming-SAS/blob/master/ListProcessing/0_readme.sas">READ ME</a> (will keep updated)</em> first. Besides the individual macros, <a href="https://github.com/Jiangtang/Programming-SAS/blob/master/ListProcessing/_ListProcessing">a combined file</a> (trigged by <a href="https://github.com/Jiangtang/Programming-SAS/blob/master/ListProcessing/_ListProcessing_Combine.bat">a simple Dos command</a>) is also available.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/03/31/list-processing-with-sas-a-github-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Localize Your Macro Variable? Mostly Not Needed or Do It If You Only Want to Initiate It</title>
		<link>http://www.jiangtanghu.com/blog/2013/03/29/localizing-or-initiating/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/03/29/localizing-or-initiating/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 23:22:46 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Macro]]></category>
		<category><![CDATA[scope]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1176</guid>
		<description><![CDATA[[NOTE2013-05-30: This post is permanently suspended. In this post, I only focused on the initialization effect of the %local statement and totally ignored its function to avoid variable collisions as Quentin mentioned in comment box.] A piece of SAS codes to create a list of all variables within a dataset (a nice programming trick from [...]]]></description>
				<content:encoded><![CDATA[<p><span style="font-size: small;"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/03/Scope.jpg"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="Scope" alt="Scope" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/03/Scope_thumb.jpg" width="240" height="180" border="0" /></a></span></p>
<p><span style="color: #ff0000; font-size: small;"><strong>[NOTE2013-05-30: This post is permanently suspended. In this post, I only focused on the initialization effect of the %local statement and totally ignored its function to avoid variable collisions as Quentin mentioned in comment box.]</strong></span></p>
<p><span style="font-size: small;">A piece of SAS codes to create a list of all variables within a dataset (a nice programming trick from </span><a href="http://www2.sas.com/proceedings/sugi30/028-30.pdf"><span style="font-size: small;">Art Carpenter, 2004</span></a><span style="font-size: small;">):</span></p>
<blockquote><p><span style="font-family: 'Courier New'; font-size: small;">%macro getvars(dset) ;<br />
<span style="color: #ff0000;">%local varlist ;</span><br />
%let fid = %sysfunc(open(&amp;dset)) ;<br />
%if &amp;fid %then %do ;<br />
%do i=1 %to %sysfunc(attrn(&amp;fid,nvars)) ;<br />
%let <span style="color: #ff0000;">varlist</span>= <span style="color: #ff0000;">&amp;varlist</span> %sysfunc(varname(&amp;fid,&amp;i));<br />
%end ;<br />
%let fid = %sysfunc(close(&amp;fid)) ;<br />
%end ;<br />
&amp;varlist<br />
%mend ;</span></p>
<p><span style="font-family: 'Courier New'; font-size: small;">%put %getvars(%str(sashelp.iris));</span></p></blockquote>
<p><span style="font-size: small;">One question would be: why declare macro variable <em>varlist</em> as local explicitly by a <em>%local</em> statement? Since it was defined within the macro <em>%getvar</em>, it just went to the local macro table automatically and the <em>%local</em> statement is not necessary anymore!</span></p>
<p><span style="font-size: small;">Such argument is definitely right. But the <em>%local</em> statement above was not intent to localize a macro variable, actually, it’s used to initiate it. If you just delete it, you will get a warning then an error:</span></p>
<blockquote><p><span style="font-size: small;">WARNING: Apparent symbolic reference VARLIST not resolved.<br />
ERROR: The text expression &amp;VARLIST SPECIES contains a recursive reference to the macro variable VARLIST.  The<br />
macro variable will be assigned the null value.</span></p></blockquote>
<p><span style="font-size: small;">This is because the macro variable <span style="color: #ff0000;"><em>&amp;varlist</em></span><span style="color: #cccccc;"> in right side of the second</span> <em>%let</em> statement was not declared before. To be clear, you can also replace the <em>%local</em> statement  with an explicit initiating statement:</span></p>
<blockquote><p><span style="color: #ff0000; font-family: 'Courier New'; font-size: small;">%let varlist=;</span></p></blockquote>
<p><span style="font-size: small;">In this example, the <em>%local</em> statement and the <em>%let</em> statement simply do the same job and the choice is totally subject to programmers’ preference(<em>well I prefer the later</em>).</span></p>
<p><span style="font-size: small;">So, take home question: any comments on the following snippet to count the numbers of word in a string<span style="font-size: small;">(also from </span><a href="http://www2.sas.com/proceedings/sugi30/028-30.pdf"><span style="font-size: small;">Art Carpenter, 2004</span></a>; <em>sorry Carpenter, your books and papers are the most familiar sources for me to learn SAS macro programming</em><span style="font-size: small;">)</span>:</span></p>
<blockquote><p><span style="font-family: 'Courier New'; font-size: small;">%macro wordcount(list);<br />
<span style="color: #ff0000;">    %local count;<br />
%let count=0;</span><br />
%do %while(%qscan(&amp;list,&amp;count+1,%str( )) ne %str());<br />
%let count = %eval(&amp;count+1);<br />
%end;<br />
&amp;count<br />
%mend wordcount;</span></p>
<p><span style="font-family: 'Courier New'; font-size: small;">%put %wordcount(a b cd);</span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/03/29/localizing-or-initiating/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What&#8217;s New</title>
		<link>http://www.jiangtanghu.com/blog/2013/03/20/whats-new/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/03/20/whats-new/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 03:09:08 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[OpenCDISC]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1172</guid>
		<description><![CDATA[I didn’t blog for a while in this first half March and there are bunches of new stuff to catch up: I had a new baby! He was delivered on time (and on budget!), lions tigers and bears, oh my&#8230; His brother is Tiger so I named him, Leo. And I got the latest SAS [...]]]></description>
				<content:encoded><![CDATA[<p>I didn’t <a href="http://www.jiangtanghu.com/blog/archives/">blog</a> for a while in this first half March and there are bunches of new stuff to catch up:</p>
<p>I had a new baby! He was delivered on time (and on budget!), <em>lions tigers and bears, oh my&#8230; </em>His brother is Tiger so I named him, Leo.</p>
<p>And I got the latest SAS 9.3 (TS1M2) installed! SAS is jus getting much beautiful.</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/03/SAS9.3_12.1.png"><font color="#cbcbcb"></font><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAS9.3_12.1" border="0" alt="SAS9.3_12.1" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/03/SAS9.3_12.1_thumb.png" width="383" height="99" /></a></p>
<p><a href="http://www.opencdisc.org/download">OpenCDISC</a> had the latest release, Version 1.4 with the new SDTM 3.1.3 validation checks,—and yes CDISC itself also had some significant updates:</p>
<p>SDTMv1.3 and SDTMIGv3.1.3 now have the <a href="http://www.cdisc.org/sdtmv1-4-sdtmigv3-1-3-metadata">machine readable metadata</a> online. It’s a nice improvement (last year I just posted <em><a href="http://www.jiangtanghu.com/blog/2012/12/29/cdisc-in-pdf-format/">The Great, Open, Vendor-neutral, Platform-independent Data Standards, . . . Yet in PDF Formats</a>)</em>.</p>
<p><a href="http://www.cdisc.org/define-xml">Define-XML</a> now turns to 2.0 (finally). </p>
<p><a href="http://cran.rstudio.com/">R</a> had its final 2.* release, Version 2.15.3 and Version 3.0.0 will just come soon. <a href="http://www.rstudio.com/ide/download/desktop">RStudio</a> also had a update recently. RStudio is the best IDE (not just R IDE) I used.</p>
<p><a href="http://googlereader.blogspot.com/2013/03/powering-down-google-reader.html">Google will shut down Google Reader</a>, the best RSS reader ever. It’s a huge loss and I tell you, for example, the famous SAS and statistical blogger Wensui Liu, once frequently posted on Windows Live Space, and then Blogspot and finally <a href="http://statcompute.wordpress.com/">WordPress</a>. The former two blogs were closed and Google Reader feed is the only way to archive these lost posts!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/03/20/whats-new/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Game in Town: SAS Metadata Administration</title>
		<link>http://www.jiangtanghu.com/blog/2013/03/13/new-game-in-town-sas-metadata-administration/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/03/13/new-game-in-town-sas-metadata-administration/#comments</comments>
		<pubDate>Thu, 14 Mar 2013 01:46:35 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Metadata]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1169</guid>
		<description><![CDATA[You might also read that there were constant (although still not frequent) posts on SAS metadata querying and other administration tasks in SAS blogosphere since 2012 (when I started to play with it^). It is yet another evidence that more and more SAS programmers switched from SAS foundation to the so called SAS intelligent platform. [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">You might also read that there were constant (although still not frequent) posts on SAS metadata querying and other administration tasks in SAS blogosphere since 2012 (<em>when I started to play with it^</em>). It is yet another evidence that more and more SAS programmers switched from SAS foundation to the so called SAS intelligent platform. In the traditional SAS foundation world, a nice source of metadata is the Dictionary table (or V datasets in SASHELP library); In SAS intelligent platform, a much more comprehensive metadata is stored in a SAS Metadata Server (<a href="http://www.guardian.co.uk/news/datablog/2010/jul/16/data-plural-singular"><em>Is &quot;Data&quot; singular or plural?</em></a>). </font></p>
<p><font size="1">To get started, <a href="http://blogs.sas.com/content/sgf/author/wendymchenry"><font size="1">Wendy McHenry</font></a> posted a nice introductory blog, <font size="1"><a href="http://blogs.sas.com/content/sgf/2012/12/05/why-i-love-sas-metadata/"><em>Why I love SAS metadata</em></a> and <a href="http://blogs.sas.com/content/bi/author/angelahall"><font size="1">Angela Hall</font></a>, <font size="1"><em><a href="http://blogs.sas.com/content/bi/2012/06/12/using-metabrowse-to-find-metadata/">How did you find that metadata?</a>, <a href="http://blogs.sas.com/content/sgf/author/jenniferparks"><font size="1">Jennifer Parks</font></a>, <font size="1"><a href="http://blogs.sas.com/content/sgf/2013/02/06/two-methods-for-editing-sas-metadata/">Two methods for editing SAS metadata</a>.</font></em></font></font></font></p>
<p><font size="1">To communicate with SAS Metadata Server programmingly, you can use </font><a href="http://support.sas.com/documentation/cdl/en/omaref/63063/HTML/default/viewer.htm#titlepage.htm"><font size="1">Java</font></a><font size="1"> or </font><a href="http://support.sas.com/documentation/cdl/en/lrmeta/63180/HTML/default/viewer.htm#titlepage.htm"><font size="1">Base SAS</font></a><font size="1">&#160; which are both well documented. </font><a href="http://blogs.sas.com/content/sasdummy/author/chrishemedinger"><font size="1">Chris Hemedinger</font></a><font size="1"> recently shared bunch of posts on how to </font><a href="http://blogs.sas.com/content/sasdummy/tag/sas-integration-technologies/"><font size="1">use PowerShell to talk with SAS Metadata Server</font></a><font size="1">.</font></p>
<p><font size="1">Industry gurus </font><a href="http://blogs.sas.com/content/sgf/author/paulhomes"><font size="1">Paul Homes</font></a><font size="1"> and </font><a href="http://blogs.sas.com/content/sgf/author/gregorynelson"><font size="1">Gregory Nelson</font></a><font size="1"> also begin to blog in </font><a href="http://blogs.sas.com/content/sgf/"><em><font size="1">SAS User Groups</font></em></a><font size="1"><em>&#160;</em>on this subject (</font><a href="http://platformadmin.com/blogs/paul/"><font size="1">Paul’s own website</font></a><font size="1"> is a great source too). </font></p>
<p><font size="1">A</font><font size="1"> community blog “<em><a href="http://www.bi-notes.com/">BI Notes</a></em>” also has some interesting posts on SAS metadata. Check it out. </font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/03/13/new-game-in-town-sas-metadata-administration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS Snippet: Reshape Data Using SAS DoW Loop (From Long to Wide)</title>
		<link>http://www.jiangtanghu.com/blog/2013/03/11/sas-snippet-reshape-data-using-sas-dow-loop-from-long-to-wide/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/03/11/sas-snippet-reshape-data-using-sas-dow-loop-from-long-to-wide/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 01:10:28 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[DoW-Loop]]></category>
		<category><![CDATA[Transpose]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1167</guid>
		<description><![CDATA[In Art Carpenter’s latest book, Carpenter&#8217;s Guide to Innovative SAS Techniques, a data step approach to transpose data (from long to wide) works like (Ch2.4.2): data tst; &#160;&#160;&#160; input type $ grp value $3.; datalines; A 1 a A 2 aa A 3 aaa B 1 b B 2 bb B 3 bbb C 1 [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/03/Art_SAS.gif"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="F_Carpenter_cover.indd" border="0" alt="F_Carpenter_cover.indd" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/03/Art_SAS_thumb.gif" width="295" height="416" /></font></a></p>
<p><font size="1">In Art Carpenter’s latest book, <em><a href="https://support.sas.com/pubscat/bookdetails.jsp?pc=62454">Carpenter&#8217;s Guide to Innovative SAS Techniques</a></em>, a data step approach to transpose data (from long to wide) works like (Ch2.4.2):</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/03/Art_SAS_transpose.png"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="Art_SAS_transpose" border="0" alt="Art_SAS_transpose" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/03/Art_SAS_transpose_thumb.png" width="341" height="325" /></font></a></p>
<blockquote><p><font size="1" face="Courier New">data tst;       <br />&#160;&#160;&#160; input type $ grp value $3.;        <br />datalines;        <br />A 1 a        <br />A 2 aa        <br />A 3 aaa        <br />B 1 b        <br />B 2 bb        <br />B 3 bbb         <br />C 1 c        <br />C 2 cc        <br />C 3 ccc        <br />;</font></p>
<p><font size="1" face="Courier New">data art(keep=type grp1-grp3);       <br />&#160;&#160; set tst;        <br />&#160;&#160; by type;        <br />&#160;&#160; retain grp1-grp3 ;        <br />&#160;&#160; array grps {3} $ grp1-grp3;        <br />&#160;&#160; if first.type then do i = 1 to 3;        <br />&#160;&#160;&#160;&#160;&#160; grps{i} = &quot; &quot;;        <br />&#160;&#160; end;</font></p>
<p><font size="1" face="Courier New">&#160;&#160; grps{grp} = value;       <br />&#160;&#160; if last.type then output art ;        <br />run;</font></p>
</blockquote>
<p><font size="1">And such logic can be best demonstrated by a </font><a href="http://www.jiangtanghu.com/blog/2012/10/20/dow-loop-dorfman/"><font size="1">DoW Loop</font></a><font size="1">:</font></p>
<blockquote><p><font size="1"><font face="Courier New">data dow(keep=type grp1-grp3);          <br />&#160;&#160;&#160;&#160; array grps[3] $ grp1-grp3;          <br />&#160;&#160;&#160;&#160; do _n_ = 1 by 1 until(last.type);           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; set tst;          <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; by type;          <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; grps[grp]=value;          <br />&#160;&#160;&#160;&#160; end;           <br />run;</font> </font></p>
</blockquote>
<h1><font style="font-weight: bold">/*Note*/</font></h1>
<p><font size="1">1. The traditional PROC TRANSPOSE approach:</font></p>
<blockquote><p><font size="1" face="Courier New">proc transpose data=tst       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; out=trans(drop=_:)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; prefix=grp;         <br />&#160;&#160; by type;        <br />&#160;&#160; id grp;        <br />&#160;&#160; var value;        <br />run;</font></p>
</blockquote>
<p><font size="1">2. Why use data step approach (both Art and DoW) to transpose data against the TRANSPOSE procedure:</font></p>
<ul>
<li><font size="1">it’s much faster since data step array used</font></li>
<li><font size="1">save codes when complex transformation needed</font></li>
<li><font size="1">last but not least, it’s cool!</font></li>
</ul>
<p><font size="1"></font></p>
<p><font size="1">3. Arthur Tabachneck maintains a general data step transposing macro, </font><a href="http://www.sascommunity.org/wiki/A_Better_Way_to_Flip_(Transpose)_a_SAS_Dataset"><font size="1">%transpose</font></a><font size="1"> and you can call it like:</font></p>
<blockquote><p><font size="1" face="Courier New">%transpose(data=tst, out=mac,       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; by=type, var=value,        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; id=grp)</font></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/03/11/sas-snippet-reshape-data-using-sas-dow-loop-from-long-to-wide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yet Another Undocumented Feature (new in SAS 9.3)</title>
		<link>http://www.jiangtanghu.com/blog/2013/02/26/yet-another-undocumented-feature-new-in-sas-9-3/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/02/26/yet-another-undocumented-feature-new-in-sas-9-3/#comments</comments>
		<pubDate>Wed, 27 Feb 2013 02:00:14 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[undocumented feature]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1159</guid>
		<description><![CDATA[Today just caught an undocumented SAS feature. I ran the following SAS codes to delete a dataset(in Windows 7 with SAS 9.3): data a; b=1; run; proc datasets noprint; delete a; run; quit; and the dataset was deleted as I expected: 32   proc datasets noprint; 33       delete a; 34   run; NOTE: Deleting WORK.A (memtype=DATA). 35   [...]]]></description>
				<content:encoded><![CDATA[<p><span style="font-size: xx-small;">Today just caught an undocumented SAS feature. I ran the following SAS codes to delete a dataset(in Windows 7 with SAS 9.3):</span></p>
<blockquote><p><span style="font-family: 'Courier New'; font-size: xx-small;">data a;<br />
b=1;<br />
run;</span></p>
<p><span style="font-family: 'Courier New'; font-size: xx-small;">proc datasets <span style="color: #ff0000;">noprint</span>;<br />
delete a;<br />
run;<br />
quit;</span></p></blockquote>
<p><span style="font-size: xx-small;">and the dataset was deleted as I expected:</span></p>
<blockquote><p><span style="font-size: xx-small;">32   proc datasets noprint;<br />
33       delete a;<br />
34   run;</span></p>
<p><span style="font-size: xx-small;">NOTE: Deleting WORK.A (memtype=DATA).<br />
35   quit;</span></p></blockquote>
<p><span style="font-size: xx-small;">But when tested in a SAS 9.2 machine, I got errors</span></p>
<blockquote><p><span style="font-size: xx-small;">25   proc datasets noprint;<br />
&#8212;&#8212;-<br />
22<br />
202<br />
NOTE: Enter RUN; to continue or QUIT; to end the procedure.<br />
<span style="color: #ff0000;">ERROR</span> 22-322: Syntax error, expecting one of the following: ;, ALTER, DD, DDNAME, DETAILS,<br />
FORCE, GENNUM, KILL, LIB, LIBRARY, MEMTYPE, MT, MTYPE, NODETAILS, NOFS, NOLIST,<br />
NOWARN, PROTECT, PW, READ.<br />
<span style="color: #ff0000;">ERROR</span> 202-322: The option or parameter is not recognized and will be ignored.<br />
26       delete a;<br />
27   run;</span></p>
<p><span style="font-size: xx-small;">NOTE: Statements not processed because of errors noted above.<br />
27 !     quit;</span></p>
<p><span style="font-size: xx-small;">NOTE: The SAS System stopped processing this step because of errors.</span></p></blockquote>
<p><span style="font-size: xx-small;">Then I checked the SAS HelpDoc, there is no such “noprint” option in </span><a href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p0xdkenol7pi1cn14p0iq38shax4.htm"><span style="font-size: xx-small;">PROC DATASETS statement</span></a><span style="font-size: xx-small;">, but in </span><a href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p1v2467vdjbp7xn1222c7t3sejz3.htm"><span style="font-size: xx-small;">CONTENTS statement</span></a><span style="font-size: xx-small;"> in the PROC DATASETS PROCEDURE. Actually I added the “noprint” option just because I expected it act like the same option in </span><a href="http://support.sas.com/documentation/cdl/en/procstat/65543/HTML/default/viewer.htm#procstat_freq_syntax01.htm"><span style="font-size: xx-small;">PROC FREQ statement</span></a><span style="font-size: xx-small;"> to suppresses output. And (un)fortunately, it worked in my machine…</span></p>
<p>UPDATE(2013-02-27): Just got feedback from a SAS developer this &#8220;noprint&#8221; will be documented in the upcoming SAS 9.4; actually it works like the existing &#8220;<a href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p0xdkenol7pi1cn14p0iq38shax4.htm" target="_blank">nolist</a>&#8221; option.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/02/26/yet-another-undocumented-feature-new-in-sas-9-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Write a Check? Use SAS Format!</title>
		<link>http://www.jiangtanghu.com/blog/2013/02/24/how-to-write-a-check-use-sas-format/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/02/24/how-to-write-a-check-use-sas-format/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 02:59:02 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[Perl Regular Expression]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1158</guid>
		<description><![CDATA[During my initial stay in US last year, one of the interesting exercises was to write a check. The Arabic numerals (the universal language!) were pretty intuitive while I didn’t feel much comfortable on spelling the face value in words: I never played the game! But the good side of this story was, as a [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/5write_a_check_step5_sign_memo.jpg"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="5write_a_check_step5_sign_memo" border="0" alt="5write_a_check_step5_sign_memo" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/5write_a_check_step5_sign_memo_thumb.jpg" width="441" height="208" /></font></a></p>
<p><font size="1">During my initial stay in US last year, one of the interesting exercises was </font><a href="http://banking.about.com/od/checkingaccounts/ig/How-to-Write-a-Check/How-to-Write-a-Check---Step-7.htm"><font size="1">to write a check</font></a><font size="1">. The Arabic numerals (<em>the universal language!</em>) were pretty intuitive while I didn’t feel much comfortable on spelling the face value in words: I never played the game! </font></p>
<p><font size="1">But the good side of this story was, as a SAS programmer and I used a </font><a href="http://support.sas.com/documentation/cdl/en/leforinforref/63324/HTML/default/viewer.htm#n1ncdkav4uqfwin1k5mow7z69avw.htm"><font size="1">WORDFw. Format</font></a><font size="1">:</font></p>
<blockquote><p><font size="1" face="Courier New">data _null_;       <br />&#160;&#160;&#160; money=8.15;        <br />&#160;&#160;&#160; put money <font color="#ff0000">wordf</font>100.;         <br />run;</font></p>
</blockquote>
<p><font size="1">and got:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/SAS_Format_Check.png"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="SAS_Format_Check" border="0" alt="SAS_Format_Check" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/SAS_Format_Check_thumb.png" width="395" height="158" /></font></a></p>
<p><font size="1">Another check with a bigger value:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/SAS_Format_Check2.png"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="SAS_Format_Check2" border="0" alt="SAS_Format_Check2" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/SAS_Format_Check2_thumb.png" width="410" height="157" /></font></a></p>
<h2><font size="1"><strong>2</strong></font></h2>
<p><font size="1">I paid specially interested on SAS Format recently because of the introducing Perl Regular Expression into PROC FORMAT invalue statement since SAS 9.3(<em>an old procedure plays a new game!</em>). For example, a labeled TIME8. informat created by</font></p>
<blockquote><p><font size="1" face="Courier New">proc format;        <br />&#160;&#160;&#160; invalue xxx (default=20)         <br />&#160;&#160;&#160;&#160;&#160; &#8216;<font color="#ff0000">/(\d+):(\d\d)(?:\.(\d+))?/</font>&#8216; (REGEXP) = [time8.];         <br />run;</font></p>
</blockquote>
<p><font size="1">For more, see Rick Langston’s paper, <em><a href="http://support.sas.com/resources/papers/proceedings12/245-2012.pdf">Using the New Features in PROC FORMAT</a></em> (2012).</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/02/24/how-to-write-a-check-use-sas-format/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Github for Clinical/Statistical Programmers</title>
		<link>http://www.jiangtanghu.com/blog/2013/02/20/github-for-clinicalstatistical-programmers/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/02/20/github-for-clinicalstatistical-programmers/#comments</comments>
		<pubDate>Thu, 21 Feb 2013 03:01:03 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[CVS]]></category>
		<category><![CDATA[FDA]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GIThub]]></category>
		<category><![CDATA[GOOGLE Code]]></category>
		<category><![CDATA[PhUSE]]></category>
		<category><![CDATA[social coding]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1151</guid>
		<description><![CDATA[PhUSE-FDA Working Group 5 (Development of Standard Scripts for Analysis and Programming) just adopted Google Code as collaborative programming platform. Google Code is one of the most popular and respected open source software hosting sites in the world and it is definitely a good choice for PhUSE-FDA WG5. But after viewing one of WG5’s working [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">PhUSE-FDA Working Group 5 (</font><a href="http://www.phusewiki.org/wiki/index.php?title=Development_of_Standard_Scripts_for_Analysis_and_Programming"><font size="1">Development of Standard Scripts for Analysis and Programming</font></a><font size="1">) just adopted </font><a href="http://code.google.com/p/phuse-scripts/"><font size="1">Google Code</font></a><font size="1"> as collaborative programming platform. </font><a href="http://code.google.com/"><font size="1">Google Code</font></a><font size="1"> is one of the most popular and respected open source software hosting sites in the world and it is definitely a good choice for PhUSE-FDA WG5.</font></p>
<p><font size="1">But after viewing one of WG5’s working reports, <em><a href="http://www.phusewiki.org/wiki/index.php?title=Platform_for_Standard_Script_Development:_Progress_as_of_September_18_2012">Sharing Standard Statistical Scripts</a></em> and getting to know why they finally chose Google Code (rather than </font><a href="https://github.com/"><font size="1">Github</font></a><font size="1"> which was also tested by WG5 members), I think it’s necessary to clarify some misunderstanding against Github where I’m also <a href="https://github.com/Jiangtang">an occasional user</a>. </font></p>
<p><font size="1">As stated in </font><a href="http://www.phusewiki.org/wiki/index.php?title=Platform_for_Standard_Script_Development:_Progress_as_of_September_18_2012"><font size="1">Slide 11</font></a><font size="1"> in the report mentioned before, Github,</font></p>
<blockquote><p><font size="1">Too complicated an interface       <br />Too much overhead for simple development        <br />Too much training and education needed</font></p>
<p><font size="1">designed for classic programming languages like C and Java (not for things like R and SAS)</font></p>
</blockquote>
<p><font size="1">For the first point regarding <strong>interface</strong>, it seems only </font><a href="http://git-scm.com/"><font size="1">Git</font></a><font size="1"> command line tested, and it may be too complicated to “<strong>classic</strong> statistical programming users”. Actually, Github offers a great GUI tool, for example, <em><a href="http://windows.github.com/">GitHub for Windows</a></em> to help users visually clone repositories, commit changes and other management tasks without typing Git commands: </font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/Github_GUI.png"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="Github_GUI" border="0" alt="Github_GUI" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/Github_GUI_thumb.png" width="487" height="427" /></font></a></p>
<p><font size="1">It’s also worthy to mention that with </font><a href="http://windows.github.com/"><em><font size="1">GitHub for Windows</font></em></a><font size="1"><em>, </em>users don’t need to install any separated version control software like Git, CVS or SVN. </font><a href="http://windows.github.com/"><em><font size="1">GitHub for Windows</font></em></a><font size="1"> already includes a fully functional version of </font><a href="http://msysgit.github.com/"><font size="1">msysGit</font></a><font size="1">. It just makes users’ life much simpler. To use Google Code, you must install and configure something like TortoiseSVN.</font></p>
<p><font size="1">The second, is Github suitable for “<strong>things like R and SAS</strong>”? It’s true that all hosts including </font><a href="https://github.com/languages"><font size="1">Github</font></a><font size="1"> are dominated by “classic programming languages like C and Java”. For SAS, SAS programmers as a whole are just not active in&#160; any social coding activities, but for </font><a href="https://github.com/languages/R"><font size="1">R</font></a><font size="1">, actually it is </font><a href="https://www.google.com/webhp?sourceid=chrome-instant&amp;ion=1&amp;ie=UTF-8#q=github+top+languages+R&amp;hl=en&amp;ei=T4QlUeH-HJP62AXxqYGAAQ&amp;start=10&amp;sa=N&amp;bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&amp;fp=50b26647ad5972f8&amp;ion=1&amp;biw=1536&amp;bih=784"><font size="1">one of the mostly used languages in Github</font></a><font size="1">.</font></p>
<p><font size="1">Google Code is good and a “Google Code vs Github” question is just mostly subjective. It seems to me the pickup of Google Code by WG5 rather than Github was based on incomplete information. I personally prefer Github and there are also some good reasons:</font></p>
<ul>
<li><font size="1">Use the GUI tool, </font><a href="http://windows.github.com/"><em><font size="1">GitHub for Windows</font></em></a><font size="1"> to maintain a minimum Git/SVN/CVS setup.</font></li>
<li><font size="1">Github supplies much richer statistics reports, including charts.</font></li>
<li><font size="1">Github is more social oriented which makes it cool in this Web2.0 world.</font></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/02/20/github-for-clinicalstatistical-programmers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linguistic Sorting in SAS Proc Sort</title>
		<link>http://www.jiangtanghu.com/blog/2013/02/19/linguistic-sorting-in-sas-proc-sort/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/02/19/linguistic-sorting-in-sas-proc-sort/#comments</comments>
		<pubDate>Wed, 20 Feb 2013 04:31:04 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[NLS]]></category>
		<category><![CDATA[SORT]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1148</guid>
		<description><![CDATA[Just took a look at the linguistic sorting features in SAS Sort procedure, and got some neat options to apply to my task. For example, I want to sort ID in the following dataset: data t1; &#160;&#160;&#160; input ID $ ; datalines; T20 T4 T3 T1 ; and want to get such intuitive orderings (files [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">Just took a look at the linguistic sorting features in </font><a href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p1nd17xr6wof4sn19zkmid81p926.htm"><font size="1">SAS Sort procedure</font></a><font size="1">, and got some neat options to apply to my task. For example, I want to sort ID in the following dataset:</font></p>
<blockquote><p><font size="1" face="Courier New">data t1;        <br />&#160;&#160;&#160; input ID $ ;         <br />datalines;         <br />T20        <br />T4        <br />T3         <br />T1         <br />;</font></p>
</blockquote>
<p><font size="1">and want to get such intuitive orderings (files sorting in Window 7 directory):</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/sort_num.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="sort_num" border="0" alt="sort_num" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/sort_num_thumb.png" width="411" height="214" /></font></a></p>
<p><font size="1">But when apply the default sorting:</font></p>
<blockquote><p><font size="1" face="Courier New">proc sort data=t1 out=t2;        <br />&#160;&#160;&#160; by ID;         <br />run;</font></p>
</blockquote>
<p><font size="1">I get:</font></p>
<blockquote><p><font size="1" face="Courier New">T1       <br />T20        <br />T3        <br />T4</font></p>
</blockquote>
<p><font size="1">To produce what expected, add a <font color="#ff0000">SORTSEQ</font> option:</font></p>
<blockquote><p><font size="1"><font face="Courier New">proc sort data=t1 out=t3&#160;&#160; <br />&#160;&#160;&#160; <font color="#ff0000">SORTSEQ=LINGUISTIC(NUMERIC_COLLATION=ON)</font>           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ;           <br />&#160;&#160;&#160; by ID;           <br />run; </font></font></p>
</blockquote>
<blockquote><p><font size="1"><font face="Courier New">T1         <br />T3          <br />T4          <br />T20</font></font></p>
</blockquote>
<p><font size="1">In the first block of code, the default sorting is determined by their characters’ appearance in <a href="en.wikipedia.org/wiki/EBCDIC">EBCDIC</a> or the <a href="en.wikipedia.org/wiki/ASCII">ASCII</a> tables (according to OS). To change this default collating sequences, a specific linguistic collation (numeric collation) option added. </font></p>
<p><font size="1">For details, <em>see</em> the corresponding part in <em><a href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p0guut2xk8yz2yn17ibn9nwcyx8v.htm">SAS SORT Procedure</a></em> and <a href="http://support.sas.com/documentation/cdl/en/nlsref/63072/HTML/default/viewer.htm#p1d7k16vtur7s4n1nbbaf8ro6sk7.htm"><em>Collating Sequence in SAS(R) 9.3 National Language Support (NLS)</em></a><em>&#160;</em>with <a href="http://www2.sas.com/proceedings/forum2007/297-2007.pdf">a great paper</a>.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/02/19/linguistic-sorting-in-sas-proc-sort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS ODS Report Writing Interface: A Quick Demo</title>
		<link>http://www.jiangtanghu.com/blog/2013/02/17/sas-ods-report-writing-interface-a-quick-demo/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/02/17/sas-ods-report-writing-interface-a-quick-demo/#comments</comments>
		<pubDate>Mon, 18 Feb 2013 01:21:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[ODS]]></category>
		<category><![CDATA[ODS Report Writing]]></category>
		<category><![CDATA[Report]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1145</guid>
		<description><![CDATA[I personally nominated SAS ODS Report Writing Interface was the one of the best technology I found in SAS in 2012. It can generates reports cell by cell and row by row and has much flexibility to produce highly customized reports. Basically, to use it, first assign an ODS destination. Nothing new, and I prefer [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/IRIS.png"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="IRIS" border="0" alt="IRIS" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/IRIS_thumb.png" width="335" height="451" /></font></a></p>
<p><font size="1">I personally nominated </font><a href="http://support.sas.com/rnd/base/datastep/dsobject/index.html"><font size="1">SAS ODS Report Writing Interface</font></a><font size="1"> was the one of the </font><a href="http://www.jiangtanghu.com/blog/2012/12/31/best-of-sas-a-personal-nomination-2012/"><font size="1">best technology I found in SAS in 2012</font></a><font size="1">. It can generates reports cell by cell and row by row and has much flexibility to produce highly customized reports. Basically, to use it,</font></p>
<ul>
<li><font size="1">first assign an ODS destination. Nothing new, and I prefer HTML like</font></li>
</ul>
<blockquote><p><font size="1" face="Courier New">ods html&#160;&#160; file=&quot;output.html&quot; style=sasweb;</font></p>
</blockquote>
<ul>
<li><font size="1">then create a object(instance) based on the ODS Report Writing class, odsout,</font></li>
</ul>
<blockquote><p><font size="1" face="Courier New">declare odsout myout();</font></p>
</blockquote>
<p><font size="1">ODS Report Writing Interface holds some so called object oriented features. Odsout is a predefined class (or, a SET, a CONTAINER), then you take from it a instance or an object, myout(or any other legal SAS variable names). Suppose Odsout is a class for apples, then myout is a specific apple.</font></p>
<ul>
<li><font size="1">apply methods associated with the Odsout class, like CELL, ROW, TABLE to generate reports.</font></li>
</ul>
<p><font size="1">Roughly methods are just the functions (subroutines, procedures) in the object oriented world. For example, in SAS Data Steps, you use function <font face="Courier New">weight(apple)</font> to get the weight of the apple; in object oriented world, you use <font face="Courier New">apple.weight()</font> to return the same thing. In ODS Report Writing Interface, if you want to get a table, use TABLE methods:</font></p>
<ul>
<ul>
<li><font size="1">myout.TABLE_START() to start a table</font></li>
<li><font size="1">myout.TABLE_END to end a table</font></li>
</ul>
</ul>
<p><font size="1">Then all we need to do next is to use the flexible SAS data steps to leverage the ODS Report Writing Interface methods (see docs). The codes, you can see below, are pretty verbose compared to its counterparts, PROC REPORT, but that’s why it gains power to build highly customized reports. It’s also very structural (and easy to build, like playing blocks):</font></p>
<blockquote><p><font size="1" face="Courier New">/*making a sortable HTML table*/       <br />%macro ods_html_sort_table;        <br />&#160;&#160;&#160; &lt;script src=&#8217;</font><a href="http://goo.gl/Pg0GB'"><font size="1" face="Courier New">http://goo.gl/Pg0GB&#8217;</font></a><font size="1" face="Courier New">&gt;&lt;/script&gt;       <br />&#160;&#160;&#160; &lt;script src=&#8217;</font><a href="http://goo.gl/ruKEb'"><font size="1" face="Courier New">http://goo.gl/ruKEb&#8217;</font></a><font size="1" face="Courier New">&gt;&lt;/script&gt;       <br />&#160;&#160;&#160; &lt;script&gt;$(document).ready(function(){$(&#8216;.table&#8217;).tablesorter({widgets: ['zebra']});});&lt;/script&gt;        <br />%mend;</font></p>
<p><font size="1" face="Courier New">title ;       <br />ods listing close;        <br />ods html&#160;&#160; file=&quot;a:\test\iris.html&quot; style=sasweb headtext=&quot;%ods_html_sort_table&quot;;</font></p>
<p><font size="1" face="Courier New">data _null;       <br />&#160;&#160;&#160; set sashelp.iris;        <br />&#160;&#160;&#160; by Species;        <br />&#160;&#160;&#160; <br />/*&#160;&#160;&#160; create an object, obj, based on the ODS Report Writing class, odsout*/        <br />&#160;&#160;&#160; if _n_ = 1 then do;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; dcl odsout obj();        <br />&#160;&#160;&#160; end;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160; if (first.Species) then do; *by group processing;       <br />&#160;&#160;&#160;&#160;&#160;&#160; obj.title(text: &quot;Fisher&#8217;s Iris Data Set by Species&quot;); *title;</font></p>
<p><font size="1" face="Courier New">/*&#160;&#160;&#160;&#160;&#160;&#160; start a table*/       <br />&#160;&#160;&#160;&#160;&#160;&#160; obj.table_start();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_start();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (Species = &quot;Setosa&quot;) then        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.image(file: &quot;Iris_setosa.jpg&quot; );*insert image;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else if (Species = &quot;Versicolor&quot;) then        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.image(file: &quot;Iris_versicolor.jpg&quot; );        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else if (Species = &quot;Virginica&quot;) then        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.image(file: &quot;Iris_virginica.jpg&quot; );        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_end();</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_start();       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Iris Species&quot;,&#160; overrides: &quot;fontweight=bold just=right&quot; );        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: Species, column_span: 3, overrides: &quot;just=left&quot;);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_end();</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_start();       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Unit&quot;,&#160; overrides: &quot;fontweight=bold just=right&quot; );        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;(mm)&quot;, column_span: 3, overrides: &quot;just=left&quot;);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_end();        <br />&#160;&#160;&#160;&#160;&#160;&#160; obj.table_end();</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160; /* start another table */       <br />&#160;&#160;&#160;&#160;&#160;&#160; obj.table_start();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.head_start();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_start();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Sepal Length&quot; , overrides: &quot;fontweight=bold&quot;);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Sepal Width&quot; , overrides: &quot;fontweight=bold&quot;);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Petal Length&quot; , overrides: &quot;fontweight=bold&quot;);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Petal Width&quot; , overrides: &quot;fontweight=bold&quot;);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_end();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.head_end();        <br />&#160;&#160;&#160; end;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_start();       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(data: SepalLength);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(data: SepalWidth);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(data: PetalWidth);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(data: SepalLength);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_end();</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160; if (last.Species) then do;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.table_end();</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.note(data: &quot;Note: These Tables are Sortable.&quot;); *note;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.foot_start(); *footer;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_start();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.cell_start();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_text(data: &quot;Footer: Data from SAS V&amp;sysver at &amp;sysscp &amp;sysscpl Sashelp.iris&quot;,just:&quot;C&quot;);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.cell_end();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.row_end();        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.foot_end();</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.page();       <br />&#160;&#160;&#160; end;        <br />run;</font></p>
<p><font size="1" face="Courier New">ods html close;       <br />ods listing;</font></p>
</blockquote>
<p><font size="1">Note:</font></p>
<ul>
<li><font size="1">A flavor added to get a sortable HTML report. Thanks to </font><a href="http://www.sasanalysis.com/2013/01/make-all-sas-tables-sortable-in-output.html"><font size="1">Charlie Huang</font></a><font size="1"> and then </font><a href="https://heuristically.wordpress.com/2013/01/17/sortable-html-tables-sas-ods/"><font size="1">Andrew Z</font></a><font size="1"> to introduce a Javascript library JQury to SAS HTML report.</font></li>
<li><font size="1">The full report, see </font><a href="https://heuristically.wordpress.com/2013/01/17/sortable-html-tables-sas-ods/"><font size="1">here</font></a><font size="1">.</font></li>
<li><font size="1">If column spannings needed, use the following codes as header (and the report </font><a href="http://www.jiangtanghu.com/docs/en/demo/iris_spanning.html"><font size="1">here</font></a><font size="1">):</font></li>
<blockquote><p><font size="1" face="Courier New">obj.head_start();         <br />&#160;&#160;&#160; obj.row_start();          <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Sepal&quot; , overrides: &quot;fontweight=bold&quot;,column_span: 2);          <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Petal&quot; , overrides: &quot;fontweight=bold&quot;,column_span: 2);          <br />&#160;&#160;&#160; obj.row_end();</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160; obj.row_start();         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Length&quot; );          <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Width&quot; );          <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Length&quot; );          <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; obj.format_cell(text: &quot;Width&quot; );          <br />&#160;&#160;&#160; obj.row_end();          <br />obj.head_end();</font></p>
</blockquote>
<li><font size="1">ODS Report Writing Interface will get rid of its preproduction hat since SAS 9.4, but you can use it somehow since SAS 9.1.3. For more, see the <a href="http://support.sas.com/documentation/solutions/early/">draft SAS 9.4 ODS documentation</a> with <font size="1">ODS Report Writing Interface.</font></font></li>
<li><font size="1">To get started, see <a href="http://support.sas.com/rnd/base/datastep/dsobject/Power_to_show_paper.pdf">the developer’s paper</a>.</font></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/02/17/sas-ods-report-writing-interface-a-quick-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LearningR!</title>
		<link>http://www.jiangtanghu.com/blog/2013/02/08/learningr/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/02/08/learningr/#comments</comments>
		<pubDate>Sat, 09 Feb 2013 04:37:49 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Coursera]]></category>
		<category><![CDATA[MOOC]]></category>
		<category><![CDATA[plyr]]></category>
		<category><![CDATA[RStudio]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[sqldf]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1141</guid>
		<description><![CDATA[I spent almost all of my blogging time last month to follow an online course in Coursera, Computing for Data Analysis (with R) by Dr. Roger&#160; Peng of Johns Hopkins, Biostatistics Department. I already checked out bunch of Coursera courses just to take a look at what else MOOC look like, this R course was [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/Computing_for_data_analysis_Coursera.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Computing_for_data_analysis_Coursera" border="0" alt="Computing_for_data_analysis_Coursera" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/02/Computing_for_data_analysis_Coursera_thumb.png" width="475" height="422" /></font></a></p>
<p><font size="1">I spent almost all of my blogging time last month to follow an online course in </font><a href="https://www.coursera.org"><font size="1">Coursera</font></a><font size="1">, <em><a href="https://www.coursera.org/course/compdata">Computing for Data Analysis</a></em> (with R) by Dr. </font><a href="http://simplystatistics.org/"><font size="1">Roger&#160; Peng</font></a><font size="1"> of Johns Hopkins, Biostatistics Department. I already checked out bunch of Coursera courses just to take a look at what else </font><a href="http://en.wikipedia.org/wiki/Massive_open_online_course"><font size="1">MOOC</font></a><font size="1"> look like, this R course was the first and only one I took seriously: I reviewed all slides (although didn’t watch the videos since I didn’t have enough time) and most important, finished all programming assignments(and got full score!).</font></p>
<p><font size="1">Not a frequent R user, I used some R packages for learning purpose (mostly in </font><a href="http://www.jiangtanghu.com/blog/2011/01/15/feature-selection-collections-for-self-study/"><font size="1">data mining</font></a><font size="1">). This <em><a href="https://www.coursera.org/course/compdata">Computing for Data Analysis</a></em> course focused mostly on data manipulation and that’s why I chose it to dig into R. R by design is not a tool for data management (where SAS excels), but it’s nice to have (no hurt since it’s free). Those days I put most of my efforts on R data structures(vector, matrix, array, list, data frame) and by grouping processing(*ply functions). Few resource I found extremely useful as a starter:</font></p>
<ul>
<li><a title="http://stackoverflow.com/questions/tagged/r" href="http://stackoverflow.com/questions/tagged/r"><font size="1">http://stackoverflow.com/questions/tagged/r</font></a><font size="1">&#160; when I google a specific R programming technique, mostly I will reach to stackoverflow website, a new generation Q&amp;A hub to replace user forum, mailing list.</font></li>
<li><em><a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;ved=0CDIQFjAA&amp;url=http%3A%2F%2Fcran.r-project.org%2Fdoc%2Fcontrib%2FLam-IntroductionToR_LHL.pdf&amp;ei=O84VUfK7HIue8gSr5YGYBQ&amp;usg=AFQjCNGmMLsnqaHAxGH368m32E8s4STNTA&amp;sig2=Gz7gjUqiPqD-nq_Sg5X57w&amp;bvm=bv.42080656,d.eWU"><font size="1">An introduction to R</font></a></em><font size="1"> by Longhow Lam, a free book. I like its Chapter 2,<em> Data Objects</em>, including R data types and data structures.</font></li>
<li><font size="1"><em>Data Manipulation with R</em> by Phil Spector, one of the Use R! books. I used its Chapter 8, <em>Data Aggregation </em>on R by group processing.</font></li>
<li><a href="http://www.rstudio.com/ide/"><font size="1">RStudio</font></a><font size="1">, a must have R IDE, the best of best. </font></li>
<li><font size="1">Package </font><a href="http://cran.r-project.org/web/packages/plyr/index.html"><font size="1">plyr</font></a><font size="1">, tools for splitting, applying and combining data. Actually, it is awful to use R to manipulate data from a SAS programmer point of view. Use plyr to alleviate the pain.</font></li>
<li><font size="1">Package </font><a href="http://code.google.com/p/sqldf/"><font size="1">sqldf</font></a><font size="1">, like SAS Proc SQL against data frame. Reason, ibid. Use sqldf won’t enhance your R programming skill, but sometime when you feel down at R, you may want to launch piece of SQL scripts you really like.</font></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/02/08/learningr/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Jump into SAS Data Integration Studio</title>
		<link>http://www.jiangtanghu.com/blog/2013/01/12/how-to-jump-into-sas-data-integration-studio/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/01/12/how-to-jump-into-sas-data-integration-studio/#comments</comments>
		<pubDate>Sat, 12 Jan 2013 23:08:14 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[SAS Data Integration Studio]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Transformations]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1138</guid>
		<description><![CDATA[This is for for SAS programmers who might be reluctant to check out a GUI tool like SAS Data Integration Studio (DIS for short, which is graphic tool to implement ETL processes: extract, transform, load). DIS translates all users dragged nodes, transformations and process into SAS codes which are traditionally written by SAS programmers. I [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/SAS2DISJob.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAS2DISJob" border="0" alt="SAS2DISJob" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/SAS2DISJob_thumb.png" width="415" height="452" /></font></a></a></p>
<p><font size="1">This is for for SAS programmers who might be reluctant to check out a GUI tool like SAS Data Integration Studio (DIS for short, which is graphic tool to implement ETL processes: extract, transform, load). DIS translates all users dragged nodes, transformations and process into SAS codes which are traditionally written by SAS programmers. I find one of the benefits of using DIS is that I can package all the ETL work to other players(technical or nontechnical) then they can replay the job by dragging and clicking. </font></p>
<p><font size="1">Actually besides translating all the visual nodes to SAS codes, DIS can also reversely incorporate your SAS codes to the graphic job shown as above. So SAS programmers can easily jump into DIS by importing their codes to get the graphic workflow (to get the first impression). Here is an one-minute demo:</font></p>
<p><font size="1">Save the following codes in a file(from </font><a href="http://support.sas.com/documentation/cdl/en/sqlproc/63043/HTML/default/viewer.htm#p0o4a5ac71mcchn1kc1zhxdnm139.htm" target="_blank"><font size="1">SAS SQL onlinedoc</font></a><font size="1">),</font></p>
<blockquote><p><font size="1" face="Courier New">%let dir=C:\;</font></p>
<p><font size="1" face="Courier New">libname source BASE &quot;&amp;dir&quot;;        <br />libname target BASE &quot;&amp;dir&quot;;</font></p>
<p><font size="1" face="Courier New">data source.one;        <br />&#160;&#160;&#160; input x y;         <br />datalines;         <br />1 2         <br />2 3         <br />;</font></p>
<p><font size="1" face="Courier New">data source.two;        <br />&#160;&#160;&#160; input x y;         <br />datalines;         <br />2 5         <br />3 6         <br />4 9         <br />;</font></p>
<p><font size="1" face="Courier New">proc sql;        <br />&#160;&#160;&#160; create table target.three as         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; select o.x,o.y         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; from source.one as o, source.two as t         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; where o.x=t.x         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ;         <br />quit;</font></p>
<p><font size="1" face="Courier New">proc print data=target.three;        <br />run;</font></p>
</blockquote>
<p><font size="1">Just create a test folder in DIS (this demo was created in a working repository, in a Windows DIS 4.21 machine ) then right click mouse to “Import”-“Import SAS Code” to import the file created above then run the job generated and all set (you will get all stuff showed above).</font></p>
<p><font size="1">Note that the SAS libraries must be registered first in the <em>SAS Metadata</em> Server then you can use it. This demo omit this process only for demo purpose.</font></p>
<p><font size="1">You can check out the SQL Join by double clicking the SQL node:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/SAS2DISJob_SQLJoin.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAS2DISJob_SQLJoin" border="0" alt="SAS2DISJob_SQLJoin" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/SAS2DISJob_SQLJoin_thumb.png" width="412" height="537" /></font></a></p>
<p><font size="1">and your codes in Code panel (still yours!):</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/image.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/image_thumb.png" width="335" height="562" /></a></p>
<p><font size="1">Furthermore, without getting know bunch of the tool first, you can jump into DIS quickly by creating customized Transformations which are basically SAS codes with macro variables as the perimeters in the visual options box. Pretty neat? Just check it out!</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/01/12/how-to-jump-into-sas-data-integration-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Get Row Numbers in SAS Proc SQL (and DO NOT Use the Undocumented MONOTONIC Function)</title>
		<link>http://www.jiangtanghu.com/blog/2013/01/11/get-row-numbers-in-sas-proc-sql/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/01/11/get-row-numbers-in-sas-proc-sql/#comments</comments>
		<pubDate>Fri, 11 Jan 2013 20:01:09 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1111</guid>
		<description><![CDATA[SAS programmers are longing for row number function used in Proc SQL, like ROW_NUMBER() in Oracle SQL and it will act like data step system variable _N_. When you google this question, most likely you will get MONOTONIC() function, which might be one of the most famous undocumented features shipped by SAS. You can of [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">SAS programmers are longing for row number function used in Proc SQL, like </font><a href="http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions137.htm"><font size="1">ROW_NUMBER() in Oracle SQL</font></a><font size="1"> and it will act like data step system variable _N_. When you google this question, most likely you will get MONOTONIC() function, which might be one of the most famous </font><a href="www2.sas.com/proceedings/sugi29/040-29.pdf"><font size="1">undocumented features shipped by SAS</font></a><font size="1">. You can of course use it, but at your own risk! In SAS Usage Note 15138, it&#8217;s said:</font></p>
<blockquote><p><font size="1">The MONOTONIC() function is not supported in PROC SQL. Using the MONOTONIC() function in PROC SQL can cause missing or non-sequential values to be returned.</font></p>
</blockquote>
<p><font size="1">Here question is, why stick to the function? Actually there is a long-existing Proc SQL option (<em>at least since SAS 9.1.3 which was my first SAS version</em>), </font><a href="http://support.sas.com/documentation/cdl/en/sqlproc/63043/HTML/default/viewer.htm"><font size="1">NUMBER</font></a><font size="1"> to return the row numbers:</font></p>
<blockquote><p><font size="1"><font face="Courier New">proc sql number outobs=5;         <br />&#160;&#160;&#160; select Species          <br />&#160;&#160;&#160; from sashelp.iris          <br />&#160;&#160;&#160; ;          <br />quit;<span style="font-family: courier new"></span></font></font></p>
</blockquote>
<p><font size="1">See a new column &quot;Row&quot; was created in response to this NUMBER option.</font></p>
<p style="text-align: center"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" alt="" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/011113_2003_HowtoGetRow1.png" /></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/01/11/get-row-numbers-in-sas-proc-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Started with SAS Tagsets.ExcelXP</title>
		<link>http://www.jiangtanghu.com/blog/2013/01/05/get-started-with-sas-tagsets-excelxp/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/01/05/get-started-with-sas-tagsets-excelxp/#comments</comments>
		<pubDate>Sat, 05 Jan 2013 22:46:24 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[ExcelXP]]></category>
		<category><![CDATA[ODS]]></category>
		<category><![CDATA[ODS Markup]]></category>
		<category><![CDATA[ODS Tagsets]]></category>
		<category><![CDATA[ODS template]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1096</guid>
		<description><![CDATA[Hate it or not (Yes I do), SAS programmers can’t just get rid of Microsoft Office Excel in their life. Now my turn (with Tagsets.ExcelXP, I can at least get rid of DDE)… 0. SAS Templates window A visual way to browse all ODS templates is to use windows command “ODSTEMPLATES” to invoke a SAS [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">Hate it or not (<em>Yes I do</em>), SAS programmers can’t just get rid of Microsoft Office Excel in their life.</font></p>
<p><font size="1">Now my turn (with Tagsets.ExcelXP, I can at least get rid of DDE)…</font></p>
<h1>0. SAS Templates window <a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/ODSTEMPLATES.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ODSTEMPLATES" border="0" alt="ODSTEMPLATES" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/ODSTEMPLATES_thumb.png" width="470" height="296" /></a></h1>
<p><font size="1">A visual way to browse all ODS templates is to use windows command “ODSTEMPLATES” to invoke a SAS template window.</font></p>
<h1>1.&#160; Check the current ExcelXP tagset version</h1>
<blockquote><p align="left"><font size="1"><font face="Courier New">filename temp temp;          <br />ods tagsets.ExcelXP file=temp options(doc=&#8217;help&#8217;);           <br />ods tagsets.ExcelXP close;</font> </font></p>
</blockquote>
<p><font size="1">Scroll down the Log window to the end and you get something like:</font></p>
<blockquote><p><font size="1">NOTE: This is the Excel XP tagset (Compatible with SAS 9.1.3 and above, <font color="#ff0000">v1.122</font>, 01/04/2011). </font></p>
</blockquote>
<h1>2. Get the source codes of current ExcelXP tagset and library it’s stored</h1>
<blockquote><p><font size="1" face="Courier New">proc template;        <br />&#160;&#160;&#160; source Tagsets.ExcelXP;         <br />run;</font></p>
</blockquote>
<p><font size="1">The Log window shows the template codes:</font></p>
<blockquote><p><font size="1">15&#160;&#160; proc template;        <br />16&#160;&#160;&#160;&#160;&#160;&#160; source Tagsets.ExcelXP;         <br />define tagset Tagsets.ExcelXP;         <br />&#160;&#160; parent = Tagsets.ExcelBase;         <br />end;         <br />NOTE: Path &#8216;Tagsets.ExcelXP&#8217; is in: <font color="#ff0000">SASHELP.TMPLMST</font>. </font></p>
</blockquote>
<p><font size="1">Note Tagsets.ExcelXP is subject to Tagsets.ExcelBase.</font></p>
<p><font size="1">The template store path uses a two level name in which SASHELP is a SAS library and TMPLMST, a name assigned to distinguish a set of templates. You can also store your customized templates in SASHELP.mytpl1, WORK.forTLF and such.</font></p>
<p><font size="1">If want a the source codes in a separated file rather than in Log window, try</font></p>
<blockquote><p><font size="1" face="Courier New">proc template;</font></p>
<p><font size="1" face="Courier New">source Tagsets.ExcelXP/<font color="#ff0000">file=&quot;a:\test\ExcelXP.tpl&quot;</font>;         <br />run;</font></p>
</blockquote>
<p><font size="1">The extension doesn’t matter and you can use anything you like (including .SAS).</font></p>
<h1>3. List all ODS template store path</h1>
<blockquote><p><font size="1" face="Courier New">ods path show;</font></p>
</blockquote>
<p><font size="1">Log:</font></p>
<blockquote><p><font size="1">Current ODS PATH list is:</font></p>
<p><font size="1">1. SASUSER.TEMPLAT(UPDATE)        <br />2. SASHELP.TMPLMST(READ)</font></p>
</blockquote>
<p><font size="1">This order also indicates the ODS template searching priority, first SASUSER.TEMPLAT then SASHELP.TMPLMST. If two templates with same name exist in both library, the one in SASUSER.TEMPLAT will be used.</font></p>
<p><font size="1">Templates in SASHELP.TMPLMST can’t be modified(read only).</font></p>
<h1>4. Install latest version in SASUSER library</h1>
<p><font size="1">The last version of ExcelXP tagset is v1.127 by far according to SAS ODS MARKUP portal:</font></p>
<ul>
<ul>
<li><a title="http://support.sas.com/rnd/base/ods/odsmarkup/" href="http://support.sas.com/rnd/base/ods/odsmarkup/"><font size="1">http://support.sas.com/rnd/base/ods/odsmarkup/</font></a> </li>
</ul>
</ul>
<blockquote><p><font size="1" face="Courier New">filename excltags url &#8216;</font><a href="http://support.sas.com/rnd/base/ods/odsmarkup/excltags.tpl';"><font size="1" face="Courier New">http://support.sas.com/rnd/base/ods/odsmarkup/excltags.tpl&#8217;;</font></a><font size="1" face="Courier New">        <br />%include excltags;</font></p>
</blockquote>
<p><font size="1">log:</font></p>
<blockquote><p><font size="1">NOTE: TAGSET &#8216;Tagsets.ExcelBase&#8217; has been saved to: SASUSER.TEMPLAT        <br />NOTE: Overwriting existing template/link: Tagsets.Config_debug         <br />NOTE: TAGSET &#8216;Tagsets.Config_debug&#8217; has been saved to: SASUSER.TEMPLAT         <br /><font color="#ff0000">NOTE: TAGSET &#8216;Tagsets.ExcelXP&#8217; has been saved to: SASUSER.TEMPLAT</font>         <br /></font></p>
</blockquote>
<p><font size="1">Since there is already an ExcelXP tagset in SASHELP.TMPLMST and it can’t be overwritten, this new added ExcelXP tagset is thrown to SASUSER.TEMPLAT by adding a STORE option (check the source code) and will be used when statement “ODS tagsets.ExcelXP” invoked.</font></p>
<h1>5. List all templates</h1>
<blockquote><p><font size="1" face="Courier New">proc template;        <br />&#160;&#160;&#160; list / store=sasuser.templat;         <br />&#160;&#160;&#160; list / store=sashelp.tmplmst;         <br />run;</font></p>
</blockquote>
<p><font size="1">Get output:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/sasuser_templat2.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="sasuser_templat2" border="0" alt="sasuser_templat2" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/sasuser_templat2_thumb.png" width="332" height="285" /></font></a></p>
<p><font size="1">If only type “Tagset” need (<em>to save space!</em>):</font></p>
<blockquote><p><font size="1" face="Courier New">proc template;        <br />list <font color="#ff0000">tagsets</font>/store=sasuser.templat;         <br />run;</font></p>
</blockquote>
<h1>&#160;</h1>
<h1>6. Delete template</h1>
<blockquote><p><font size="1"><font face="Courier New">proc template;          <br />&#160;&#160;&#160; delete Tagsets.ExcelBase;           <br />&#160;&#160;&#160; delete Tagsets.ExcelXP;           <br />run;</font>         <br /></font></p>
</blockquote>
<p align="left"><font size="1">It’s always safe to perform delete statements since <font size="1">items in SASHELP.TMPLMST are read only.</font>&#160; In this case, the ExcelXP tagset in SASUSER.TEMPLAT will be deleted.</font></p>
<p align="left"><font size="1">log:</font></p>
<blockquote><p><font size="1">8617&#160;&#160; proc template;        <br />8618&#160;&#160;&#160;&#160;&#160;&#160; delete Tagsets.ExcelBase;         <br />NOTE: &#8216;Tagsets.ExcelBase&#8217; has been deleted from: SASUSER.TEMPLAT         <br />8619&#160;&#160;&#160;&#160;&#160;&#160; delete Tagsets.ExcelXP;         <br />NOTE: <font color="#ff0000">&#8216;Tagsets.ExcelXP&#8217; has been deleted from: SASUSER.TEMPLAT</font> </font></p>
</blockquote>
<p align="left"><font size="1">check again following step #5 and get what’s in SASUSER.TEMPLAT (no ExcelXP tagset anymore):</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/sasuser_templat.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="sasuser_templat" border="0" alt="sasuser_templat" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/sasuser_templat_thumb.png" width="333" height="247" /></font></a></p>
<h1>7 Install in other specified library</h1>
<p><font size="1">Install ExcelXp tagset in a other library. It will be deleted if current SAS session is killed:</font></p>
<blockquote><p><font size="1" face="Courier New">libname excltags &#8216;a:\test&#8217;;        <br />ods path (prepend) excltags.templat(update);         <br />filename excltags url &#8216;</font><a href="http://support.sas.com/rnd/base/ods/odsmarkup/excltags.tpl';"><font size="1" face="Courier New">http://support.sas.com/rnd/base/ods/odsmarkup/excltags.tpl&#8217;;</font></a><font size="1"><font face="Courier New">          <br />%include excltags;</font> </font></p>
</blockquote>
<p><font size="1">log:</font></p>
<blockquote><p>NOTE: Overwriting existing template/link: Tagsets.ExcelBase      <br />NOTE: TAGSET &#8216;Tagsets.ExcelBase&#8217; has been saved to: EXCLTAGS.TEMPLAT       <br />NOTE: Overwriting existing template/link: Tagsets.Config_debug       <br />NOTE: TAGSET &#8216;Tagsets.Config_debug&#8217; has been saved to: EXCLTAGS.TEMPLAT       <br />NOTE: Overwriting existing template/link: Tagsets.ExcelXP       <br />NOTE: <font color="#ff0000">TAGSET &#8216;Tagsets.ExcelXP&#8217; has been saved to: EXCLTAGS.TEMPLAT</font>       </p>
</blockquote>
<p align="left"><font size="1">show path as step #3:</font></p>
<blockquote><p align="left">Current ODS PATH list is:</p>
<p align="left">1. EXCLTAGS.TEMPLAT(UPDATE)      <br />2. SASUSER.TEMPLAT(UPDATE)       <br />3. SASHELP.TMPLMST(READ)</p>
</blockquote>
<p align="left"><font size="1"></font><font size="1">If apply step #6 to delete ExcelXP tagset, the items in EXCLTAGS.TEMPLAT will be deleted(as same as the searching priority).</font></p>
<h1>8. Hello World</h1>
<p align="left"><font size="1">Adopted from one of Vince DelGobbo’s papers(<a href="http://support.sas.com/rnd/papers/index.html#excel2012">2012</a>):</font></p>
<blockquote><p><font face="Courier New">title &#8216;The CLASS Data Set&#8217;;       <br />footnote &#8216;(From the SASHELP Library)&#8217;;</font></p>
<p><font face="Courier New">*Set some &quot;global&quot; tagset options that affect all worksheets;</font></p>
<p><font face="Courier New">ods tagsets.ExcelXP path=&quot;a:\test\&quot; file=&#8217;MyWorkbook.xml&#8217; style=Printer       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; options(embedded_titles=&#8217;yes&#8217;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; embedded_footnotes=&#8217;yes&#8217;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; print_header=&#8217;&amp;C&amp;A&amp;RPage &amp;P of &amp;N&#8217;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; print_footer=&#8217;&amp;RPrinted &amp;D at &amp;T&#8217;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; autofilter=&#8217;2&#8242;);</font></p>
<p><font face="Courier New">%macro doit;</font></p>
<p><font face="Courier New">proc sort data=sashelp.class (keep=sex) out=class nodupkey;       <br />&#160;&#160;&#160; by sex;        <br />run;</font></p>
<p><font face="Courier New">data _null_;       <br />&#160;&#160;&#160; set class end=eof;        <br />&#160;&#160;&#160; II=left(put(_n_,2.));        <br />&#160;&#160;&#160; call symputx(&#8216;sex&#8217;||II,compress(sex));        <br />&#160;&#160;&#160; if eof then call symputx(&#8216;total&#8217;,II);        <br />run;</font></p>
<p><font face="Courier New">%do i=1 %to &amp;total;       <br />&#160;&#160;&#160; ods tagsets.ExcelXP options(sheet_name=&quot;Students_&amp;&amp;sex&amp;i&quot;);</font></p>
<p><font face="Courier New">&#160;&#160;&#160; proc print data=sashelp.class noobs style(Header)=[just=center];       <br />&#160;&#160;&#160;&#160;&#160; where (sex eq &quot;&amp;&amp;sex&amp;i&quot;);        <br />&#160;&#160;&#160;&#160;&#160; var name age&#160;&#160;&#160;&#160;&#160; / style(Column)=[background=#99ccff];        <br />&#160;&#160;&#160;&#160;&#160; var height weight / style(Column)=[background=#99ccff tagattr='format:#.0'];        <br />&#160;&#160;&#160; run; </font></p>
<p><font face="Courier New">%end;</font></p>
<p><font face="Courier New">%mend doit;</font></p>
<p><font face="Courier New">%doit</font></p>
<p><font face="Courier New">ods tagsets.ExcelXP close;</font>      </p>
</blockquote>
<p align="left"><font size="1">This .XML file can be opened by Office Excel:</font></p>
<p align="left"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/SAS_ExcelXP.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="SAS_ExcelXP" border="0" alt="SAS_ExcelXP" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/SAS_ExcelXP_thumb.png" width="372" height="442" /></a></p>
<h1>9. Get Help</h1>
<p><font size="1">As a new comer, I found the following materials useful and accessible:</font></p>
<ul>
<ul>
<li>
<div align="left"><font size="1"><a href="http://support.sas.com/rnd/base/ods/odsmarkup/">SAS ODS MARKUP homepage</a></font></div>
</li>
<li>
<div align="left"><font size="1">SAS developer <a href="http://www.sas.com/reg/gen/corp/867226?page=Resources">Vince DelGobbo’s homepage on ExcelXP</a></font></div>
</li>
<li>
<div align="left"><font size="1"><a href="http://www.sas.com/events/cm/867226/ExcelXPPaperIndex.pdf">Vince DelGobbo&#8217;s ExcelXP Tagset Paper Index</a></font></div>
</li>
<li>
<h4><font size="1"><a href="http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html">Quick Reference for the TAGSETS.EXCELXP Tagset</a></font></h4>
</li>
<li>
<h4><font size="1"><a href="http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html">Try This Demo: The ExcelXP Tagset and Microsoft Excel</a></font></h4>
</li>
<li>
<h4><font size="1"><a href="http://support.sas.com/resources/papers/proceedings09/323-2009.pdf">Modifying ODS Statistical Graphics Templates in SAS 9.2 by Warren F. Kuhfeld</a></font></h4>
</li>
</ul>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/01/05/get-started-with-sas-tagsets-excelxp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog Statistics: 2012</title>
		<link>http://www.jiangtanghu.com/blog/2013/01/01/blog-statistics-2012/</link>
		<comments>http://www.jiangtanghu.com/blog/2013/01/01/blog-statistics-2012/#comments</comments>
		<pubDate>Wed, 02 Jan 2013 04:47:44 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Google Analytics]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1082</guid>
		<description><![CDATA[(This blog’s page view data from Google Analytics; 43 posts in total in 2012) Top 10 countries/territories and cities Most of my readers come from US and I’m glad my Chinese fellows still fork me since I moved to US this year (today is my one year anniversary in US). To my surprising there are [...]]]></description>
				<content:encoded><![CDATA[<p><span style="font-size: xx-small;">(This blog’s page view data from Google Analytics; </span><a href="http://www.jiangtanghu.com/blog/archives/"><span style="font-size: xx-small;">43 posts in total in 2012</span></a><span style="font-size: xx-small;">)</span></p>
<h1>Top 10 countries/territories and cities</h1>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/blog_country.png"><span style="font-size: xx-small;"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="blog_country" alt="blog_country" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/blog_country_thumb.png" width="382" height="384" border="0" /></span></a></p>
<ul>
<li><span style="font-size: xx-small;">Most of my readers come from US and I’m glad my Chinese fellows still fork me since I moved to US this year (<em>today is my one year anniversary in US</em>).</span></li>
<li><span style="font-size: xx-small;">To my surprising there are much more readers from South Korea than from Japan(#12) and Singapore(#22).</span></li>
<li><span style="font-size: xx-small;">Readers from a secret city (#7) are watching me! </span></li>
</ul>
<h1></h1>
<h1>Top 10 referral social networks</h1>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/blog_social-network.png"><span style="font-size: xx-small;"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="blog_social network" alt="blog_social network" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/blog_social-network_thumb.png" width="168" height="514" border="0" /></span></a></p>
<ul>
<li><span style="font-size: xx-small;">I’m happy that people navigating through Facebook also click this technical blog!</span></li>
</ul>
<h1></h1>
<h1>Top 10 mobile devices</h1>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/blog_mobile.png"><span style="font-size: xx-small;"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="blog_mobile" alt="blog_mobile" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2013/01/blog_mobile_thumb.png" width="396" height="411" border="0" /></span></a></p>
<ul>
<li><span style="font-size: xx-small;">I think myself contributed a lot via Google Nexus 7 (#7) visiting my own blog (<em>one upon a time in 2012, I had two new released Nexus 7 tablets at hand until one dropped down and another sold out…</em>).</span></li>
</ul>
<h1></h1>
<h1>Top 10 most viewed posts</h1>
<ul>
<ul>
<ul>
<li><a href="http://www.jiangtanghu.com/blog/2012/07/13/sublimetext2-sas/"><span style="font-size: xx-small;">Sublime Text 2 for SAS Programmers: A Quick Note</span></a></li>
<li><a href="http://www.jiangtanghu.com/blog/2012/10/23/tony-barr-and-the-early-history-of-sas/"><span style="font-size: xx-small;">Tony Barr and the Early History of SAS</span></a></li>
<li><a href="http://www.jiangtanghu.com/blog/2012/02/11/xml/"><span style="font-size: xx-small;">Face Off: Review OpenCDISC XML files</span></a></li>
<li><a href="http://www.jiangtanghu.com/blog/2012/12/07/sas-books-2012/"><span style="font-size: xx-small;">My SAS Books: Shopping List 2012</span></a></li>
<li><a href="http://www.jiangtanghu.com/blog/2012/09/16/hypothesis-testing/"><span style="font-size: xx-small;">Statistical Notes (4): Dragon’s Teeth and Fleas: Hypothesis Testing in Plain English</span></a></li>
<li><a href="http://www.jiangtanghu.com/blog/2012/09/12/geomean/"><span style="font-size: xx-small;">Statistical Notes (1): Geometric Mean and Geometric Mean Ratio</span></a></li>
<li><a href="http://www.jiangtanghu.com/blog/2012/02/12/column-mode-in-sas-9-3-enhanced-editor/"><span style="font-size: xx-small;">Column Mode in SAS 9.3 Enhanced Editor</span></a></li>
<li><a href="http://www.jiangtanghu.com/blog/2012/11/30/weekend-clip-data-scientist/"><span style="font-size: xx-small;">Weekend Clip: Data Scientist</span></a></li>
<li><a href="http://www.jiangtanghu.com/blog/2012/09/12/tost-equivalence-test/"><span style="font-size: xx-small;">Statistical Notes (2): Equivalence Testing and TOST (Two One-Sided Test)</span></a></li>
<li><a href="http://www.jiangtanghu.com/blog/2012/07/19/publishing-cdisc-standards/"><span style="font-size: xx-small;">Is There Any Better Way? Publishing Process For CDISC Standards Documentation</span></a></li>
</ul>
</ul>
</ul>
<p><span style="font-size: xx-small;">Thank you my fellow readers and happy new year (if you like to have another break, follow me to celebrate Chinese new year at Feb 10, 2013 )!</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2013/01/01/blog-statistics-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best of SAS: A Personal Nomination 2012</title>
		<link>http://www.jiangtanghu.com/blog/2012/12/31/best-of-sas-a-personal-nomination-2012/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/12/31/best-of-sas-a-personal-nomination-2012/#comments</comments>
		<pubDate>Mon, 31 Dec 2012 06:13:03 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Graph]]></category>
		<category><![CDATA[Metadata]]></category>
		<category><![CDATA[ODS]]></category>
		<category><![CDATA[ODS Graphics]]></category>
		<category><![CDATA[ODS Report Writing]]></category>
		<category><![CDATA[PROC FREQ]]></category>
		<category><![CDATA[Proc TTEST]]></category>
		<category><![CDATA[SAS XML Mapper]]></category>
		<category><![CDATA[T-test]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1075</guid>
		<description><![CDATA[There SAS applications/procedures/features were not necessarily available since 2012. This year I paid special attention to them when began to use SAS 9.3. The following notes are&#160; totally my personal endorsement purely based my own experience as a user: XML File Reading: SAS XML Mapper SAS XML Mapper itself is not an elegant tool from [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">There SAS applications/procedures/features were not necessarily available since 2012. This year I paid special attention to them when began to use SAS 9.3. The following notes are&#160; totally my personal endorsement purely based my own experience as a user:</font></p>
<h1>XML File Reading: SAS XML Mapper</h1>
<p><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/SAS_XML_Mapper.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="SAS_XML_Mapper" border="0" alt="SAS_XML_Mapper" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/SAS_XML_Mapper_thumb.png" width="363" height="399" /></a></font></p>
<p><font size="1">SAS XML Mapper itself is not an elegant tool from software design perspective (an example: I keep multiple versions because the latest version seems not carry out all the functionalities from old ones), but it is best XML file processing tool for SAS programmers like me. The sweet part of SAS XML Mapper is that you can use it to get SAS datasets directly with a automatically generated XML mapping file. I use it to import XML files from </font></p>
<blockquote><p><font size="1">CDISC ODM based files like define.xml </font></p>
<p><font size="1">metadata querying results (XML) returned by SAS Metadata Server</font></p>
</blockquote>
<p><font size="1">and it works pretty well and I just can’t live without it!</font></p>
<h1>Graphics Facility: ODS Graphics</h1>
<p><font size="1">ODS Graphics is the raising star among SAS products family since its advent and I also fall into love with her. This system contains</font></p>
<blockquote><p><font size="1">five procedures with “SG” in names,</font></p>
<p><font size="1">a template language(GTL), and</font></p>
<p><font size="1">two GUI tools, ODS Graphics Editor, and ODS Graphics Designer</font></p>
</blockquote>
<p><font size="1">in Base SAS and ODS Statistical Graphics in SAS/STAT (and in SAS/QC which I didn’t check out). ODS Graphics just makes SAS graph&#160; much beautiful and graphics task much fun (and elegant!). </font></p>
<p><font size="1">Btw, it may not be a fair game but still nice to check out a SAS ODS graph and some random pick up R graphs:</font></p>
<p><font size="1">This is <a href="http://blogs.sas.com/content/iml/2011/08/26/visualizing-correlations-between-variables-in-sas/">from Rick Wicklin</a> with 3 lines of codes including one “RUN” statement:</font></p>
<blockquote><pre>proc sgscatter data=sashelp.iris; 
matrix SepalLength--PetalLength /group=Species diagonal=(histogram kernel);
run;</pre>
</blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/SAS_corr2.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAS_corr2" border="0" alt="SAS_corr2" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/SAS_corr2_thumb.png" width="400" height="408" /></a></p>
<p><font size="1">and this is the R homepage graph(and the <a href="http://www.r-project.org/misc/acpclust.R">R codes</a>):</font></p>
<p><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/R_Graphics.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="R_Graphics" border="0" alt="R_Graphics" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/R_Graphics_thumb.png" width="396" height="294" /></a></font></p>
<p><font size="1">and this is <a href="http://gallery.r-enthusiasts.com/">R Graph Gallery</a> homepage:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/r_graph_gallery.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="r_graph_gallery" border="0" alt="r_graph_gallery" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/r_graph_gallery_thumb.png" width="403" height="287" /></a></p>
<p><font size="1">I must say SAS ODS Graphics rocks!</font></p>
<h1>Statistical Procedure: PROC TTEST and PROC FREQ</h1>
<p><font size="1">In this category I list two because they are equally extremely relevant and important for me as statistical SAS programmer.</font></p>
<p><font size="1">PROC TTEST makes equivalence test (which is extremely popular in clinical research) much more accessible by adding a TOST(two one-side test) option. Years ago SAS programmers might use PROC MIXED or other methods for this kind of statistical test(<font size="1">I also took a note on this topic, see <a href="http://www.jiangtanghu.com/blog/2012/09/12/tost-equivalence-test/" target="_blank">here</a></font>).</font></p>
<p><font size="1">The new on PROC FREQ I checked out is to support much richer methods on calculating confidence intervals for binomial proportion (my note <a href="http://www.jiangtanghu.com/blog/2012/09/15/confidence-intervals-binomial-proportion/" target="_blank">here</a>) and confidence intervals for difference between independent binomial proportions (my note <a href="http://www.jiangtanghu.com/blog/2012/09/23/statistical-notes-5-confidence-intervals-for-difference-between-independent-binomial-proportions-using-sas/" target="_blank">here</a>) which are also extremely important in clinical research and I programmed a lot.</font></p>
<h1>Report Writing: ODS Report Writing Interface</h1>
<p><font size="1">My first SAS version was 9.1.3 where PROC REPORT is the primary SAS reporting writing tool (with ODS) while PROC TABULATE not in fashion anymore (and you may merely hear the arguments among these two procedures since then). I used PROC REPORT for all my production work for reporting since recently I tried the </font><a href="http://support.sas.com/rnd/base/datastep/dsobject/index.html" target="_blank"><font size="1">ODS Report Writing Interface</font></a><font size="1"> in a project for non-rectangular tables. It’s great and everyone was happy! </font></p>
<p><font size="1">Basically it is an ODS enhanced DATA _NULL_ reporting writing method (<em>DATA _NULL_ with <font color="#ff0000">FILE PRINT</font> statements: it’s an even older way for me</em>);a new ODS output object declared within DATA _NULL_:</font></p>
<blockquote>
<p><font size="1" face="Courier New">dcl odsout obj();</font></p>
</blockquote>
<p><font size="1">I like this kind of reporting method: you can control your report line by line and cell by cell (although with more lines of structured codes!).</font></p>
<h1>Metadata Querying Tool: PROC METADATA </h1>
<p><font size="1">In this category, the other two strong candidates are JAVA interface and SAS Data Step Functions. I like PROC Metadata against JAVA because it holds the same full functionality (while SAS Data Step Functions, no yet) while I can still work in SAS to produce reports (just add a new line to start to use ODS Report Writing Interface:)). Furthermore, I feel much comfortable working with SAS!</font></p>
<p><font size="1">PROC Metadata uses XML as inputs and outputs: it may be not admirable compared to Data Step Functions. Since I use SAS XML Mapper, it’s not a problem anymore!</font></p>
<h1>Documentation </h1>
<p><font size="1">I like the totally new SAS help and documentation system both online and offline since SAS 9.3. </font></p>
<p><font size="1">First in Base SAS, lots of files were separated from “SAS Language Dictionary”,</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/SAS_Docs_offline.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="SAS_Docs_offline" border="0" alt="SAS_Docs_offline" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/SAS_Docs_offline_thumb.png" width="420" height="420" /></a></p>
<p><font size="1">and in all procedures guide, the <a href="http://www.jiangtanghu.com/blog/2012/07/14/tab-is-a-tab-is-a-tab-is-a-tab/">tab</a> view looks great:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/SAS_Docs.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="SAS_Docs" border="0" alt="SAS_Docs" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/SAS_Docs_thumb.png" width="452" height="271" /></a></p>
<p><p><font size="1"></font></p>
<p><font size="1"></font></p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/12/31/best-of-sas-a-personal-nomination-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Great, Open, Vendor-neutral, Platform-independent Data Standards, . . . Yet in PDF Formats</title>
		<link>http://www.jiangtanghu.com/blog/2012/12/29/cdisc-in-pdf-format/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/12/29/cdisc-in-pdf-format/#comments</comments>
		<pubDate>Sat, 29 Dec 2012 22:47:36 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[format]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1062</guid>
		<description><![CDATA[You know I mean the CDISC standards including CDASH, SDTM, SEND, ADaM, … and you are right there are few not only in PDF format (ODM, define.xml for example). Today Jozef (Jos) Aerts from XML4Pharma posted his frustration of copying and pasting metadata from only PDF-formed SDTM-IG 3.1.4.&#160; I hate to complain the volunteer work [...]]]></description>
				<content:encoded><![CDATA[<p>You know I mean the <a href="http://www.cdisc.org/mission-and-principles" target="_blank">CDISC</a> standards including CDASH, SDTM, SEND, ADaM, … and you are right there are few not only in PDF format (ODM, define.xml for example). </p>
<p>Today Jozef (Jos) Aerts from <a href="http://www.xml4pharma.com" target="_blank">XML4Pharma</a> posted his <a href="http://cdiscguru.blogspot.com/2012/12/another-copy-and-paste-frustration.html" target="_blank">frustration of copying and pasting metadata from only PDF-formed SDTM-IG 3.1.4</a>.&#160; I hate to complain the volunteer work by the CDISC team but it is worth a discussion, <a href="http://www.jiangtanghu.com/blog/2012/07/19/publishing-cdisc-standards/">is there any better way to publish CDISC Standards</a>? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/12/29/cdisc-in-pdf-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weekend Clips: Data Scientist Episode II</title>
		<link>http://www.jiangtanghu.com/blog/2012/12/23/weekend-clips-data-scientist-episode-ii/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/12/23/weekend-clips-data-scientist-episode-ii/#comments</comments>
		<pubDate>Sun, 23 Dec 2012 20:14:13 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[data mining]]></category>
		<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Data Scientist]]></category>
		<category><![CDATA[Kaggle]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1054</guid>
		<description><![CDATA[1. What is A Data Scientist Anyway? 2. You Just Can’t Be Replaced by Yourselves! 3. We are all Data Scientists!]]></description>
				<content:encoded><![CDATA[<p><font size="1"></font></p>
<p><font size="1">1. What is A Data Scientist Anyway?</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/image.png"><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/image3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/image_thumb3.png" width="487" height="94" /></a></font></a></p>
<p><font size="1">2. You Just Can’t Be Replaced by Yourselves!</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/image1.png"><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/image11.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/image11_thumb.png" width="489" height="94" /></a></font></a></p>
<p><font size="1">3. We are </font><a href="http://en.wikipedia.org/wiki/Kaggle" target="_blank"><font size="1">all Data Scientists</font></a><font size="1">!</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/image2.png"><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/image12.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/image1_thumb.png" width="482" height="108" /></a></font></a></p>
<p><font size="1"></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/12/23/weekend-clips-data-scientist-episode-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS Certified, Again</title>
		<link>http://www.jiangtanghu.com/blog/2012/12/22/sas-certified-again/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/12/22/sas-certified-again/#comments</comments>
		<pubDate>Sun, 23 Dec 2012 04:13:39 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[SAS Certificate]]></category>
		<category><![CDATA[SAS Data Integration Studio]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=1044</guid>
		<description><![CDATA[Last week I got another SAS certification, SAS Certified Data Integration Developer for SAS 9 and I must say it can’t be better as a SAS holiday gift for myself! I took all my SAS certificates when employed (when in Sanofi Pasteur, 2010, I got two SAS programming certificates, Base and Advanced). You may say [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/logo.jpg"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="logo" border="0" alt="logo" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/logo_thumb.jpg" width="314" height="72" /></a></p>
<p><font size="1">Last week I got another SAS certification, <em><a href="http://support.sas.com/certify/creds/did.html" target="_blank">SAS Certified Data Integration Developer for SAS 9</a></em> and I must say it can’t be better as a </font><a href="http://www.notecolon.info/2012/12/note-present-thinking.html" target="_blank"><font size="1">SAS holiday gift</font></a><font size="1"> for myself!</font></p>
<p><font size="1">I took all my SAS certificates when employed (when in Sanofi Pasteur, 2010, I got two SAS programming certificates, </font><a href="http://support.sas.com/certify/creds/bp.html" target="_blank"><font size="1">Base</font></a><font size="1"> and </font><a href="http://support.sas.com/certify/creds/ap.html" target="_blank"><font size="1">Advanced</font></a><font size="1">). You may say it’s kind of certificate for sake of certificate and not for applying a job like college students. You are right and few reasons I like to earn such certificates at work:</font></p>
<ul>
<li><font size="1">It doesn’t hurt! Little better than nothing and holding a certificate will never make a thing worse off.</font> </li>
<li><font size="1">It’s highly relevant. Only few additional efforts needed to take such SAS certificate examinations when worked as SAS programmer and solution consultant.</font> </li>
<li><font size="1">It’s necessary(<em>somehow</em>). When worked as a SAS programmer at pharma,&#160; I played data manipulations techniques heavily, but never used a indexing method because it’s not needed due to limited cases of clinical data: recruiting a thousand subjects is even not a easy task! Then I took SAS Advance test and I filled the hole of SAS index.</font> </li>
<li><font size="1">It’s fun; actually I mean the certificate fee was paid by my employers (<em>thanks!</em>)…I got this <a href="http://scholar.harvard.edu/files/my_rules_of_thumb_0.pdf" target="_blank">from Prof. N. Gregory Mankiw</a>:</font> </li>
</ul>
<blockquote><p><font size="1">Most people who pursue an academic career do so because they are fascinated by their subject. It is for this reason that professors report among the highest rates of job satisfaction of all professions. Professors have found what they like to do, and they have found someone to pay them to do it. </font></p>
</blockquote>
<p><em><font size="1">(then change “people/professor” to “SAS Programmer”)</font></em></p>
<p><font size="1">I’m always enamored of playing with SAS in any kind of forms: writing SAS codes, configuring SAS products, reading SAS books, taking SAS certificates, and very important, I’m paid to do these!</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/12/22/sas-certified-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My SAS Books: Shopping List 2012</title>
		<link>http://www.jiangtanghu.com/blog/2012/12/07/sas-books-2012/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/12/07/sas-books-2012/#comments</comments>
		<pubDate>Sat, 08 Dec 2012 04:36:30 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[CDISC]]></category>
		<category><![CDATA[Macro]]></category>
		<category><![CDATA[ODS Graphics]]></category>
		<category><![CDATA[Web Programming]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=811</guid>
		<description><![CDATA[Last year I threw away all my SAS books (to friends and colleagues in Beijing) before moving to US. You might agree that it’s not economically bound to transport such heavy books intercontinentally! Now I just start to build my SAS library one by one. I will most probably not buy more SAS books as [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/SAS_Books.jpg"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAS_Books" border="0" alt="SAS_Books" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/12/SAS_Books_thumb.jpg" width="384" height="224" /></a></font></p>
<p><font size="1">Last year I threw away all my SAS books (to friends and colleagues in Beijing) before moving to US. You might agree that it’s not economically bound to transport such heavy books intercontinentally! Now I just start to build my SAS library one by one. </font></p>
<p><font size="1">I will most probably not buy more SAS books as Christmas gifts for myself, so it’s time to take a 2012 snapshot of shopping:</font></p>
<h5>I Programming Books by Art Carpenter </h5>
<p><font size="1">1 <em><a href="http://www.amazon.com/gp/product/1590473841/ref=wms_ohs_product" target="_blank">Carpenter&#8217;s Complete Guide to the SAS Macro Language, 2nd Edition</a>, 2004</em></font></p>
<p><font size="1">Best of best on SAS (dynamic) programming. I also had a hardcopy in Beijing. <font color="#ff0000">★★★★★</font></font></p>
<p><font size="1">2<em>&#160;</em></font><a href="http://www.amazon.com/gp/product/1607649918/ref=wms_ohs_product" target="_blank"><em><font size="1">Carpenter&#8217;s Guide to Innovative SAS Techniques</font></em></a>,<font size="1"> 2012</font></p>
<p><font size="1">It’s new by Carpenter and nice to check out. </font></p>
<p><font size="1">3 </font><a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=60966"><font size="1"><em>Carpenter&#8217;s Complete Guide to the SAS REPORT Procedure</em></font></a><font size="1">, 2007</font> </p>
<p> Use <a href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p0bqogcics9o4xn17yvt2qjbgdpi.htm" target="_blank"><font size="1">Proc Report</font></a><font size="1">! It is the workhorse procedure for SAS report writing and </font><a href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#n00yutbvvckjwrn1ldg5xkvjy1pu.htm" target="_blank"><font size="1">Proc Tabulate</font></a><font size="1"> is not in fashion anymore!</font>
<p><font size="1">Btw, The historically called SAS DATA _NULL_ report writing now has a brand new name, ODS Report Writing Interface, due to the incorporated ODS facility(which is cool). I think it deserves a new title.</font></p>
<p><font size="1"><font size="1">PS: I got it free from the latest </font><a href="http://www.rtsug.org/" target="_blank"><font size="1">RTSUG</font></a><font size="1"> (Research Triangle SAS Users&#8217; Group) meeting. </font></font></p>
<h5>II Programming Miscellaneous</h5>
<p><font size="1">4 </font><a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=62255"><font size="1"><em>Web Development with SAS by Example</em>, Third Edition</font></a><font size="1"> by Frederick Pratter, 2011</font></p>
<p><font size="1">Want to play HTML/htmSQL/AJAX/Javascript… within SAS. no comments by far.</font></p>
<p><font size="1">5&#160; </font><a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=62230"><font size="1"><em>SAS Hash Object Programming Made Easy</em></font></a><font size="1"> by Michele Burlew, 2012</font></p>
<p><font size="1">Totally new title on this topic. Nice to approach to the new area.</font></p>
<h5>III ODS Graphics</h5>
<p><font size="1">6 </font><a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=63855"><font size="1"><em>Statistical Graphics Procedures by Example: Effective Graphs Using SAS</em></font></a><font size="1"> by Sanjay Matange and Dan Heath, 2011</font></p>
<p><font size="1">SAS ODS Graphics is the rising Star! I also read other title on ODS statistical graphics in Beijing, </font></p>
<p><a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=63120"><font size="1"><em>Statistical Graphics in SAS: An Introduction to the Graph Template Language and the Statistical Graphics Procedures</em></font></a><font size="1"> by Warren Kuhfeld</font></p>
<p><font size="1">You may read plenty of ODS Graphics&#160; papers by these authors/developers from SAS Institute.</font></p>
<h5>IV Statistical Books</h5>
<p><font size="1">7 </font><a href="http://www.amazon.com/gp/product/160764228X/ref=wms_ohs_product" target="_blank"><font size="1"><em>Common Statistical Methods for Clinical Research with SAS Examples</em>, Third Edition</font></a><font size="1"> by Glenn Walker, Jack Shostak, 2010</font></p>
<p><font size="1">Best for SAS clinical programmers. Relevant, comprehensive and easy to access. I had a second version in Beijing. <font color="#ff0000">★★★★★</font></font></p>
<p><em><font size="1">8 </font><a href="http://www.amazon.com/gp/product/1607647834/ref=wms_ohs_product" target="_blank"><font size="1">Multiple Comparisons and Multiple Tests Using SAS, Second Edition</font></a><font size="1"> by </font></em><font size="1">Peter H. Westfall, Randall D. Tobias, Russell D. Wolfinger, 2011</font></p>
<p><font size="1">Multiple comparison is an advanced topic and is beyond my limited statistical knowledge. My short term goal is just to follow the codes then interprete results.</font></p>
<h5>V CDISC</h5>
<p><font size="1">9 </font><a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=64409"><font size="1"><em>Implementing CDISC Using SAS: An End-to-End Guide</em></font></a><font size="1"> by Chris Holland and Jack Shostak, 2012</font></p>
<p><font size="1">Still on the way. The first title on CDISC + SAS and worth of waiting. I read Jack Shostak’s another book when applying a SAS programmer job at Sanofi Pasteur Beijing R&amp;D in 2009:</font></p>
<blockquote><p><a href="https://support.sas.com/pubscat/bookdetails.jsp?pc=59827"><font size="1"><em>SAS Programming in the Pharmaceutical Industry</em></font></a></p>
</blockquote>
<h5>VI My Wish List 2013</h5>
<p><font size="1">10 </font><a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=60282"><font size="1"><em>Building Web Applications with SAS/IntrNet: A Guide to the Application Dispatcher</em></font></a><font size="1"> by Don Henderson</font></p>
<p><font size="1">SAS web programming again. I might read this title before #4. Don Henderson was the former SAS developer and SAS/IntrNet was just his baby!</font></p>
<p><font size="1">11 </font><a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=63460"><font size="1"><em>Categorical Data Analysis Using SAS, Third Edition</em></font></a><font size="1"> by Maura Stokes, Charles Davis, and Gary Koch</font></p>
<p><font size="1">I had a second version hardcopy in Beijing and it’s still cool to play with 2*2 table in this so called BIG DATA world! <font color="#ff0000">★★★★★</font></font></p>
<p><font size="1">12 </font><a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=65193"><font size="1"><em>Cody&#8217;s Collection of Popular SAS Programming Tasks and How to Tackle Them</em></font></a><font size="1"> by Ron Cody</font></p>
<p><font size="1">I read and like <a href="https://support.sas.com/pubscat/bookdetails.jsp?pc=62857" target="_blank">Cody’s book on SAS functions</a> and it’s always nice to check out his new title.</font></p>
<p><font size="1">13 </font><a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=60751"><font size="1"><em>The Global English Style Guide: Writing Clear, Translatable Documentation for a Global Market</em></font></a><font size="1"> by John R. Kohl</font></p>
<p><font size="1">I read the free chapter and it would be good book to polish my English as a technical blog writer.</font></p>
<p><font size="1">14</font> <a href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;pc=65423"><font size="1"><em>The Little SAS Book: A Primer, Fifth Edition</em></font></a><font size="1"> by Lora Delwiche and Susan Slaughter</font></p>
<p><font size="1">I forget the version I read back to the time I first approached to SAS and it’s nice to hold a latest version in shelf and I’d rather learn the effective writing! Best for beginners. <font color="#ff0000">★★★★★</font></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/12/07/sas-books-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Weekend Clip: Data Scientist</title>
		<link>http://www.jiangtanghu.com/blog/2012/11/30/weekend-clip-data-scientist/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/11/30/weekend-clip-data-scientist/#comments</comments>
		<pubDate>Sat, 01 Dec 2012 03:31:52 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[data mining]]></category>
		<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Data Scientist]]></category>
		<category><![CDATA[Joke]]></category>
		<category><![CDATA[Tweet]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=807</guid>
		<description><![CDATA[Two tweets: One blog post: Statisticians aren’t the problem for data science. The real problem is too many posers One job advertisement: SAS Data Scientist ?(!) A joke: The biggest joke about data scientist is that the Google query “data scientist joke” returns nothing interesting.]]></description>
				<content:encoded><![CDATA[<h5>Two tweets:</h5>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/11/image.png"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/11/image_thumb.png" width="525" height="101" /></font></a></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/11/image1.png"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/11/image_thumb1.png" width="522" height="87" /></font></a></p>
<h5>One blog post:</h5>
<p><em><a href="http://mathbabe.org/2012/07/31/statisticians-arent-the-problem-for-data-science-the-real-problem-is-too-many-posers/" target="_blank"><font size="1">Statisticians aren’t the problem for data science. The real problem is too many posers</font></a></em></p>
<h5>One job advertisement:</h5>
<p><a href="http://www.ziprecruiter.com/job/SAS-Data-Scientist/1f127e2e/?source=social-linkedin-group-jobs" target="_blank"><font size="1">SAS Data Scientist</font></a><font size="1"> ?(!)</font></p>
<h5>A joke:</h5>
<p><font size="1">The biggest joke about data scientist is that the Google query “</font><a href="https://www.google.com/search?q=data+scientist+joke" target="_blank"><font size="1">data scientist joke</font></a><font size="1">” returns nothing interesting.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/11/30/weekend-clip-data-scientist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract the Version of SAS and OS of a SAS Format or Macro Catalog: A Little Bit of Perl Regular Expression</title>
		<link>http://www.jiangtanghu.com/blog/2012/11/25/sas-catalog-version/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/11/25/sas-catalog-version/#comments</comments>
		<pubDate>Mon, 26 Nov 2012 01:36:52 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[Macro]]></category>
		<category><![CDATA[Perl Regular Expression]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=801</guid>
		<description><![CDATA[SAS Sample 34444(Determine the operating system in which a format catalog was created) posts piece of codes to get the version of SAS and OS of a SAS format catalog. It is useful since a SAS catalog can be only read in the operating systems same to its source machine. 2 cents add to this [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">SAS Sample 34444(<em><a href="http://support.sas.com/kb/34/443.html" target="_blank">Determine the operating system in which a format catalog was created</a></em>) posts piece of codes to get the version of SAS and OS of a SAS format catalog. It is useful since a SAS catalog can be only read in the operating systems same to its source machine.</font></p>
<p><font size="1">2 cents add to this note:</font></p>
<p><font size="1">First, we do not need to write codes to get to know the machine version for a catalog(<em><strong>formats.sas7bcat </strong></em>or<strong> <em>sasmacr.sas7bcat</em></strong>). Just open the catalog using a text editor, Notepad++, then you get</font></p>
<blockquote><p><font size="1">a SAS format catalog created by SAS 9.1 in a Windows XP Pro machine:</font></p>
</blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/11/SAS_Format.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAS_Format" border="0" alt="SAS_Format" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/11/SAS_Format_thumb.png" width="475" height="408" /></font></a></p>
<blockquote><p><font size="1">and a SAS macro catalog by SAS 9.3 in a 64 bits Windows 7 Pro machine:</font></p>
</blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/11/SAS_Macro.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAS_Macro" border="0" alt="SAS_Macro" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/11/SAS_Macro_thumb.png" width="464" height="375" /></font></a></p>
<p><font size="1">Second, if do want programming (for curiosity purpose; I like this idea), we can also improve the sample codes since the position and length information were hard coded in Line 21 (the question is: how can we know that?):</font></p>
<blockquote><p><font size="1" face="Courier New">test=substr(theline,<font color="#ff0000">210</font>,<font color="#ff0000">20</font>);</font></p>
</blockquote>
<p><font size="1">To get rid of hard coding, I use Perl Regular Expression. Just copy the archived codes for </font><a href="http://www.sesug.org/SESUG2012/abstract.html#BB-04" target="_blank"><font size="1">my SESUG 2012 talk</font></a><font size="1"> with tiny modification (I always use the same programming blocks if possible):</font></p>
<p><a title="https://github.com/Jiangtang/SESUG2012/blob/master/read_SAP.sas" href="https://github.com/Jiangtang/SESUG2012/blob/master/read_SAP.sas"><font size="1">https://github.com/Jiangtang/SESUG2012/blob/master/read_SAP.sas</font></a></p>
<p><font size="1">The following codes can be also used to run against SAS macro catalog:</font></p>
<blockquote><p><font size="1" face="Courier New">filename fmt &quot;a:formats.sas7bcat&quot;;</font></p>
<p><font size="1" face="Courier New">data fmt;        <br />&#160;&#160; infile fmt lrecl=1000 truncover;         <br />&#160;&#160; input line $1000.;         <br />run;</font></p>
<p><font size="1" face="Courier New">data _null_;        <br />&#160;&#160;&#160; set fmt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if _n_=1 then do;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; retain queVer;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">ver=&quot;/(d+).[dw]+_[dw]+/&quot;;</font>         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; queVer&#160; = prxparse(ver);</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if missing(queVer) then do;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; putlog &quot;ERROR: Invalid regexp&quot; ver;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; stop;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end;         <br />&#160;&#160;&#160;&#160;&#160; end;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160; queVerN&#160; = prxmatch(queVer ,line);</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160; if queVerN &gt; 0&#160; then do ;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call PRXsubstr(queVer,line,position,length);         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; version = compress(substr(line, position, length));         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; output;         <br />&#160;&#160;&#160;&#160;&#160; end;&#160;&#160;&#160; </font></p>
<p><font size="1"><font face="Courier New">&#160;&#160;&#160;&#160;&#160; put position= length=;          <br />&#160;&#160;&#160;&#160;&#160; put version=;           <br />run;</font>         <br /></font></p>
</blockquote>
<p><font size="1">Test it against five Windows machines: </font></p>
<blockquote><p><font size="1">position=221 length=16        <br />version=9.0301M1X64_7PRO</font></p>
<p><font size="1">position=217 length=15        <br />version=9.0202M2NET_SRV </font></p>
<p><font size="1">position=221 length=17        <br />version=9.0202M3X64_SRV08 </font></p>
<p><font size="1">position=217 length=14        <br />version=9.0100A0XP_PRO</font></p>
<p><font size="1">position=217 length=15        <br />version=9.0101M3NET_SRV </font></p>
</blockquote>
<p><font size="1"></font></p>
<p><font size="1">P.S.: The pattern <strong>(d+).[dw]+_[dw]+</strong>&#160; can be read as</font></p>
<blockquote><p><font size="1">number(s)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +        <br />.&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +         <br />some digits and words&#160;&#160;&#160;&#160; +         <br />_&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +         <br />some digits and words</font></p>
</blockquote>
<p><font size="1">Since the underscore “_” is also included in meta-character <strong>w</strong>, it seems OK to simplify the pattern above to </font></p>
<blockquote><p><strong><font size="1">(d+).[dw]+ </font></strong></p>
</blockquote>
<p><font size="1">But in a Window Server 2003 machine with SAS 9.2, it also returns the following unrelated information:</font></p>
<blockquote><p><font size="1">position=998 length=3        <br />version=2.S </font></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/11/25/sas-catalog-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress and Black Friday</title>
		<link>http://www.jiangtanghu.com/blog/2012/11/23/wordpress-and-black-friday/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/11/23/wordpress-and-black-friday/#comments</comments>
		<pubDate>Sat, 24 Nov 2012 04:04:03 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Black Friday]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[GIThub]]></category>
		<category><![CDATA[jekyll]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=794</guid>
		<description><![CDATA[Yes it’s BLACK that today this WordPress based blog was down for a while with a 500 error: The website encountered an error while retrieving http://www.jiangtanghu.com/blog/. It may be down for maintenance or configured incorrectly. I checked web log and it says: [24-Nov-2012 02:58:49] PHP Parse error:&#160; syntax error, unexpected T_STRING, expecting &#8216;,&#8217; or &#8216;;&#8217; [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">Yes it’s BLACK that today this WordPress based blog was down for a while with a 500 error:</font></p>
<blockquote><p><font size="1">The website encountered an error while retrieving </font><a href="http://www.jiangtanghu.com/blog/"><font size="1">http://www.jiangtanghu.com/blog/</font></a><font size="1">. It may be down for maintenance or configured incorrectly.</font></p>
</blockquote>
<p><font size="1"> I checked web log and it says:</font></p>
<blockquote><p><font size="1">[24-Nov-2012 02:58:49] PHP Parse error:&#160; syntax error, unexpected T_STRING, expecting &#8216;,&#8217; or &#8216;;&#8217; in ../public_html/jiangtanghu/blog/wp-content/plugins/wp-conditional-captcha/wp-conditional-captcha.php on line 401</font></p>
</blockquote>
<p><font size="1">So the problem comes from a WordPress plugin “</font><a href="http://wordpress.org/extend/plugins/wp-conditional-captcha/" target="_blank"><font size="1">Conditional CAPTCHA for WordPress</font></a><font size="1">” . The line 401 in <em>wp-conditional-captcha.php</em> is</font></p>
<blockquote><p><font size="1">&lt;li&gt;&lt;input type=&quot;radio&quot; name=&quot;pass_action&quot; id=&quot;pass_action_hold&quot; value=&quot;hold&quot; &lt;?php checked( $opts['pass_action'], &#8216;hold&#8217;);?&gt; /&gt; &lt;label for=&quot;pass_action_hold&quot;&gt;&lt;?php _e(&#8216;Queue the comment for moderation&#8217;, &#8216;wp-conditional-captcha&#8217;);?&gt;&lt;/label&gt;&lt;/li&gt;</font></p>
</blockquote>
<p><font size="1">I use WordPress v3.4.2 and “</font><a href="http://wordpress.org/extend/plugins/wp-conditional-captcha/" target="_blank"><font size="1">Conditional CAPTCHA for WordPress</font></a><font size="1">” v3.2.6. I didn’t notice this error before and it may be a compatibility issue (I know 0 about PHP). So my solution: delete the plugin.</font></p>
<p><font size="1">Furthermore, I plan to switch to Github+</font><a href="https://github.com/mojombo/jekyll" target="_blank"><font size="1">jekyll</font></a><font size="1"> and get rid of WordPress (sorry, you are wonderful; I&#8217;m just an emotional customer in this crazy Black Friday) .</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/11/23/wordpress-and-black-friday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Macro Quoting in SAS Data Integration Studio</title>
		<link>http://www.jiangtanghu.com/blog/2012/11/19/macro-quoting-in-sas-data-integration-studio/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/11/19/macro-quoting-in-sas-data-integration-studio/#comments</comments>
		<pubDate>Tue, 20 Nov 2012 02:35:04 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Macro]]></category>
		<category><![CDATA[Macro Quoting]]></category>
		<category><![CDATA[SAS Data Integration Studio]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=792</guid>
		<description><![CDATA[You can run the following piece of codes successfully in these 3 SAS programming environments: BASE SAS Enterprise Guide: create a new “File-New-Program” SAS Data Integration Studio: create a new “Tool-Code Editor” %let species=&#34;Setosa&#34; &#34;Versicolor&#34;; data a; &#160;&#160;&#160; set sashelp.iris; &#160;&#160;&#160; where species in (&#38;species); run; Then create a Transformation in SAS Data Integration Studio [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">You can run the following piece of codes successfully in these 3 SAS programming environments:</font></p>
<ul>
<li><font size="1">BASE SAS </font></li>
<li><font size="1">Enterprise Guide: create a new “File-New-Program” </font></li>
<li><font size="1">SAS Data Integration Studio: create a new “Tool-Code Editor” </font></li>
</ul>
<blockquote><p><font size="1" face="Courier New">%let species=&quot;Setosa&quot; &quot;Versicolor&quot;;</font></p>
<p><font size="1"><font face="Courier New">data a;          <br />&#160;&#160;&#160; set sashelp.iris;           <br />&#160;&#160;&#160; where species in (&amp;species);           <br />run;</font> </font></p>
<p><font size="1" face="Courier New"></font></p>
</blockquote>
<p><font size="1">Then create a <font color="#00ff00">Transformation</font> in SAS Data Integration Studio (DIS for short; I use version 4.3 in a Win 7 machine) using the codes above as source code (remember deleting first line) and create a simple <font color="#00ff00">Prompt</font> to assign the macro variable &amp;species with default values as <em>&quot;Setosa&quot; &quot;Versicolor&quot;</em>:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/11/SAS_DIS_Transformation.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SAS_DIS_Transformation" border="0" alt="SAS_DIS_Transformation" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/11/SAS_DIS_Transformation_thumb.png" width="519" height="475" /></a></p>
<p><font size="1">Drag this <font color="#00ff00">Transformation</font> in a single node <font color="#00ff00">job</font> and run, then you will get such errors:</font></p>
<blockquote><p><font face="Courier New">127&#160;&#160;&#160;&#160;&#160;&#160;&#160; data a;        <br />128&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set sashelp.iris;         <br />129&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; where species in (&amp;species);         <br /><font color="#ff0000">NOTE: Line generated by the macro variable &quot;SPECIES&quot;.          <br />129&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;Setosa&quot;, &quot;Versicolor&quot;</font>         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; _         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 22         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; _         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 76         <br /><font color="#ff0000">ERROR</font>: Syntax error while parsing WHERE clause.         <br /><font color="#ff0000">ERROR</font> 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant,         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; a missing value, -.&#160; </font></p>
<p><font face="Courier New"><font color="#ff0000">ERROR</font> 76-322: Syntax error, statement will be ignored.</font></p>
<p><font face="Courier New">130&#160;&#160;&#160;&#160;&#160;&#160;&#160; run;</font></p>
</blockquote>
<p><font size="1">So, what happened inside DIS since such codes go well in BASE SAS, SAS EG and the Code Editor in DIS itself? The default value <em>&quot;Setosa&quot; &quot;Versicolor&quot;</em> was assigned to macro variable &amp;species in the DIS <font color="#00ff00">Prompt</font> (see picture above) and you would expect the following effect like what I wrote in open codes in BASE SAS:</font></p>
<blockquote><p><font size="1" face="Courier New">%let species=&quot;Setosa&quot; &quot;Versicolor&quot;;</font></p>
</blockquote>
<p><font size="1">Actually NO. In DIS, this action was translated into such clause:</font></p>
<blockquote><p><font face="Courier New">%let species = <font color="#ff0000">%nrquote</font>(%&quot;Setosa%&quot;, %&quot;Versicolor%&quot;);</font></p>
</blockquote>
<p><font size="1">Here is the point: since there quotation symbols were masked by <font color="#ff0000"><a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p0ejcenxk89b36n1xgxyf922ugoa.htm" target="_blank"><font color="#00ff00">%nrquote</font></a> </font>function, they are no longer valid syntax characters (then we got errors!). </font></p>
<p><font size="1">The solution: use a </font><a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p1k3cotqhvgwk0n105gyfe1cqg9m.htm" target="_blank"><font size="1">%<font color="#00ff00">unquote</font></font></a><font size="1"> function on the macro variable &amp;species to reverse the masking effort by <font color="#ff0000"><a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p0ejcenxk89b36n1xgxyf922ugoa.htm" target="_blank"><font color="#00ff00">%nrquote</font></a></font><font color="#cccccc">(note in our open codes example in BASE SAS, both functions were not used):</font></font></p>
<blockquote><p><font size="1"><font face="Courier New">data a;          <br />&#160;&#160;&#160; set sashelp.iris;           <br />&#160;&#160;&#160; where species in (<font color="#ff0000">%unquote</font>(&amp;species));           <br />run;</font> </font></p>
</blockquote>
<h1>
<p><font size="1"><font size="1"></font></font></p>
<p>   <font style="font-weight: bold">Notes on Macro Variable Generated by DIS</font></h1>
<blockquote><p><font face="Courier New">%let species = <font color="#ff0000">%nrquote</font>(%&quot;Setosa%&quot;, %&quot;Versicolor%&quot;);</font></p>
</blockquote>
<p><font size="1">1)<font color="#ff0000"><a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p0ejcenxk89b36n1xgxyf922ugoa.htm" target="_blank"><font color="#00ff00">%nrquote</font></a> </font>function used while it is dated for a long time… <font color="#ff0000"><a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p0ejcenxk89b36n1xgxyf922ugoa.htm" target="_blank"><font color="#00ff00">%nrquote</font></a> </font>and </font><a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p1780jrqrtwtw7n16x83peo2zpxr.htm" target="_blank"><font color="#00ff00" size="1">%quote</font></a><font size="1"> were replaced by </font><a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p06cx7fegzmzpen1m9991yljxiav.htm" target="_blank"><font size="1"><font color="#00ff00">%BQUOTE</font> and <font color="#00ff00">%NRBQUOTE</font> Functions</font></a><font size="1">.</font></p>
<p><font size="1">2)All quotation symbols(“) were preceded by a percent sign (%). That’s <font size="1"><font color="#ff0000"><a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p0ejcenxk89b36n1xgxyf922ugoa.htm" target="_blank"><font color="#00ff00">%nrquote</font></a> </font>and </font><a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p1780jrqrtwtw7n16x83peo2zpxr.htm" target="_blank"><font color="#00ff00" size="1">%quote</font></a><font size="1"> needed and why they are outdated any more.</font></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/11/19/macro-quoting-in-sas-data-integration-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A SAS 9.3 Macro Trick: %put &amp;=var</title>
		<link>http://www.jiangtanghu.com/blog/2012/11/08/a-sas-9-3-macro-trick-put-var/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/11/08/a-sas-9-3-macro-trick-put-var/#comments</comments>
		<pubDate>Fri, 09 Nov 2012 01:09:50 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Macro]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=788</guid>
		<description><![CDATA[This is new since SAS 9.3 on how to display macro variable name and its value. Try to run %let var=1,2,3; %put &#38;=var; or %macro test(var); &#160;&#160;&#160; %put &#38;=var; %mend; %test(%str(1,2,3)) and you will get in Log window VAR=1,2,3 You can read from SAS 9.3 online doc: If you place an equal sign between the [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">This is new since SAS 9.3 on how to display macro variable name and its value. Try to run</font></p>
<blockquote><p><font size="1" face="Courier New">%let <font color="#ff0000">var</font>=1,2,3;        <br />%put <font color="#00ff00">&amp;</font>=<font color="#ff0000">var</font>;</font></p>
</blockquote>
<p><font size="1">or</font></p>
<blockquote><p><font size="1" face="Courier New">%macro test(<font color="#ff0000">var</font>);        <br />&#160;&#160;&#160; %put <font color="#00ff00">&amp;</font>=<font color="#ff0000">var</font>;        <br />%mend;        <br />%test(%str(1,2,3))</font></p>
</blockquote>
<p><font size="1">and you will get in Log window</font></p>
<blockquote><p><font size="1">VAR=1,2,3</font></p>
</blockquote>
<p><font size="1">You can read from <a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#n189qvy83pmkt6n1bq2mmwtyb4oe.htm" target="_blank">SAS 9.3 online doc</a>:</font></p>
<blockquote><p><font size="1">If you place an equal sign between the <font color="#00ff00">ampersand</font> and the <font color="#ff0000">macro variable</font> <font color="#ff0000">name</font> of a direct macro variable reference, the macro variable&#8217;s name displays in the log along with the macro variable&#8217;s value.</font></p>
</blockquote>
<p><font size="1">In SAS 9.2 and prior, you should type the macro variable twice:</font></p>
<blockquote><p><font size="1" face="Courier New">%let var=1,2,3;       <br />%put var=&amp;var;</font></p>
</blockquote>
<p><font size="1">PS: it is called a “Tip” in <a href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#n189qvy83pmkt6n1bq2mmwtyb4oe.htm" target="_blank">SAS 9.3 online doc</a>, but I’d rather call it a trick: <font size="1">not critical but nice to have (<em>save your typing!</em>). You may be also interested in <a href="http://blogs.sas.com/content/iml/2010/11/01/tips-and-techniques-whats-the-difference/" target="_blank">Rick Wicklin’s differentiation on Tip and Technique</a>.</font></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/11/08/a-sas-9-3-macro-trick-put-var/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello Groovy in SAS 9.3</title>
		<link>http://www.jiangtanghu.com/blog/2012/10/28/hello-groovy-in-sas-9-3/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/10/28/hello-groovy-in-sas-9-3/#comments</comments>
		<pubDate>Mon, 29 Oct 2012 03:07:12 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[JAVA]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=782</guid>
		<description><![CDATA[see, it&#8217;s hip to be square &#8216;cuz SAS has a new PROC that&#8217;s GROOVY -Chris Hemedinger, Poetry on our own terms&#160;&#160;&#160; These days I played Proc Groovy (new in SAS 9.3) for a while because Groovy natively supports JSON (JavaScript Object Notation) data format. I downloaded much JSON data in the past few weeks(Github archive [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1"></font></p>
<p><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/groovy-logo-medium.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="groovy-logo-medium" border="0" alt="groovy-logo-medium" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/groovy-logo-medium_thumb.png" width="240" height="120" /></a></font></p>
<blockquote><p><font size="1">see, it&#8217;s hip to be square        <br />&#8216;cuz SAS has a new <a href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p1x8agymll9gten1ocziihptcjzj.htm" target="_blank">PROC that&#8217;s GROOVY</a>         <br />-Chris Hemedinger, <em><a href="http://blogs.sas.com/content/sasdummy/2011/10/21/poetry-on-our-own-terms/" target="_blank">Poetry on our own terms</a></em>&#160;&#160;&#160; </font></p>
</blockquote>
<p><font size="1">These days I played <a href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p1x8agymll9gten1ocziihptcjzj.htm" target="_blank">Proc Groovy</a> (new in SAS 9.3) for a while because <a href="http://groovy.codehaus.org/" target="_blank">Groovy</a> natively supports <a href="http://www.json.org/" target="_blank">JSON</a> (JavaScript Object Notation) data format. <font size="1">I downloaded much JSON data in the past few weeks(</font><font size="1"><a href="http://www.githubarchive.org/" target="_blank">Github</a> archive for example). </font></font></p>
<blockquote><p><font size="1"><em>&#8212;&#8212;&#8211;I&#8217;m a line separator &#8212;&#8212;&#8212;</em></font></p>
<p><em><font size="1">DO wish SAS can also support JSON in the following release, in a way similar to the existing XML Libname engine, ODS XML markup and SAS XML Mapper!</font></em></p>
<p><em><font size="1">UPDATE 20121030: I submitted a ticket on <a href="https://communities.sas.com/community/support-communities/ballot" target="_blank">SASware Ballot</a> on this idea and get a feedback that SAS will support JSON since 9.4, both reading and writing. That’s cool.</font></em></p>
<p><font size="1"><em>&#8212;&#8212;&#8211;I&#8217;m a line separator end&#8212;&#8212;&#8212;</em></font></p>
</blockquote>
<p><font size="1"><a href="http://en.wikipedia.org/wiki/Groovy_(programming_language)" target="_blank">Groovy</a> is a dynamic language running in a JVM (Java Virtual Machine) and looks like a lightweight version of JAVA. Don’t know why Groovy was chosen but it is nice to have (at least <em>to parse JSON data</em>) and it’s in Base SAS!</font></p>
<h1><font style="font-weight: bold">Set UP</font></h1>
<p><font size="1">Back to Proc Groovy. To make it work, you should first set a JDK(Java Development Kit; or at least a JVM, also called JRE, Java Runtime Environment) and install Groovy. I test in a Windows 7 machine with SAS 9.3:</font></p>
<ul>
<li><font size="1">Install a JDK (<em>or JVM</em>). Get a proper version for your machine. I have a <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" target="_blank">JDK7</a> installed in <em>C:Program FilesJavajdk1.7.0_09</em>. By the way, if your SAS 9.3 works well in a64 bit of Windows 7, there must be one JRE in <em>C:Program Files (x86)Javajre1.6.0_24</em>. </font></li>
<li>
<div align="left"><font size="1">Set up the windows environment variable for JRE. First, create a system variable <em><strong>JAVA_HOME</strong></em> with value of <em><strong>C:Program FilesJavajdk1.7.0_09</strong></em>, then put <em><strong>%JAVA_HOME%bin</strong></em> to the existing system variable <strong><em>Path</em></strong>. If you use a JVM, replace the value of JAVA_HOME as <strong>C:Program FilesJavajre7 </strong>or other proper directory.</font></div>
</li>
<li>
<div align="left"><font size="1">Install <a href="http://groovy.codehaus.org/Download" target="_blank">Groovy</a> using the latest version (current v2.05). Accept all the default settings and it will set the environment variable for Groovy. You will have the Groovy installed in <em>C:Program Files (x86)GroovyGroovy-2.0.5</em>.</font></div>
</li>
<li>
<div align="left"><font size="1">Locate the <em><strong>sasv9.cfg</strong></em> file in <em>C:Program FilesSASHomeSASFoundation9.3nlsen</em>, find option <em><strong>–JREOPTIONS</strong></em> and add a line inside</font></div>
</li>
</ul>
<blockquote><p align="left"><font size="1">-Dtkj.app.class.path=C:Program Files (x86)GroovyGroovy-2.0.5embeddablegroovy-all-2.0.5.jar</font></p>
</blockquote>
<p align="left"><font size="1">That’s it.</font></p>
<h1 align="left"><font style="font-weight: bold">Hello World in Proc Groovy</font></h1>
<blockquote><p><font size="1" face="Courier New">proc groovy;        <br />&#160;&#160;&#160; submit;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; def name=&#8217;World&#8217;;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; println &quot;Hello $name!&quot;         <br />&#160;&#160;&#160; endsubmit;         <br />quit;</font></p>
</blockquote>
<h1><font style="font-weight: bold">Read JSON data</font></h1>
<p>Use a simple example from <em><a href="http://en.wikipedia.org/wiki/JSON" target="_blank">JSON in wikipedia</a> (save it to a file, test.json)</em>:</p>
<blockquote><pre><font size="1">{
    &quot;firstName&quot;: &quot;John&quot;,
    &quot;lastName&quot;: &quot;Smith&quot;,
    &quot;age&quot;: 25,
    &quot;address&quot;: {
        &quot;streetAddress&quot;: &quot;21 2nd Street&quot;,
        &quot;city&quot;: &quot;New York&quot;,
        &quot;state&quot;: &quot;NY&quot;,
        &quot;postalCode&quot;: &quot;10021&quot;
    },
    &quot;phoneNumber&quot;: [
        {
            &quot;type&quot;: &quot;home&quot;,
            &quot;number&quot;: &quot;212 555-1234&quot;
        },
        {
            &quot;type&quot;: &quot;fax&quot;,
            &quot;number&quot;: &quot;646 555-4567&quot;
        }
    ]
}</font></pre>
</blockquote>
<pre><font size="1" face="Verdana">The following codes simple demonstrate how to:</font></pre>
<ul>
<li><font size="1">read JSON file</font> </li>
<li><font size="1">print JSON file</font> </li>
<li><font size="1">extract JSON values</font> </li>
<li><font size="1">output values into SAS macro variables</font> </li>
</ul>
<p>options nosource;</p>
<p><font face="Courier New">proc groovy;<br />
    <br />&#160;&#160;&#160; submit; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; import groovy.json.*</font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; def input=new File(&#8216;a:testtest.json&#8217;).text<br />
    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; def output = new JsonSlurper().parseText(input)</font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; println output&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; println &quot;&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; output.each {println it}&#160;&#160; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; println &quot;&quot;</font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; println output.address.streetAddress<br />
    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; println &quot;Street Address: $output.address.streetAddress&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; println output.address[&quot;streetAddress&quot;]&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></p>
<p>
  <br /><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; exports = [fName1:output['firstName']]&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; exports.put(&#8216;fName2&#8242;, output['firstName'])&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; endsubmit; </p>
<p>quit;</font></p>
<p><font face="Courier New">%put fName1: &amp;fName1;<br />
    <br />%put fName2: &amp;fName2;</font></p>
<pre><font size="1" face="Verdana">The output in LOG window:</font></pre>
<pre><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/JsoninSAS_Groovy.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="JsoninSAS_Groovy" border="0" alt="JsoninSAS_Groovy" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/JsoninSAS_Groovy_thumb.png" width="515" height="308" /></a></pre>
<p align="left"><font size="1"></font></p>
<p>Happy Groovying!</p>
<h1><font style="font-weight: bold">References</font></h1>
<p><a href="http://blog.willmakeaplan.com/?p=18" target="_blank"><font size="1"><em>Parse JSON in SAS with Groovy – part 2</em></font></a><em>&#160;</em><font size="1">by Simon Dawson</font></p>
<p><a href="http://groovy.codehaus.org/Documentation"><font size="1">http://groovy.codehaus.org/Documentation</font></a></p>
<p><a href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p1x8agymll9gten1ocziihptcjzj.htm" target="_blank"><font size="1"><em>Overview: GROOVY Procedure</em></font></a><em>&#160;</em><font size="1">in support.sas.com</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/10/28/hello-groovy-in-sas-9-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tony Barr and the Early History of SAS</title>
		<link>http://www.jiangtanghu.com/blog/2012/10/23/tony-barr-and-the-early-history-of-sas/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/10/23/tony-barr-and-the-early-history-of-sas/#comments</comments>
		<pubDate>Wed, 24 Oct 2012 02:32:17 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[SAS history]]></category>
		<category><![CDATA[Tony Barr]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=769</guid>
		<description><![CDATA[SAS historians (not all SAS users!) know Anthony James Barr (aka Tony Barr or Jim Barr) was the designer and implementor of SAS language (1966-1979) and the first Chairman and President of SAS Institute (1976-1979). In this picture was Tony Barr in the first SUGI (January 26-28, 1976, Kissimmee, FL), taken by the first SUGI [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/Tony_Barr_SAS.jpg"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Tony_Barr_SAS" border="0" alt="Tony_Barr_SAS" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/Tony_Barr_SAS_thumb.jpg" width="402" height="281" /></font></a></p>
<p><font size="1">SAS historians (not all SAS users!) know </font><a href="http://en.wikipedia.org/wiki/Anthony_James_Barr" target="_blank"><font size="1">Anthony James Barr</font></a><font size="1"> <em>(aka Tony Barr or Jim Barr</em>) was the designer and implementor of SAS language (1966-1979) and the first Chairman and President of SAS Institute (1976-1979). In this picture was Tony Barr in the </font><a href="http://www.lexjansen.com/cgi-bin/xsl_transform.php?x=sugi01&amp;s=sugi2&amp;c=sugi2" target="_blank"><font size="1">first SUGI</font></a><font size="1"> (January 26-28, 1976, Kissimmee, FL), taken by the first SUGI chair Julian Horwich. It’s said in 1970s, everyone had long hair!</font></p>
<p><font size="1">I was particularly interested in the early history of SAS when traced back the SAS file system to FFS (</font><a href="http://en.wikipedia.org/wiki/Formatted_File_System" target="_blank"><font size="1">Formatted File System</font></a><font size="1">) in Tony Barr’s statement, <em><a href="http://www.barrsystems.com/about_us/the_company/sas_history.asp" target="_blank">SAS Related History</a></em>. It’s not relational in the sense of </font><a href="http://en.wikipedia.org/wiki/Relational_database_management_system" target="_blank"><font size="1">RDBMS</font></a><font size="1">, but definitely a database management system(</font><a href="http://en.wikipedia.org/wiki/Database_management_system" target="_blank"><font size="1">DBMS</font></a><font size="1">). Then you may understand why some people still call SAS library/datasets “database”. They are right in this non-relational point of view. Actually there are lots of parallel efforts to develop non-relational databases even after 1970 (when Codd introduced the concept of relational model). Google’s </font><a href="http://en.wikipedia.org/wiki/BigTable" target="_blank"><font size="1">BigTable</font></a><font size="1"> for example is not&#160; relational.</font></p>
<p><font size="1">1960s-1970s was the emerging period for statistical computing technology (also golden age of technology). SAS as software was conceived in 1966, implemented in 1968 and got first massive distributed release in 1972 and then as a company incorporated in 1976 (you may know Apple also founded in this year; Microsoft 1975; Oracle, 1977; SPSS also in the same period). Around this time, </font><a href="http://en.wikipedia.org/wiki/PL/I" target="_blank"><font size="1">PL/1</font></a><font size="1"> first appeared in 1964 (SAS was initially written by PL/1), C developed during 1969-1973 (SAS rewritten by C in 1980s), SQL 1978, S language 1976.</font></p>
<p><font size="1">Putting Tony Barr’s work on SAS in such exciting historical background (they were in their 20-30s!), then you will also be interested to dig into such materials on early history of SAS:</font></p>
<blockquote><p align="left"><font size="1">Barr, Anthony J. (2006), </font><a href="http://www.barrsystems.com/about_us/the_company/professional_history.asp" target="_blank"><em><font size="1">Professional History</font></em></a><font size="1"> (<em>Tony Barr’s profile; also in </em></font><a href="http://en.wikipedia.org/wiki/Anthony_James_Barr" target="_blank"><em><font size="1">Wikipedia</font></em></a><font size="1">)</font></p>
<p align="left"><font size="1">Barr, Anthony J. (2006), <em><a href="http://www.barrsystems.com/about_us/the_company/sas_history.asp" target="_blank">SAS History</a> (the early history of SAS, the software and company)</em></font></p>
<p align="left"><font size="1">Barr, Anthony J. (2010), <em><a href="http://www.barrsystems.com/includes_content/about_us/the_company/SASBEGINNINGS/PlayVideo.html" target="_blank">SAS Beginnings</a></em> (<em>talk in NCSU; also in </em></font><a href="http://www.youtube.com/watch?v=5SV-H8qEeAc" target="_blank"><em><font size="1">Youtube</font></em></a><font size="1">)</font></p>
<p align="left"><a href="http://www.codecraftersinc.com/pdf/SAS_Communications.pdf" target="_blank"><font size="1">The early issues of <em>SAS Communications</em></font></a><font size="1">, achieved by </font><a href="http://www.codecraftersinc.com/" target="_blank"><font size="1">CodeCrafters</font></a></p>
<p align="left"><font size="1">SASCommunity.org, </font><a href="http://www.sascommunity.org/sugi/" target="_blank"><font size="1">early SUGI papers collection</font></a><font size="1"> (<em>also archived by </em></font><a href="http://www.lexjansen.com/" target="_blank"><em><font size="1">Lex Jansen</font></em></a><font size="1">)</font></p>
<p align="left"><a href="http://www.sas.com/company/about/history.html"><font size="1">http://www.sas.com/company/about/history.html</font></a><font size="1">, the official history of SAS</font></p>
<p align="left"><a href="http://en.wikipedia.org/wiki/SAS_(software)" target="_blank"><font size="1">SAS (software) in Wikipedia</font></a></p>
<p align="left"><a href="http://en.wikipedia.org/wiki/SAS_Institute_Inc." target="_blank"><font size="1">SAS (company) in Wikipedia</font></a></p>
<p align="left"><a href="http://en.wikipedia.org/wiki/Jim_Goodnight" target="_blank"><font size="1">Jim Goodnight in Wikipedia</font></a></p>
<p align="left"><a href="http://en.wikipedia.org/wiki/John_Sall" target="_blank"><font size="1">John Sall in Wikipedia</font></a></p>
</blockquote>
<p align="left"><font size="1">I’m not the SAS manual guy (I used SAS since 9.1.3). The early issues of SAS manuals are definitely good resources for SAS historians (<em>I’m waiting for a yard sale . . .</em>).&#160; For paper books, I only found</font></p>
<blockquote><p align="left"><em><a href="http://www.amazon.com/Hidden-Value-Companies-Extraordinary-Ordinary/dp/0875848982/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1351017888&amp;sr=1-1&amp;keywords=0875848982" target="_blank"><font size="1">Hidden Value</font></a></em><font size="1"> by Charles A. III O&#8217;Reilly, had one chapter for SAS where we can learn bits of its early history.</font></p>
<p align="left"><em><a href="http://www.amazon.com/Object-Lessons-Object-Oriented-Development-Technology/dp/0134724321/ref=la_B001KC6AME_1_1?ie=UTF8&amp;qid=1351018441&amp;sr=1-1" target="_blank"><font size="1">Object Lessons</font></a></em><font size="1"> by Tom Love: few pages for SAS that we can know the initial price of SAS software was $35.</font></p>
</blockquote>
<p align="left"><font size="1">Will keep updating and thank you for any inputs.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/10/23/tony-barr-and-the-early-history-of-sas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DoW-Loop: A Quick Note from SESUG 2012</title>
		<link>http://www.jiangtanghu.com/blog/2012/10/20/dow-loop-dorfman/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/10/20/dow-loop-dorfman/#comments</comments>
		<pubDate>Sun, 21 Oct 2012 03:26:57 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Do loop]]></category>
		<category><![CDATA[DoW-Loop]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=761</guid>
		<description><![CDATA[&#160;&#160;&#160; Once upon a midnight dreary, While I pondered, weak and weary, &#160;&#160; Over many a quaint and curious &#160;&#160;&#160;&#160;&#160;&#160;&#160; Volume of SAS-L galore, &#160;&#160;&#160; While I coded, nearly snapping, &#160;&#160;&#160; Suddenly there came a tapping &#160;&#160;&#160; As of someone gently wrapping &#160;&#160;&#160;&#160;&#160; Code around my mental core. “&#8217;Tis’ Do-Whitlock Loop”, I muttered, &#160; “Wrapped [...]]]></description>
				<content:encoded><![CDATA[<p align="justify"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/DoW.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="DoW" border="0" alt="DoW" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/DoW_thumb.png" width="455" height="220" /></a></p>
<blockquote><h6>&#160;&#160;&#160; Once upon a midnight dreary,</h6>
<h6>While I pondered, weak and weary, </h6>
<h6>&#160;&#160; Over many a quaint and curious</h6>
<h6>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Volume of SAS-L galore,</h6>
<h6>&#160;&#160;&#160; While I coded, nearly snapping,</h6>
<h6>&#160;&#160;&#160; Suddenly there came a tapping</h6>
<h6>&#160;&#160;&#160; As of someone gently wrapping</h6>
<h6>&#160;&#160;&#160;&#160;&#160; Code around my mental core.</h6>
<h6>“&#8217;Tis’ Do-Whitlock Loop”, I muttered,</h6>
<h6>&#160; “Wrapped around my brain core” -</h6>
<h6>&#160;&#160;&#160;&#160; This it was, and so much more!&#160; </h6>
<h6>&#160; &#8211;<a href="http://www.linkedin.com/in/pauldorfman" target="_blank">Paul Dorfman</a>, <em>A Bit of DoW-History</em></h6>
</blockquote>
<p align="justify"><font size="1">It’s great to have Paul Dorfman’s demo of DoW-loop (with a poem!<em> Thanks to Paul to send me a copy.</em>) in this </font><a href="http://www.sesug.org/SESUG2012/AcademicSections.php" target="_blank"><font size="1">SESUG 2012 conference</font></a><font size="1">. First posted in SAS-L by Whitlock, promoted by Dorfman,&#160; DoW-loop is widely known as “<font color="#ff0000"><a href="http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0206B&amp;L=sas-l&amp;F=&amp;S=&amp;P=45520" target="_blank">Whitlock Do Loop</a></font>” or ” <font color="#ff0000">Do</font>rfman-<font color="#ff0000">W</font>hitlock Do Loop”. In Dorfman’s presentation, the following three forms of DoW-loop were constructed:</font></p>
<ul>
<ul>
<li>
<div align="justify"><font size="1">Henderson-Whitlock Original Form of DoW-loop</font></div>
</li>
<li>
<div align="justify"><font size="1">Dorfman’s Short Form of DoW-loop</font></div>
</li>
<li>
<div align="justify"><font size="1">Double DoW-loop: the DeVenezia-Schreier Form</font></div>
</li>
</ul>
</ul>
<p align="justify"><font size="1">Using a test data set</font></p>
<blockquote><p><font size="1" face="Courier New">data a;        <br />&#160;&#160;&#160; input id $ var;         <br />datalines;         <br />A 1         <br />A 2         <br />B 3         <br />B 4         <br />B 5         <br />;</font></p>
</blockquote>
<p align="justify"><font size="1">the <font size="1">Henderson-Whitlock Original Form of DoW-loop looks like:</font></font></p>
<blockquote><p><font size="1" face="Courier New">data b;        <br />&#160;&#160;&#160; count= 0;         <br />&#160;&#160;&#160; sum = 0 ;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160; <font color="#ff0000">do until ( last.id )</font> ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; set a ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; by id ;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; count+1;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; sum+var;         <br />&#160;&#160;&#160; end ;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160; mean = sum / count ;        <br />run ;</font></p>
</blockquote>
<p align="justify"><font size="1">Ian Whitlock first used such kind of do loop in <a href="http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0002C&amp;L=sas-l&amp;P=R5155" target="_blank">a SAS-L post</a> and after its rising, Paul Dorfman, the main promoter of DoW-loop, <a href="http://support.sas.com/resources/papers/proceedings12/156-2012.pdf" target="_blank">found</a> that Don Henderson also made use such <em>DO UNTIL()</em> structure in a NESUG 1988 paper, <em><a href="http://www.lexjansen.com/nesug/nesug88/sas_supervisor.pdf" target="_blank">The SAS Supervisor</a></em>. That’s why he named it as <font size="1">Henderson-Whitlock form of DoW-loop. I then read from a <a href="http://www.sascommunity.org/wiki/Do_until_last.var" target="_blank">DoW-loop page in sascommunity.org</a> that Don Henderson taught such concept in class where Ian Whitlock was a student. This is a nice story.</font></font></p>
<p align="justify"><font size="1">Paul Dorfman himself also contributed a short form:</font></p>
<blockquote><p><font size="1" face="Courier New">data c ;        <br />&#160;&#160;&#160; <font color="#ff0000">do n = 1 by 1 until ( last.id )</font> ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; set a ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; by id ;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; count = <font color="#ff0000">sum</font> (count, 1) ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; sum = sum (sum, var) ;         <br />&#160;&#160;&#160; end ;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160; mean = sum / count ;        <br />run ;</font></p>
</blockquote>
<p align="justify"><font size="1">or even shorter:</font></p>
<blockquote><p><font size="1" face="Courier New">data c ;        <br />&#160;&#160;&#160; do <font color="#ff0000">_n_</font> = 1 by 1 until ( last.id ) ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; set a ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; by id ;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; sum = sum (sum, var) ;        <br />&#160;&#160;&#160; end ;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160; mean = sum / _n_ ;        <br />run ;</font></p>
</blockquote>
<p align="justify"><font size="1">These kinds of form of DoW-loop utilizes the SUM function, automatic variable _N_ and an increment trick in <em>DO UNTIL()</em> structure then the initializations before the loop are not needed any more. Besides such a short form, Paul Dorfman’s work on DoW-loop includes the invention of the dynamic file splitting method combining the DoW-loop and the hash object (also showed up in the meeting).</font></p>
<p align="justify"><font size="1">The double DoW-loop is under the name Howard Schreier and Richard DeVenezia (DeVenezia-Schreier Form; I should do more literature research on it!):</font></p>
<blockquote><p><font size="1" face="Courier New">data d ;        <br />&#160;&#160;&#160; <font color="#ff0000">do n = 1 by 1 until ( last.id )</font> ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; set a ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; by id ;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; count = sum (count, 1) ;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; sum = sum (sum, var) ;         <br />&#160;&#160;&#160; end ;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160; mean = sum / count ;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160; <font color="#ff0000">do n = 1 by 1 until ( last.id ) </font>;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; set a ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; by id ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; output;         <br />&#160;&#160;&#160; end ;         <br />run ;</font></p>
</blockquote>
<p>/*********************/</p>
<p><font size="1">/*****<strong>update 1</strong>*********/</font></p>
<p><font size="1">Thanks to Quentin’s message, Don Henderson’s </font><a href="http://www.lexjansen.com/nesug/nesug88/sas_supervisor.pdf"><em><font size="1">The SAS Supervisor</font></em></a><font size="1"><em>&#160;</em>can be even traced back to </font><a href="http://www.sascommunity.org/sugi/SUGI83/Sugi-83-171%20Henderson.pdf" target="_blank"><font size="1">1983</font></a><font size="1">.</font></p>
<p><font size="1">/*****<strong>update 2</strong>*********/</font></p>
<p><font size="1">I used a Star Wars style of opening crawl to render Paul Dorfman’s DoW-loop verses simply because the finding of Don Henderson looks slightly like a prequel for me (although I have no intention to make up a Star Wars parody). Actually, as Paul stated, the honor belongs to an American author, Edgar Allan Poe and one of his poems, <em><a href="http://en.wikipedia.org/wiki/The_Raven" target="_blank">The Raven</a></em>:</font></p>
<blockquote><p><font size="1">Once upon a midnight dreary, while I pondered, weak and weary,        <br />Over many a quaint and curious volume of forgotten lore —         <br />While I nodded, nearly napping, suddenly there came a tapping,         <br />As of some one gently rapping, rapping at my chamber door.         <br />&quot;&#8217;Tis some visiter,&quot; I muttered, &quot;tapping at my chamber door —         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Only this and nothing more.&quot;</font></p>
</blockquote>
<p><font size="1">/*****<strong>update 3</strong>*********/</font></p>
<p><font size="1"><a href="http://listserv.uga.edu/cgi-bin/wa?A2=ind1210d&amp;L=sas-l&amp;T=0&amp;P=20341" target="_blank">A double DoW demo</a> in recent SAS-L(</font>Sat, 27 Oct 2012<font size="1">).</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/10/20/dow-loop-dorfman/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Be Your Own SAS Admin: Create Customized SAS Sessions</title>
		<link>http://www.jiangtanghu.com/blog/2012/10/18/be-your-own-sas-admin-create-customized-sas-sessions/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/10/18/be-your-own-sas-admin-create-customized-sas-sessions/#comments</comments>
		<pubDate>Thu, 18 Oct 2012 23:51:36 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=757</guid>
		<description><![CDATA[&#160; You may find such SAS desktop shortcuts useful: click icon A then you get a SAS session titled “Project A” (you may notice your SAS session with title “SAS” by default). In this session, the current working folder is just where you put Project A (the default may be like C:usersyourID). Also, some autoexec [...]]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/SASIcons.png"><span style="font-size: xx-small;"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="SASIcons" alt="SASIcons" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/SASIcons_thumb.png" width="414" height="216" border="0" /></span></a></p>
<p><span style="font-size: xx-small;">You may find such SAS desktop shortcuts useful:</span></p>
<ul>
<li><span style="font-size: xx-small;">click icon A then you get a SAS session titled “Project A” (you may notice your SAS session with title “SAS” by default). In this session, the current working folder is just where you put Project A (the default may be like C:usersyourID). Also, some autoexec codes run including libname, fileref, formats search, macro loading and other customized options/settings. </span></li>
<li><span style="font-size: xx-small;">Keep session A alive, then click icon B: you get your SAS session specified for Project B. And very important, there are no such annoying logs (you will most likely get such warnings when hitting your own SAS desktop icon twice): </span></li>
</ul>
<blockquote><p><span style="font-family: 'Courier New'; font-size: xx-small;">NOTE: <span style="color: #ff0000;">Unable</span> to open SASUSER.REGSTRY. WORK.REGSTRY will be opened instead.<br />
NOTE: All registry changes will be lost at the end of the session.<br />
<span style="color: #ff0000;">WARNING</span>: Unable to copy SASUSER registry to WORK registry. Because of this,<br />
WARNING: you will not see registry customizations during this session.<br />
NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.<br />
NOTE: All profile changes will be lost at the end of the session.</span></p></blockquote>
<p><span style="font-size: xx-small;">Here is the how-to demo (tested in a Window 7 machine with SAS 9.3; the so called project folder is my GitHub programming folder,  <em>C:\Users\jhu\Documents\GitHubProgramming-SAS</em>):</span></p>
<ul>
<li><span style="font-size: xx-small;">From <em>C:\Users\jhu\Documents\My SAS Files\9.3</em>, copy user profile file </span><a href="http://support.sas.com/documentation/cdl/en/hostunx/61879/HTML/default/viewer.htm#a000386454.htm" target="_blank"><span style="font-size: xx-small;">profile.sas7bcat</span></a><span style="font-size: xx-small;"> to  the project folder. This is used to prevent the annoying message above.</span></li>
<li><span style="font-size: xx-small;">Throw a <strong>autoexec.sas</strong> file to the project folder with anything you like; or if you do not like, skip it</span></li>
<li><span style="font-size: xx-small;">Put in the project folder a configuration file <strong>sasv9.cfg</strong> with the following settings (delete –autoexec option if you want):</span></li>
</ul>
<blockquote><p><span style="font-family: 'Courier New';"><span style="font-size: xx-small;"><span style="color: #ff0000;">-config</span> &#8220;C:\Program Files\SASHome\SASFoundation\9.3\nls\ensasv9.cfg&#8221;<br />
<span style="color: #ff0000;">-sasinitialfolder</span> &#8220;C:\Users\jhu\Documents\GitHubProgramming-SAS&#8221;<br />
<span style="color: #ff0000;">-awstitle</span> &#8220;My SAS Programming@GitHub&#8221;<br />
<span style="color: #ff0000;">-sasuser</span> &#8220;C:\Users\jhu\Documents\GitHubProgramming-SAS&#8221;<br />
<span style="color: #ff0000;">-autoexec</span> &#8220;C:\Users\jhu\Documents\GitHubProgramming-SASautoexec.sas&#8221;</span></span></p></blockquote>
<ul>
<li><span style="font-size: xx-small;">Send <em><strong>C:\Program Files\SASHome\SASFoundation\9.3\sas.exe</strong></em> to a desktop shortcut (I renamed it as “GitHub”).</span></li>
<li><span style="font-size: xx-small;">In desktop, find this icon and get its properties: in Target, replace all the text with</span></li>
</ul>
<blockquote><p><span style="font-family: 'Courier New'; font-size: xx-small;">&#8220;C:\Program Files\SASHome\SASFoundation\9.3\sas.exe&#8221; -config &#8220;C:\Users\jhu\Documents\GitHubProgramming-SAS\sasv9.cfg&#8221;</span></p></blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/SASIcons_target.png"><span style="font-size: xx-small;"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="SASIcons_target" alt="SASIcons_target" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/SASIcons_target_thumb.png" width="337" height="489" border="0" /></span></a></p>
<p><span style="font-size: xx-small;">Save the setting and exit then you click this icon and get:</span></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/GitHub.png"><span style="font-size: xx-small;"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="GitHub" alt="GitHub" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/GitHub_thumb.png" width="517" height="379" border="0" /></span></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-size: xx-small;">Note:</span></p>
<p><a href="http://www.lexjansen.com/" target="_blank"><span style="font-size: xx-small;">Lex Jansen</span></a><span style="font-size: xx-small;"> made a good trick to start SAS in any specific folder by modifying the registry table in Windows; then you can right click mouse to get in a SAS session:</span></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/SAShere.png"><span style="font-size: xx-small;"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="SAShere" alt="SAShere" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/SAShere_thumb.png" width="400" height="301" border="0" /></span></a></p>
<p><span style="font-size: xx-small;">It’s simple: just save the following text to a file with extension as REG and run it (the configuration also in Windows 7 with SAS 9.3):</span></p>
<blockquote><p><span style="font-size: xx-small;">Windows Registry Editor Version 5.00</span></p>
<p><span style="font-size: xx-small;">[HKEY_CLASSES_ROOTDirectoryshellSAS_here_v93]<br />
@=&#8221;&amp;SAS here V9.3&#8243;<br />
[HKEY_CLASSES_ROOTDirectoryshellSAS_here_v93command]<br />
@=&#8221;"C:Program FilesSASHomeSASFoundation9.3sas.exe&#8221; -sasinitialfolder &#8220;%V&#8221; -nosplash -CONFIG &#8220;C:Program FilesSASHomeSASFoundation9.3nlsensasv9.cfg&#8221;"</span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/10/18/be-your-own-sas-admin-create-customized-sas-sessions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Incorporate SAS/IML to Base SAS?</title>
		<link>http://www.jiangtanghu.com/blog/2012/10/16/incorporate-sasiml-to-base-sas/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/10/16/incorporate-sasiml-to-base-sas/#comments</comments>
		<pubDate>Wed, 17 Oct 2012 02:28:41 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[BASE SAS]]></category>
		<category><![CDATA[IML]]></category>
		<category><![CDATA[Matrix]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=748</guid>
		<description><![CDATA[Since SAS 9.3, ODS Graphics was moved into Base SAS and other statistical procedures, which means the SAS/Graph license is not needed anymore to access ODS Graphics facilities. It’s definitely nice, but from customers’ point of view, it is not critical necessary: since the “minimum set of SAS system” in most SAS sessions includes the [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">Since SAS 9.3, ODS Graphics was moved into Base SAS and other statistical procedures, which means the SAS/Graph license is not needed anymore to access ODS Graphics facilities. It’s definitely nice, but from customers’ point of view, it is not critical necessary: since the “minimum set of SAS system” in most SAS sessions includes the Base SAS, SAS/Stat and SAS/Graph, there is almost no impact for SAS users to switch the license of ODS Graphics. Actually, I do think SAS/IML is better to be included in BASE SAS (play Proc IML in BASE SAS; a MATRIX statement in data step is definitely another bonus) :</font></p>
<ul>
<li><font size="1">IML itself, seems have no intention to replace SAS/Stat, SAS/ETS, SAS/QC and other SAS statistical facilities in matrix way like R or Matlab. Instead, by enhancing the abilities to call SAS data steps(including macros), SAS Procedures and R inside,&#160; IML seems to be glad as glue to leverage multiple programming elements. </font></li>
<li><font size="1">BASE SAS is a collection of lots of programming elements: data step, macro, SQL, array, hash, Java objects, ODS, XML and bunches of procedures. IML is clearly a programming tool rather than a specific application(SAS/Stat and such) and if it is added to BASE SAS, then the SAS programmers&#160; will have one more data structure (matrix) to play with besides SAS table (R copies this idea as data frame), array and hash table (dictionary).</font></li>
<li><font size="1">Actually it is an emergent need (for a matrix). Processing different rows in variable(s) is not an easy task in SAS data steps. Mostly SAS programmers utilize arrays (plus some tricky functions like LAG and DIF) and Dow-loop after its advent. There are really advanced programming techniques, but in matrix with index, such manipulation is pretty easy and straightforward (and saving your loops).</font></li>
<li><font size="1">Although IML can communicate with BASE SAS, but for portable purpose (IML is not expected in every SAS session), most SAS programmers prefer to submit pure BASE codes for data processing. Furthermore, we can even understand why SAS programmers in general invest less in IML. It’s not good: just think about a BASE SAS programmer without a handy matrix manipulation tool (<em>and think about R</em>)!</font></li>
</ul>
<p><font size="1">Personally I played IML for a while and still keep eyes on its updates. But since I had some SAS machines without IML, I realize that IML can’t be used as a production language in my clinical SAS programming life: just can’t afford the latency&#160; to ask IT administrators (including in clients side) to manage it!</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/10/16/incorporate-sasiml-to-base-sas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS Perl Regular Expression (PRX) Talk in the forthcoming SESUG 2012</title>
		<link>http://www.jiangtanghu.com/blog/2012/10/11/sas-perl-regular-expression-prx-talk-in-the-forthcoming-sesug-2012/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/10/11/sas-perl-regular-expression-prx-talk-in-the-forthcoming-sesug-2012/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 01:20:39 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[Regular Expression]]></category>
		<category><![CDATA[SESUG]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=743</guid>
		<description><![CDATA[Research Triangle will host SouthEast SAS Users Group (SESUG) 2012 conference (October 14-16, Sheraton Imperial Hotel, Durham, NC; back to the home of SAS!). It will be my first regional SAS user conference and I will have a talk on SAS Perl Regular Expression(PRX), in the morning of next Monday, Oct 15. SAS PRX is [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">Research Triangle will host SouthEast SAS Users Group (</font><a href="http://www.sesug.org/" target="_blank"><font size="1">SESUG</font></a><font size="1">) 2012 conference (October 14-16, Sheraton Imperial Hotel, Durham, NC; <em>back to the home of SAS!</em>). It will be my first regional SAS user conference and I will have a talk on </font><a href="http://www.sesug.org/SESUG2012/abstract.html#BB-04" target="_blank"><font size="1">SAS Perl Regular Expression(PRX)</font></a><font size="1">, in the morning of next Monday, Oct 15.</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/Iknow.jpg"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Iknow" border="0" alt="Iknow" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/Iknow_thumb.jpg" width="482" height="373" /></font></a></p>
<p><font size="1">SAS PRX is an old school topic somehow. After dumping the paper, I think I should restructure my talk in a more accessible way. Regular expression is the de facto standard tool for text processing (<em>you can get help from the whole world besides SAS!</em>), and SAS 9.3 even incorporates it to Proc Format. My talk will go like this:</font></p>
<ul>
<ul>
<li><font size="1">No picnic! You are already using Regex: remember <font color="#ff0000">*</font>.sas?</font> </li>
<li><font size="1">Where to start? what you should do is only to fill the programming block</font> </li>
<li><font size="1">Supporting tools: visually play with Regex</font> </li>
<li><font size="1">Resources: how to get the Regex for immediate use without digging into the “hairy” metacharacters for days and weeks</font> </li>
<li><font size="1">A demo</font> </li>
<li><font size="1">A Joke</font> </li>
</ul>
</ul>
<p><font size="1">See you then!</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/10/11/sas-perl-regular-expression-prx-talk-in-the-forthcoming-sesug-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell: Up to v3.0</title>
		<link>http://www.jiangtanghu.com/blog/2012/10/08/powershell-up-to-v3-0/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/10/08/powershell-up-to-v3-0/#comments</comments>
		<pubDate>Tue, 09 Oct 2012 02:22:23 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=739</guid>
		<description><![CDATA[Just update Windows Powershell to version 3.0 and I do like this new GUI (Integrated Scripting Environment, ISE) with a console, a script window and a command list (Powershell is a true Windows shell; you may try to type 1+2 in the old CMD console!): I also used a free Powershell GUI product, PowerGUI with [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">Just </font><a href="http://www.microsoft.com/en-us/download/details.aspx?id=34595" target="_blank"><font size="1">update Windows Powershell to version 3.0</font></a><font size="1"> and I do like this new GUI (Integrated Scripting Environment, ISE) with a console, a script window and a command list (Powershell is a true Windows shell; you may try to type <em>1+2</em> in the old CMD console!):</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/ISE.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ISE" border="0" alt="ISE" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/ISE_thumb.png" width="506" height="307" /></font></a></p>
<p><font size="1"> I also used a free Powershell GUI product, </font><a href="http://powergui.org/index.jspa" target="_blank"><font size="1">PowerGUI</font></a><font size="1"> with similar interface like ISE. The latest PowerGUI (3.2.0.2237) supports Powershell 2.0 by default (while you can </font><a href="http://csharpening.net/?p=588" target="_blank"><font size="1">force it to play with PS 3.0</font></a><font size="1">). I’m not a script guy but bits of shell do make life easy.</font></p>
<h1>Getting Started:</h1>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Windows_PowerShell#Comparison_of_cmdlets_with_similar_commands" target="_blank"><font size="1">a quick look of Powershell, Windows CMD and Unix shell</font></a></li>
<li><a href="http://technet.microsoft.com/en-us/library/bb978526.aspx" target="_blank"><font size="1">Powershell 3.0 offical portal</font></a></li>
<li><font size="1">a wonderful book(<em>FREE</em>), <em><a href="http://powershell.com/cs/blogs/ebookv2/default.aspx" target="_blank">Master Powershell with Dr. Tobias Weltner</a></em></font></li>
<li><em><a href="http://technet.microsoft.com/en-us/library/hh848797.aspx" target="_blank"><font size="1">Powershell Tips</font></a></em></li>
<li><font size="1">For SAS users, blogger </font><a href="http://blogs.sas.com/content/sasdummy/tag/powershell/" target="_blank"><font size="1">Chris Hemedinger introduced some useful examples</font></a><font size="1">.</font></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/10/08/powershell-up-to-v3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Current Working Folder in SAS</title>
		<link>http://www.jiangtanghu.com/blog/2012/10/08/current-working-folder-in-sas/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/10/08/current-working-folder-in-sas/#comments</comments>
		<pubDate>Tue, 09 Oct 2012 02:19:47 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CMD]]></category>
		<category><![CDATA[current folder]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=735</guid>
		<description><![CDATA[The concept of current working directory in SAS is not as important as it sounds. Most SAS users point to file reference (fileref) and library reference (libname, a “namespace”-like mechanism to access files ), which are much convenient in large project with multiple folders. Sometimes I push files to the current folder in relatively small [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/whereamI.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="whereamI" border="0" alt="whereamI" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/10/whereamI_thumb.jpg" width="377" height="370" /></a></font></p>
<p><font size="1">The concept of </font><a href="http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#p16esisc4nrd5sn1ps5l6u8f79k6.htm" target="_blank"><font size="1">current working directory in SAS</font></a><font size="1"> is not as important as it sounds. Most SAS users point to file reference (fileref) and library reference (libname, a “namespace”-like mechanism to access files ), which are much convenient in large project with multiple folders.</font></p>
<p><font size="1">Sometimes I push files to the current folder in relatively small task because I don’t want to</font></p>
<ul>
<li><font size="1">jump to <em>C:UsersjhuappdataLocalTempSAS Temporary Files_TD2820_</em>like folder to get the temporary datasets (in WORK library) </font></li>
<li><font size="1">hard code a folder to receive ODS outputs.</font></li>
</ul>
<p><font size="1">The demo codes(a SAS system autocall macro %xlog used):</font></p>
<blockquote><p><font size="1" face="Courier New">/*display current directory in LOG window*/        <br />%<font color="#ff0000">xlog</font>(cd);</font></p>
<p><font size="1" face="Courier New">/*change current working directory */        <br />x &quot;cd a:test&quot;;</font></p>
<p><font size="1" face="Courier New">/*display current directory in LOG window*/        <br />%xlog(cd);</font></p>
<p><font size="1" face="Courier New">/*output a dataset in current directory */        <br /><font color="#ff0000">data &quot;iris&quot;;</font>         <br />&#160;&#160;&#160; set sashelp.iris;         <br />run;</font></p>
<p><font size="1" face="Courier New">/*output a pdf file in current directory */        <br />ods pdf <font color="#ff0000">file=&quot;iris.pdf&quot;;</font>         <br />proc print data=&quot;iris&quot;;         <br />run;         <br />ods pdf close;</font></p>
<p><font size="1" face="Courier New">/*show files in current directory */        <br />%xlog(dir);</font></p>
</blockquote>
<p><font size="1">And the LOG window may like:</font></p>
<blockquote><p><font size="1" face="Consolas">Path       <br />&#8212;-        <br />C:Usersjhu</font></p>
<p><font size="1" face="Consolas">Path       <br />&#8212;-        <br />A:test</font></p>
<p><font size="1"><font face="Consolas">&#160;&#160;&#160; Directory: A:test</font>        <br /></font><font size="1" face="Consolas">Mode&#160;&#160;&#160;&#160;&#160;&#160;&#160; LastWriteTime&#160;&#160; Length Name       <br />&#8212;-&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8212;&#8212;&#8212;&#8212;-&#160;&#160; &#8212;&#8212; &#8212;-        <br />-a&#8212; 10/8/2012&#160; 12:49 PM&#160;&#160; 113665 iris.pdf        <br />-a&#8212; 10/8/2012&#160; 12:49 PM&#160;&#160;&#160; 13312 iris.sas7bdat</font></p>
</blockquote>
<h1>NOTES:</h1>
<ul>
<li><font size="1">You can get autocall macro %xlog in (if SAS 9.3 in Windows 7)</font></li>
</ul>
<blockquote><p><font size="1">C:Program FilesSASHomeSASFoundation9.3<font color="#ff0000">coresasmacro</font></font></p>
</blockquote>
<p><font size="1">An equivalent macro <font color="#ff0000">%xlst</font> generates the shell command outputs to LIST window.</font></p>
<ul>
<li><font size="1">If prefer Windows Powershell, a similar macro can be used (put it to autocall if needed):</font></li>
</ul>
<blockquote><p><font size="1" face="Courier New">%macro <font color="#ff0000">pslog</font>(cmd);        <br />&#160; option nonotes;        <br />&#160; filename pslogcmd pipe &quot;<font color="#ff0000">powershell</font> &amp;cmd&quot;;        <br />&#160; data _null_;        <br />&#160;&#160;&#160;&#160; file log;        <br />&#160;&#160;&#160;&#160; infile pslogcmd;        <br />&#160;&#160;&#160;&#160; input;        <br />&#160;&#160;&#160;&#160; put _INFILE_;        <br />&#160; run;        <br />&#160; option notes;        <br />%mend pslog;</font></p>
</blockquote>
<p><font size="1">Test the following commands:</font></p>
<blockquote><p><font size="1"><font face="Courier New">%pslog(gl);         <br />%pslog(get-location);          <br />%pslog(get-host)</font></font></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/10/08/current-working-folder-in-sas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two SAS AF Utilities: LogFilter and Format Viewer</title>
		<link>http://www.jiangtanghu.com/blog/2012/10/02/two-sas-af-utilities-logfilter-and-format-viewer/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/10/02/two-sas-af-utilities-logfilter-and-format-viewer/#comments</comments>
		<pubDate>Tue, 02 Oct 2012 18:40:05 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[AF]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[log]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=731</guid>
		<description><![CDATA[Nice to have (and easy to follow, both tested in Windows 7 with SAS 9.3M1 while they were both written in lower version of SAS): 1. LogFilter: a SAS log checker by rtsl http://www.ratcliffe.co.uk/rest_logfilt.htm 2. A SAS format viewer by Frank Poppe http://frank-poppe.xs4all.nl/SAS/edit_format.html]]></description>
				<content:encoded><![CDATA[<p><font size="1">Nice to have (and easy to follow, both tested in Windows 7 with SAS 9.3M1 while they were both written in lower version of SAS):</font></p>
<p><font size="1"><strong>1. LogFilter: a SAS log checker by </strong></font><a href="http://www.notecolon.info/" target="_blank"><font size="1"><strong>rtsl</strong></font></a></p>
<p><a href="http://www.ratcliffe.co.uk/rest_logfilt.htm"><font size="1">http://www.ratcliffe.co.uk/rest_logfilt.htm</font></a></p>
<p><font size="1"><strong>2. A SAS format viewer by </strong></font><a href="http://frank-poppe.xs4all.nl/SAS/" target="_blank"><font size="1"><strong>Frank Poppe</strong></font></a></p>
<p><a href="http://frank-poppe.xs4all.nl/SAS/edit_format.html"><font size="1">http://frank-poppe.xs4all.nl/SAS/edit_format.html</font></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/10/02/two-sas-af-utilities-logfilter-and-format-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set Up R (for SAS Programmers)</title>
		<link>http://www.jiangtanghu.com/blog/2012/09/30/r-set-up-sas/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/09/30/r-set-up-sas/#comments</comments>
		<pubDate>Mon, 01 Oct 2012 01:19:31 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[IML]]></category>
		<category><![CDATA[RStudio]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=728</guid>
		<description><![CDATA[Yep, I am a SAS programmer: during the day time, I use SAS for my work; at the evening, I use R for entertainment.— Charlie Huang Getting start to play with R (it is really a wonderful learning tool): 12. SAS IML Studio and R Integration (not tested) 11. SAS IML and R Integration (not [...]]]></description>
				<content:encoded><![CDATA[<blockquote><h1><font size="1">Yep, I am a SAS programmer: during the day time, I use SAS for my work; at the evening, I use R for entertainment.—</font></h1>
<h1><a href="http://www.sasanalysis.com/2011/05/support-vector-machine-for.html" target="_blank"><font size="1">Charlie Huang</font></a></h1>
</blockquote>
<p>Getting start to play with R (it is really a wonderful learning tool):</p>
<h5>12. <a href="http://support.sas.com/documentation/cdl/en/imlsstat/65548/HTML/default/viewer.htm#imlsstat_statr_toc.htm" target="_blank">SAS IML Studio and R Integration</a> (<em>not tested</em>)</h5>
<h5>11. <a href="http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_r_sect001.htm" target="_blank">SAS IML and R Integration</a> (<em>not tested</em>)</h5>
<h5>10. <a href="http://www.jstatsoft.org/v46/c02" target="_blank">SAS Base and R Integration: PROC R</a></h5>
<p>also <a href="http://sas-and-r.blogspot.com/2012/01/sas-macro-simplifies-sas-and-r.html" target="_blank">a blog post</a>.</p>
<h5>9. Data transfer among R and SAS(xpt)</h5>
<p><font size="1">SAS: <em><a href="http://www.sas.com/industry/government/fda/macro.html" target="_blank">SAS Macros that Convert a Directory of Transport Files</a></em></font></p>
<p><font size="1">R: use <a href="http://stat.ethz.ch/R-manual/R-devel/library/foreign/html/read.xport.html" target="_blank">read.xport</a> function in Foreign package and write.xport in <a href="http://cran.cnr.berkeley.edu/web/packages/SASxport/index.html" target="_blank">SASXport</a> package to read/write xpt file</font></p>
<h5>8. Data transfer among R and SAS(CSV)</h5>
<p><font size="1">SAS: use </font><a href="http://support.sas.com/documentation/cdl/en/lebaseutilref/63492/HTML/default/viewer.htm#n0yo3bszlrh0byn1j4fxh4ndei8u.htm" target="_blank"><font size="1">%DS2CSV Macro</font></a><font size="1"> to export SAS dataset to CSV file</font></p>
<p><font size="1">R: use <a href="http://stat.ethz.ch/R-manual/R-devel/library/utils/html/read.table.html" target="_blank">read.csv</a> /<a href="http://stat.ethz.ch/R-manual/R-devel/library/utils/html/write.table.html" target="_blank">write.csv</a></font><font size="1"> function to read/write CSV file</font></p>
<h5><font style="font-weight: bold">7. </font><font style="font-weight: bold"><a href="http://gallery.r-enthusiasts.com/" target="_blank">The R Graph Gallery</a></font></h5>
<h5>6. <a href="http://www.r-bloggers.com/" target="_blank">R blogs</a></h5>
<h5>5. <a href="http://www.r-project.org/search.html" target="_blank">R search</a></h5>
<h5>4. <a href="http://cran.r-project.org/web/views/" target="_blank">R Task View</a>: packages recommended</h5>
<h5>3. <a href="http://cran.cnr.berkeley.edu/web/packages/available_packages_by_name.html" target="_blank">All R packages</a></h5>
<h5>2. Install <a href="http://www.rstudio.org/download/" target="_blank">RStudio</a>, a much better R IDE</h5>
<h5>1. Get <a href="http://cran.cnr.berkeley.edu/" target="_blank">R software</a></h5>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/09/30/r-set-up-sas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Statistical Notes (5): Confidence Intervals for Difference Between Independent Binomial Proportions Using SAS</title>
		<link>http://www.jiangtanghu.com/blog/2012/09/23/statistical-notes-5-confidence-intervals-for-difference-between-independent-binomial-proportions-using-sas/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/09/23/statistical-notes-5-confidence-intervals-for-difference-between-independent-binomial-proportions-using-sas/#comments</comments>
		<pubDate>Mon, 24 Sep 2012 01:23:59 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Binomial proportion inverval]]></category>
		<category><![CDATA[Confidence Interval]]></category>
		<category><![CDATA[PROC FREQ]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=721</guid>
		<description><![CDATA[A guy notices a bunch of targets scattered over a barn wall, and in the center of each, in the &#34;bulls-eye,&#34; is a bullet hole. &#34;Wow,&#34; he says to the farmer, &#34;that&#8217;s pretty good shooting. How&#8217;d you do it?&#34; &#34;Oh,&#34; says the farmer, &#34;it was easy. I painted the targets after I shot the holes.&#34; [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><font size="1">A guy notices a bunch of targets scattered over a barn wall, and in the center of each, in the &quot;bulls-eye,&quot; is a bullet hole. &quot;Wow,&quot; he says to the farmer, &quot;that&#8217;s pretty good shooting. How&#8217;d you do it?&quot; &quot;Oh,&quot; says the farmer, &quot;it was easy. I painted the targets after I shot the holes.&quot; – An Old Joke</font></p>
</blockquote>
<p><font size="1">Note on how to get the difference between independent binomial proportions using SAS </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_freq_toc.htm" target="_blank"><font size="1">PROC FREQ</font></a><font size="1"> (tested in SAS 9.3M1).&#160; Also, benchmarks took from Prof. Newcombe ’s paper:</font></p>
<blockquote><p><cite><a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=pubmed&amp;dopt=Abstract&amp;list_uids=9595617&amp;query_hl=1"><strong><font size="1">Interval estimation for the difference between independent proportions: comparison of eleven methods.</font></strong></a><font size="1"> </font></cite>      </p>
</blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/newcombe.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="newcombe" border="0" alt="newcombe" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/newcombe_thumb.png" width="380" height="364" /></font></a></p>
<p><font size="1">Key findings:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/CI8.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="CI8" border="0" alt="CI8" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/CI8_thumb.png" width="436" height="255" /></a></p>
<p><font size="1">1. SAS Proc Freq offers 8 ( including 4 of total 11 in Prof. Newcombe ’s paper) methods to compute confidence intervals for difference between independent binomial proportions:</font></p>
<ul>
<ul>
<li><font size="1">Wald <font color="#ff0000">#1</font></font></li>
<li><font size="1">Wald (Corrected) <font color="#ff0000">#2</font></font></li>
<li><font size="1">Exact</font></li>
<li><font size="1">Exact (FM Score)</font></li>
<li><font size="1">Newcombe Score <font color="#ff0000">#10</font></font></li>
<li><font size="1">Newcombe Score (Corrected) <font color="#ff0000">#11</font></font></li>
<li><font size="1">Farrington-Manning</font></li>
<li><font size="1">Hauck-Anderson</font></li>
</ul>
</ul>
<p><font size="1">Note that #1 method is the most popular one in textbook, #10 might&#160; be the most wildly used method in industry.</font></p>
<p><font size="1">2. There is a big discrepancy in the outputs in the&#160; so called “<strong>exact</strong>” method among&#160; SAS Proc Freq and Prof. Newcombe ’s paper. Seems they used different methods (in the same “exact” families) under same name. Needs further investigation.</font></p>
<p><font size="1">The SAS codes:</font></p>
<blockquote><p><font size="1" face="Courier New">/*       <br />2*2 table </font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; response0 response1       <br />group1&#160;&#160;&#160;&#160;&#160; 56&#160;&#160;&#160;&#160;&#160; 14        <br />group2&#160;&#160;&#160;&#160;&#160; 48&#160;&#160;&#160;&#160;&#160; 32        <br />*/</font></p>
<p><font size="1" face="Courier New">data ci;        <br />&#160;&#160;&#160; input grp res count;         <br />datalines;         <br />1 0 56         <br />1 1 14         <br />2 0 48         <br />2 1 32         <br />;</font></p>
<p><font size="1" face="Courier New">/*       <br />methods:        <br />Exact        <br />Farrington-Manning        <br />Hauck-Anderson        <br />Newcombe Score        <br />Wald        <br />*/        <br />ods select&#160; PdiffCLs;         <br />ods output PdiffCLs=ci1;        <br />proc freq data=ci order=data;         <br />&#160;&#160;&#160; tables grp*res /riskdiff (CL=(EXACT FM HA WILSON WALD));         <br />&#160;&#160;&#160; weight count;         <br />&#160;&#160;&#160; exact riskdiff;         <br />run;</font></p>
<p><font size="1" face="Courier New">/*       <br />methods:        <br />Exact (FM Score)        <br />*/        <br />ods select&#160; PdiffCLs;         <br />ods output PdiffCLs=ci2;        <br />proc freq data=ci order=data;         <br />&#160;&#160;&#160; tables grp*res /riskdiff (CL=(EXACT));         <br />&#160;&#160;&#160; weight count;         <br />&#160;&#160;&#160; exact riskdiff(fmscore);         <br />run;</font></p>
<p><font size="1" face="Courier New">/*       <br />methods:        <br />Newcombe Score (Corrected)        <br />Wald (Corrected)        <br />*/        <br />ods select&#160; PdiffCLs;         <br />ods output PdiffCLs=ci3;        <br />proc freq data=ci order=data;         <br />&#160;&#160;&#160; tables grp*res /riskdiff (CORRECT CL=(WILSON WALD));         <br />&#160;&#160;&#160; weight count;         <br />&#160;&#160;&#160; exact riskdiff;         <br />run; </font></p>
<p><font size="1" face="Courier New">/*put them all*/       <br />data CI_all;        <br />&#160;&#160;&#160; set ci3 ci2 ci1;        <br />&#160;&#160;&#160; CI=&#8217;(&#8216;||compress(put(LowerCL,8.4))||&#8217;, &#8216;||compress(put(UpperCL,8.4))||&#8217;)';        <br />run;</font></p>
<p><font size="1" face="Courier New">proc sql;       <br />&#160;&#160;&#160; select         <br />&#160;&#160;&#160; case Type        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; when &quot;Wald&quot; then &quot;a&quot;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; when &quot;Wald (Corrected)&quot; then &quot;b&quot;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; when &quot;Exact&quot; then &quot;c&quot;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; when &quot;Exact (FM Score)&quot; then &quot;d&quot;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; when &quot;Newcombe Score&quot; then &quot;e&quot;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; when &quot;Newcombe Score (Corrected)&quot; then &quot;f&quot;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; when &quot;Farrington-Manning&quot; then &quot;g&quot;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; when &quot;Hauck-Anderson&quot; then &quot;h&quot;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; else &quot;i&quot;        <br />&#160;&#160;&#160; end as order,         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Type &quot;method&quot;,         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; CI &quot;95% Confidence Limits&quot;        <br />&#160;&#160;&#160; from CI_all        <br />&#160;&#160;&#160; order by order        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ;        <br />quit;</font></p>
<p><font size="1"></font></p>
</blockquote>
<p><font size="1">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</font></p>
<p><font size="1">You may be also interested in this post on calculating confidence intervals for single proportion: </font></p>
<blockquote><p><a href="http://www.jiangtanghu.com/blog/2012/09/15/confidence-intervals-binomial-proportion/"><font size="1">Statistical Notes (3): Confidence Intervals for Binomial Proportion Using SAS</font></a><font size="1"> </font></p>
</blockquote>
<p><font size="1">using the following 11 methods:</font></p>
<ul>
<ul>
<ul>
<li><font size="1">1.&#160; Simple asymptotic, Without CC | Wald</font> </li>
<li><font size="1">2.&#160; Simple asymptotic, With CC&#160;&#160;&#160;&#160;&#160;&#160; </font></li>
<li><font size="1">3.&#160; Score method, Without CC | Wilson&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></li>
<li><font size="1">4.&#160; Score method, With CC&#160;&#160;&#160;&#160; </font></li>
<li><font size="1">5. Binomial-based, &#8216;Exact&#8217; | Clopper-Pearson&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></li>
<li><font size="1">6.&#160; Binomial-based, Mid-p&#160;&#160;&#160;&#160;&#160;&#160; </font></li>
<li><font size="1">7.&#160; Likelihood-based&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></li>
<li><font size="1">8.&#160; Jeffreys&#160;&#160;&#160;&#160; </font></li>
<li><font size="1">9.&#160; Agresti-Coull,z^2/2 successes&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></li>
<li><font size="1">10. Agresti-Coull,2 successes and 2 fail&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></li>
<li><font size="1">11. Logit&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></li>
</ul>
</ul>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/09/23/statistical-notes-5-confidence-intervals-for-difference-between-independent-binomial-proportions-using-sas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where is SAS Output Anyway?</title>
		<link>http://www.jiangtanghu.com/blog/2012/09/22/sas-output/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/09/22/sas-output/#comments</comments>
		<pubDate>Sun, 23 Sep 2012 02:10:12 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[ODS]]></category>
		<category><![CDATA[Output]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=713</guid>
		<description><![CDATA[It is said in An Introduction to R, one of R official documents (Current Version: 2.15.1): There is an important difference in philosophy between S (and hence R) and the other main statistical systems. In S a statistical analysis is normally done as a series of steps, with intermediate results being stored in objects. Thus [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">It is said in <em><a href="http://cran.cnr.berkeley.edu/doc/manuals/R-intro.html#R-and-statistics" target="_blank">An Introduction to R</a></em>, one of R official documents (Current Version: 2.15.1):</font></p>
<blockquote><p><font size="1">There is an important difference in philosophy between S (and hence R) and the other main statistical systems. In S a statistical analysis is normally done as a series of steps, with intermediate results being stored in objects. <strong>Thus whereas SAS and SPSS will give copious output from a regression or discriminant analysis</strong>, R will give minimal output and store the results in a fit object for subsequent interrogation by further R functions.</font></p>
</blockquote>
<p><font size="1">For SAS, it’s true, but not exactly the whole story. Actually all outputs generated by SAS procedures are stored in datasets besides the “copious output” in Output Window for further processing if needed. It is totally controllable like object in R. Take </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_reg_examples02.htm" target="_blank"><font size="1">a regression example</font></a><font size="1">, You can use <em><strong><font color="#ffffff">ODS Select</font></strong></em> statement to select what you want to be displayed in Output Window, and <em><strong><font color="#ffffff">ODS Output</font></strong></em> statement to fetch the output datasets(<em>test on SAS 9.3M1 in Windows 7</em>):</font></p>
<blockquote><p><font face="Courier New"><font size="1"><font color="#ff0000">ods select</font> Anova ResidualPlot;           <br /><font color="#ff0000">ods output</font> Anova=Anova;</font></font></p>
<p><font size="1" face="Courier New">proc reg data=fitness;        <br />&#160;&#160; model Oxygen=Age Weight RunTime RunPulse RestPulse MaxPulse / selection=forward;&#160; <br />run;         <br />quit;</font></p>
</blockquote>
<p><font size="1">or, you can use <em><strong><font color="#ffffff">ODS Exclude</font></strong></em> statement to just drop some outputs in Output Window:</font></p>
<blockquote><p><font face="Courier New"><font size="1"><font color="#ff0000">ods exclude</font> ResidualPlot;</font></font></p>
<p><font size="1" face="Courier New">proc reg data=fitness;        <br />&#160;&#160; model Oxygen=Age Weight RunTime RunPulse RestPulse MaxPulse / selection=forward;&#160; <br />run;         <br />quit;</font></p>
</blockquote>
<p><font size="1">To get a list all the ODS outputs like Anova, ResidualPlot, you can trigger on <strong><em><font color="#ff0000"><font color="#ffffff">ODS Trace ON</font> </font></em></strong>statement:</font></p>
<blockquote><p><font face="Courier New"><font size="1"><font color="#ff0000">ods trace on</font>;</font></font></p>
<p><font size="1" face="Courier New">proc reg data=fitness;        <br />&#160;&#160; model Oxygen=Age Weight RunTime RunPulse RestPulse MaxPulse         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; / selection=forward;&#160; <br />run;         <br />quit;</font></p>
<p><font face="Courier New"><font size="1"><font color="#ff0000">ods trace off</font>;</font></font></p>
</blockquote>
<p><font size="1">then you get a full list in Log Window like:</font></p>
<blockquote><p><font size="1" face="Courier New">&#8212;&#8212;&#8212;&#8212;-        <br />Name:&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">NObs</font>         <br />Label:&#160;&#160;&#160;&#160;&#160; Number of Observations         <br />Template:&#160;&#160; Stat.Reg.NObs         <br />Path:&#160;&#160;&#160;&#160;&#160;&#160; Reg.MODEL1.SelectionMethod.Oxygen.NObs         <br />&#8212;&#8212;&#8212;&#8212;-</font></p>
<p><font size="1" face="Courier New">Output Added:        <br />&#8212;&#8212;&#8212;&#8212;-         <br />Name:&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">ANOVA</font>         <br />Label:&#160;&#160;&#160;&#160;&#160; ANOVA         <br />Template:&#160;&#160; Stat.REG.ANOVA         <br />Path:&#160;&#160;&#160;&#160;&#160;&#160; Reg.MODEL1.SelectionMethod.Oxygen.Step1.ANOVA         <br />&#8212;&#8212;&#8212;&#8212;-</font></p>
<p><font size="1" face="Courier New">Output Added:        <br />&#8212;&#8212;&#8212;&#8212;-         <br />Name:&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">SelParmEst</font>         <br />Label:&#160;&#160;&#160;&#160;&#160; Parameter Estimates         <br />Template:&#160;&#160; Stat.REG.SelParmEst         <br />Path:&#160;&#160;&#160;&#160;&#160;&#160; Reg.MODEL1.SelectionMethod.Oxygen.Step1.SelParmEst         <br />&#8212;&#8212;&#8212;&#8212;-</font></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/09/22/sas-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Book on Confidence Intervals for Proportions by Prof. Newcombe</title>
		<link>http://www.jiangtanghu.com/blog/2012/09/21/new-book-on-confidence-intervals-for-proportions-by-prof-newcombe/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/09/21/new-book-on-confidence-intervals-for-proportions-by-prof-newcombe/#comments</comments>
		<pubDate>Sat, 22 Sep 2012 01:18:45 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Confidence Interval]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=711</guid>
		<description><![CDATA[Check it out: a new book on confidence intervals for proportions by Prof. Robert G. Newcombe&#160; just recently available from CRC Press: Confidence Intervals for Proportions and Related Measures of Effect Size This book also supplies a set of Excel spreadsheets to calculating CIs, see http://www.crcpress.com/product/isbn/9781439812785 Other users may be interested on a SAS or [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">Check it out: a new book on confidence intervals for proportions by Prof. Robert G. Newcombe&#160; just recently available from CRC Press:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/CI.jpg"><font size="1"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="CI" border="0" alt="CI" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/CI_thumb.jpg" width="321" height="517" /></font></a></p>
<blockquote><p><a href="http://www.crcpress.com/product/isbn/9781439812785" target="_blank"><em><font size="1">Confidence Intervals for Proportions and Related Measures of Effect Size</font></em></a></p>
</blockquote>
<p><font size="1">This book also supplies a set of Excel spreadsheets to calculating CIs, <em>see</em></font></p>
<blockquote><p><a href="http://www.crcpress.com/product/isbn/9781439812785"><font size="1">http://www.crcpress.com/product/isbn/9781439812785</font></a></p>
</blockquote>
<p><font size="1">Other users may be interested on a </font><a href="http://www.jiangtanghu.com/blog/2012/09/15/confidence-intervals-binomial-proportion/" target="_blank"><font size="1">SAS</font></a><font size="1"> or </font><a href="http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Software/prop.CI.r" target="_blank"><font size="1">R</font></a><font size="1"> implementation.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/09/21/new-book-on-confidence-intervals-for-proportions-by-prof-newcombe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frequentist or Baysian in A Binomial Test</title>
		<link>http://www.jiangtanghu.com/blog/2012/09/21/frequentist-or-baysian/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/09/21/frequentist-or-baysian/#comments</comments>
		<pubDate>Fri, 21 Sep 2012 05:20:10 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Logic]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Bayesian]]></category>
		<category><![CDATA[frequentist inference]]></category>
		<category><![CDATA[Hypothesis Testing]]></category>
		<category><![CDATA[P-value]]></category>
		<category><![CDATA[PROC FREQ]]></category>
		<category><![CDATA[Proc TTEST]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=700</guid>
		<description><![CDATA[A latest updated post on Freakonomics, Beware the Weasel Word “Statistical” in Statistical Significance!,&#160; seemed to attempt to challenge frequentist statistics by Bayesian. I have no research on Bayesian and won’t jump to the debates. I’d rather to use this case to apply the Dragon’s Teeth and Fleas logic of hypothesis testing (at least I [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">A latest updated post on </font><a href="http://www.freakonomics.com" target="_blank"><em><font size="1">Freakonomics</font></em></a><font size="1">, <em><a href="http://www.freakonomics.com/2012/09/20/beware-the-weasel-word-statistical-in-statistical-significance/" target="_blank">Beware the Weasel Word “Statistical” in Statistical Significance!</a></em>,&#160; seemed to attempt to challenge frequentist statistics by Bayesian. I have no research on Bayesian and won’t jump to the debates. I’d rather to use this case to apply the </font><a href="http://www.jiangtanghu.com/blog/2012/09/16/hypothesis-testing/" target="_blank"><font size="1">Dragon’s Teeth and Fleas logic of hypothesis testing</font></a> (at least I think frequentist is pretty intuitive)<font size="1">. </font></p>
<p><font size="1">A story goes with this post, that Bob won 20 times out of total 30 rounds with Alice in a children card game, “War”. War itself is a totally random game, so everyone is supposed to have 50% chance to win in a fair game. Since Bob won 20 out of 30, the question raised: is he cheating?</font></p>
<p><font size="1">To answer this question, just follow the </font><a href="http://www.jiangtanghu.com/blog/2012/09/16/hypothesis-testing/" target="_blank"><font size="1">Dragon’s Teeth and Fleas logic of hypothesis testing</font></a><font size="1">:</font></p>
<ul>
<li><font size="1">First, assume they are dragon’s teeth; in this case, we assume it is a fair game that everyone has probability of 0.5 to win. </font></li>
<li><font size="1">Under this assumption, we know the the number of winning follows </font><a href="http://en.wikipedia.org/wiki/Binomial_distribution" target="_blank"><font size="1">binomial distribution</font></a><font size="1"> with probability of 0.5. Now we should check Bob’s 20 winning in 30 in this distribution: is this output extreme, or is it a flea? </font></li>
<li><font size="1">We then get the p-Value calculated by P(X&gt;=20) which means the chance of winning 20 times and more in 30 games (as extreme or even more extreme ), is 0.0494. Here we only think about winning, so it is a one-sided test. Since this p-Value is less than the default </font><a href="http://en.wikipedia.org/wiki/Statistical_significance"><font size="1">significance level</font></a><font size="1"> of 0.05 (IT IS A FLEA!), we reject the null and think this is more likely not a fair game (Bob is cheating in this statistical point of view). </font></li>
</ul>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Bob.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Bob" border="0" alt="Bob" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Bob_thumb.png" width="503" height="257" /></font></a></p>
<p><font size="1">That’s all the story. Then </font><a href="http://www.freakonomics.com/2012/09/20/beware-the-weasel-word-statistical-in-statistical-significance/" target="_blank"><font size="1">this post</font></a><font size="1"> goes, “Although the procedure is mathematically well defined, it is nonsense”. The following is the first reason listed in the post:</font></p>
<blockquote><p><font size="1">To calculate the probability of Bob’s winning at least 20 games, you use not only the data that you saw (that Bob won 20 games out of 30) but also the imaginary data of Bob winning 21 out of 30 games, or 22 out of 30 games, all the way up to Bob winning all 30 games. The idea of imaginary data is oxymoronic.</font></p>
</blockquote>
<p><font size="1">In my opinion, the so called “imaginary data” are just the data filling out the binomial distribution (under the assumption of true null hypothesis) we got before and they are not oxymoronic at all (<em>sorry I use “data” as plural</em>).&#160; </font></p>
<p><font size="1">What do you think? I can’t go far away from here due to my limit knowledge of Bayesian.</font></p>
<p><font size="1">&#8212;&#8212;&#8212;&#8212;-appendix: SAS Codes and Outputs&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</font></p>
<blockquote><p><font size="1" face="Courier New">data a;       <br />&#160;&#160;&#160; input output count;        <br />datalines;        <br />0 20        <br />1 10        <br />;</font></p>
<p><font size="1" face="Courier New">proc freq data=a;       <br />&#160;&#160;&#160; tables output /binomialc (p=0.5) alpha=0.05;        <br />&#160;&#160;&#160; exact binomial;        <br />&#160;&#160;&#160; weight count;        <br />run;</font></p>
</blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Bob_SAS.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="Bob_SAS" border="0" alt="Bob_SAS" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Bob_SAS_thumb.png" width="325" height="314" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/09/21/frequentist-or-baysian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Statistical Notes (4): Dragon&#8217;s Teeth and Fleas: Hypothesis Testing in Plain English</title>
		<link>http://www.jiangtanghu.com/blog/2012/09/16/hypothesis-testing/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/09/16/hypothesis-testing/#comments</comments>
		<pubDate>Sun, 16 Sep 2012 18:12:07 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Logic]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Hypothesis Testing]]></category>
		<category><![CDATA[P-value]]></category>
		<category><![CDATA[Proc TTEST]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=693</guid>
		<description><![CDATA[Statisticians aren’t the problem for data science. The real problem is too many posers &#8212; Cathy O’Neil you actually do need to understand how to invert a matrix at some point in your life if you want to be a data scientist. &#8212; Cathy O’Neil I was asked in several different occasions to explain hypothesis [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><a href="http://mathbabe.org/2012/07/31/statisticians-arent-the-problem-for-data-science-the-real-problem-is-too-many-posers/" target="_blank"><font size="1">Statisticians aren’t the problem for data science. The real problem is too many posers</font></a><font size="1"> &#8212; Cathy O’Neil</font></p>
<p><a href="http://mathbabe.org/2012/07/31/statisticians-arent-the-problem-for-data-science-the-real-problem-is-too-many-posers/" target="_blank"><font size="1">you actually do need to understand how to invert a matrix at some point in your life if you want to be a data scientist.</font></a><font size="1"> &#8212; Cathy O’Neil</font></p>
</blockquote>
<p><a href="http://deepbluenine.deviantart.com/art/Red-Dragon-170245865" target="_blank"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Red_Dragon_by_DeepBlueNine" border="0" alt="Red_Dragon_by_DeepBlueNine" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Red_Dragon_by_DeepBlueNine.jpg" width="404" height="312" /></font></a></p>
<p><font size="1">I was asked in several different occasions to explain <a href="http://en.wikipedia.org/wiki/Statistical_hypothesis_testing" target="_blank">hypothesis testing</a> to non-technical people in plain English. Now I think I got a pretty neat one while honors belong to three great Germans, </font><a href="http://en.wikipedia.org/wiki/Friedrich_Engels" target="_blank"><font size="1">Friedrich Engels</font></a><font size="1">, </font><a href="http://en.wikipedia.org/wiki/Karl_Marx" target="_blank"><font size="1">Karl Marx</font></a><font size="1">, and </font><a href="http://en.wikipedia.org/wiki/Heinrich_Heine" target="_blank"><font size="1">Heinrich Heine</font></a><font size="1">. Engels wrote that Marx once quoted a saying from Heine that “I have sown <strong>dragon’s teeth</strong> and harvested <strong>fleas</strong>” (<em>but I didn’t find the original source</em>):</font></p>
<p><font color="#ff0000" size="1">In terms of hypothesis testing, say, if you plant <a href="http://en.wikipedia.org/wiki/Dragon's_teeth_(mythology)" target="_blank">dragon’s teeth</a>, you are not supposed to harvest the fleas; but if you do get the fleas, then most likely they are not dragon’s teeth at all!</font></p>
<p><font size="1">To make up the story as simple as possible while keep most of the key messages, here take a one-sample <a href="http://en.wikipedia.org/wiki/Student's_t-test" target="_blank">T-test</a> example from </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_ttest_examples02.htm" target="_blank"><em><font size="1">SAS TTEST Procedure User Guide</font></em></a><font size="1"><em>,</em> where the investigated data is the Degree of Reading Power (DRP, a measurement of children’s reading skill) from 44 third-grade children. The goal is to test if the mean score of DRP is equal to 30:</font></p>
<blockquote><p><font size="1" face="Courier New"><a href="http://en.wikipedia.org/wiki/Null_hypothesis" target="_blank">Null&#160;&#160;&#160;&#160;&#160;&#160;&#160; Hypothesis</a> (H0): μ = 30</font></p>
<p><font size="1" face="Courier New"><a href="http://en.wikipedia.org/wiki/Alternative_hypothesis" target="_blank">Alternative Hypothesis</a> (H1): μ ≠ 30</font></p>
</blockquote>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1">For the following discussion, three statistical measures needed (number of cases, mean and standard error):</font></p>
<blockquote><p><font size="1" face="Courier New">proc means data=read maxdec=4 n mean stderr;        <br />&#160;&#160;&#160; var score;         <br />&#160;&#160;&#160; freq count;         <br />run;</font></p>
</blockquote>
<p><font size="1">and the output:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/read.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="read" border="0" alt="read" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/read_thumb.png" width="244" height="110" /></font></a></p>
<p><font size="1">Here we go:</font></p>
<p><font size="1">1. Suppose H0 is true that the mean score is equal to 30 (population mean μ = 30, we assume they are dragon’s teeth!).</font></p>
<p><font size="1">2.&#160; We know the sample mean is the best estimate of the population mean, here it is 34.8636.</font></p>
<p><font size="1">3. This sample mean is derived from a sample (namely, the 44 children). We’d like to know if this sample (with mean of 34.8636) really come from the population (with mean of 30).</font></p>
<p><font size="1">4. To get to know this, we can repeat this survey (or trial, experiment), for example, take another 99 samples (also with 44 children in each sample) and calculate their sample means (we then have 100 different means from the whole 100 samples).</font></p>
<p><font size="1">5.&#160; We may know these means (got from such mechanism), with some necessary mathematical transformation,&#160; follow a </font><a href="http://en.wikipedia.org/wiki/Student's_t-distribution" target="_blank"><font size="1">t-distribution</font></a><font size="1"> with degree of freedom of 43 (df = 44 &#8211; 1):</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/test.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="test" border="0" alt="test" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/test_thumb.png" width="309" height="60" /></font></a></p>
<p><font size="1">The denominator as a whole is the standard error.</font></p>
<p><font size="1">6. Now we can check our interested sample (with mean of 34.8636) in this t-distribution. There is a corresponding t-value of this sample in the distribution, (34.8636 &#8211; 30) / 1.6930 =&#160; 2.8728:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/T_2side.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="T_2side" border="0" alt="T_2side" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/T_2side_thumb.png" width="392" height="427" /></font></a></p>
<p><font size="1">7. In this distribution, there are only 0.63% (0.0063) of t-values either above 2.8728 or below -2.8728 (symmetry of t-distribution). What does this mean?&#160; Obviously, our interested sample (with mean of 34.8636 and t-value of 2.8728) is not in the mainstream of the whole distribution. We can even think it is&#160; very “extreme”&#160; because, there are only 0.63% of elements in the whole that are more (or at least as equal) extreme than it.</font></p>
<p><font size="1">8. We call this number, 0.63% (0.0063) the </font><a href="http://en.wikipedia.org/wiki/P-value" target="_blank"><font size="1">P-value</font></a><font size="1">. According to </font><a href="http://en.wikipedia.org/wiki/P-value" target="_blank"><font size="1">wikipedia</font></a><font size="1">:</font></p>
<blockquote><p><font size="1">the p-value is the <strong>probability</strong> of obtaining a test statistic at least as <strong>extreme</strong> as the one that was actually observed, <strong>assuming that the null hypothesis is true</strong>.</font></p>
</blockquote>
<p><font size="1">Here the test statistic that was actually observed is 2.8728, the t-value from our interested sample. And we got from this t-distribution that P{|t|&gt;2.8728} = 0.0063. </font></p>
<p><font size="1">9. A question is, how extreme is extreme? We can’t define “extreme” exactly, but <em>probably,</em> we can. The threshold is the </font><a href="http://en.wikipedia.org/wiki/Statistical_significance" target="_blank"><font size="1">significance level</font></a><font size="1"> α (usually 0.05). As a rule of thumb, if p-value is less than the predefine </font><a href="http://en.wikipedia.org/wiki/Statistical_significance" target="_blank"><font size="1">significance level</font></a><font size="1"> α, then&#160; we think the event associated&#160; with this p-value is pretty extreme. </font></p>
<p><font size="1">10. Retell our story: first we assume the population mean is 30 just as the null hypothesis claims (<em><font color="#ff0000"><strong>assume they are dragon’s teeth</strong></font></em>), and under this assumption,&#160; we built a t-distribution; we then got that our interested sample is an extreme case (<em><strong><font color="#ff0000">it is a flea!</font></strong></em>). It is so extreme (much less than 0.05) that we can even think about that our assumption (the null hypothesis) is far away from true (<em><strong><font color="#ff0000">most likely they are not dragon’s teeth at all!</font></strong></em>). We reject the null hypothesis and take the alternative that the mean score is different from 30.</font></p>
<p><font size="1">11. Formally, it just follows a simple logic (taken from </font><a href="http://www.amazon.com/Statistical-Methods-Clinical-Research-Examples/dp/160764228X/ref=la_B001K8B726_1_1?ie=UTF8&amp;qid=1347463509&amp;sr=1-1" target="_blank"><font size="1">Glenn Walker and Jack Shostak</font></a><font size="1">, P.18): </font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/logic.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="logic" border="0" alt="logic" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/logic_thumb.png" width="391" height="247" /></font></a></p>
<p><font size="1">In our story, P is the null hypothesis, while Q is the extreme case: if H0 is true, most likely such extreme case should not happen; now we observe the extreme case (a t-value of 2.8728 in a </font><a href="http://en.wikipedia.org/wiki/Student's_t-distribution" target="_blank"><font size="1">t-distribution</font></a><font size="1"> with degree of freedom of 43), then it is reasonable to question the null hypothesis itself.</font></p>
<p><font size="1">12. To end this analysis, we can take a look at the output of </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_ttest_examples02.htm" target="_blank"><font size="1">SAS PROC TTEST</font></a><font size="1">: </font></p>
<p><font size="1"></font></p>
<blockquote><p><font size="1" face="Courier New">proc ttest data=read h0=30;        <br />&#160;&#160; var score;         <br />&#160;&#160; freq count;         <br />run;</font></p>
</blockquote>
<p><font size="1">The same result (P-value 0.0063 &lt; 0.05, reject H0):</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/TTEST_read.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="TTEST_read" border="0" alt="TTEST_read" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/TTEST_read_thumb.png" width="487" height="268" /></font></a></p>
<h1><font style="font-weight: bold">SAS Notes</font></h1>
<p><font size="1">12. In this </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_ttest_examples02.htm" target="_blank"><font size="1">example</font></a><font size="1">, input data take a form of cell count data, not as raw as the case-record data, so in both PROC MEANS and PROC TTEST, a “FREQ” statement added.</font></p>
<p><font size="1">13. You can compute this P-value in step-6 with SAS using </font><a href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#n0xy5mce5jgfh3n1wvy919jgm1iv.htm" target="_blank"><font size="1">ProbT</font></a><font size="1"> function:</font></p>
<blockquote><p><font size="1" face="Courier New">data;        <br />&#160;&#160;&#160; t&#160;&#160;&#160; = 2.8727938571;         <br />&#160;&#160;&#160; df&#160;&#160; = 43;         <br />&#160;&#160;&#160; tail = 2;         <br />&#160;&#160;&#160; P&#160;&#160;&#160; = tail*(1-probt(t,df));         <br />&#160;&#160;&#160; put P = ;         <br />run;</font></p>
</blockquote>
<p><font size="1">According to the symmetry of t-distribution, you should multiple 2 to get the two-sided probability:</font></p>
<p><font size="1"></font></p>
<p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Left.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Left" border="0" alt="Left" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Left_thumb.png" width="450" height="216" /></font></a></td>
</tr>
<tr>
<td valign="top" width="400"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Right.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Right" border="0" alt="Right" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Right_thumb.png" width="448" height="219" /></font></a></td>
</tr>
</tbody>
</table>
<p><font size="1">14. Long long ago, a so called “</font><a href="https://onlinecourses.science.psu.edu/stat501/node/7" target="_blank"><font size="1">critical value</font></a><font size="1">” is calculated to support the decision. That’s the calculation method using </font><a href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#n0yhwu36w3pj41n16j69b3hmzqvc.htm" target="_blank"><font size="1">TINV</font></a><font size="1"> function:</font></p>
<blockquote><p><font size="1" face="Courier New">data;        <br />&#160;&#160;&#160; alpha = 0.05;         <br />&#160;&#160;&#160; tail&#160; = 2;         <br />&#160;&#160;&#160; df&#160;&#160;&#160; = 43;</font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160; tCritic = tinv(1-alpha<font color="#ff0000">/</font>tail,df);         <br />&#160;&#160;&#160; put tCritic=;         <br />run;</font></p>
</blockquote>
<p><font size="1">We get this critical value of 2.0166921992:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/critical.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="critical" border="0" alt="critical" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/critical_thumb.png" width="395" height="417" /></font></a></p>
<p><font size="1">These two shaded zones are called “rejection zones”. The rule is, if the t-value we observed lies within the rejection zones, we should then reject the null hypothesis and take the alternative. In step-6, the t-value we calculated is 2.8728, which is bigger than this critical value, so we should reject H0.</font></p>
<p><font size="1">Critical value approach is equivalent with the p-value approach we discussed before, but slightly old fashioned. P-value is pretty intuitive and can be also easily calculated by computer. In days when computing power was not wildly available, people just took the t-distribution table to look up the critical values. </font></p>
<p><font size="1">Most statistical packages including SAS software don’t report the critical value (but still alive in statistics text books).</font></p>
<h1><font style="font-weight: bold">Reference</font></h1>
<p><em><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_ttest_examples02.htm" target="_blank"><font size="1">SAS PROC TTEST USER GUIDE</font></a></em></p>
<p><a href="http://www.amazon.com/Statistical-Methods-Clinical-Research-Examples/dp/160764228X/ref=la_B001K8B726_1_1?ie=UTF8&amp;qid=1347463509&amp;sr=1-1"><em><font size="1">Common Statistical Methods for Clinical Research with SAS Examples</font></em></a><font size="1"> by Glenn Walker and Jack Shostak</font></p>
<p><em><a href="http://cos.name/2010/11/hypotheses-testing/" target="_blank"><font size="1">Hypothesis Testing: A Primer</font></a></em><font size="1"> (in Chinese)</font></p>
<p><a href="http://onlinestatbook.com/analysis_lab/t_dist.html" target="_blank"><font size="1">Two sides T-distribution calculator</font></a></p>
<p><a href="http://www.stat.tamu.edu/~west/applets/tdemo.html" target="_blank"><font size="1">Single side t-distribution calculator</font></a></p>
<p><a href="http://www.codecogs.com/latex/eqneditor.php" target="_blank"><font size="1">Online Latex Equation Editor</font></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/09/16/hypothesis-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Statistical Notes (3): Confidence Intervals for Binomial Proportion Using SAS</title>
		<link>http://www.jiangtanghu.com/blog/2012/09/15/confidence-intervals-binomial-proportion/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/09/15/confidence-intervals-binomial-proportion/#comments</comments>
		<pubDate>Sat, 15 Sep 2012 04:13:03 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Binomial proportion inverval]]></category>
		<category><![CDATA[Confidence Interval]]></category>
		<category><![CDATA[PROC FREQ]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=673</guid>
		<description><![CDATA[A guy notices a bunch of targets scattered over a barn wall, and in the center of each, in the &#34;bulls-eye,&#34; is a bullet hole. &#34;Wow,&#34; he says to the farmer, &#34;that&#8217;s pretty good shooting. How&#8217;d you do it?&#34; &#34;Oh,&#34; says the farmer, &#34;it was easy. I painted the targets after I shot the holes.&#34; [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><font size="1">A guy notices a bunch of targets scattered over a barn wall, and in the center of each, in the &quot;bulls-eye,&quot; is a bullet hole. &quot;Wow,&quot; he says to the farmer, &quot;that&#8217;s pretty good shooting. How&#8217;d you do it?&quot; &quot;Oh,&quot; says the farmer, &quot;it was easy. I painted the targets after I shot the holes.&quot; – An Old Joke</font></p>
</blockquote>
<p><font size="1">Last year I dumped piece of </font><a href="http://www.jiangtanghu.com/blog/2011/07/14/a-sas-implementation-of-confidence-intervals-for-single-proportion-eleven-methods/" target="_blank"><font size="1">SAS codes to compute confidence intervals</font></a><font size="1"> for single proportion using 11 methods including 7 presented by one of Prof. Newcombe‘s&#160; most wildly cited papers, <strong><em><a href="http://www.ncbi.nlm.nih.gov/pubmed/9595616?dopt=Abstract" target="_blank">Two-sided confidence intervals for the single proportion: comparison of seven methods</a></em> </strong>(r is the number of event in total cases of n):</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Newcombe.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Newcombe" border="0" alt="Newcombe" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Newcombe_thumb.png" width="335" height="426" /></font></a></p>
<p><font size="1">To get such results using my macro, just submit the following SAS codes:</font></p>
<blockquote><p><font size="1" face="Courier New">filename CI url &#8216;</font><a href="https://raw.github.com/Jiangtang/Programming-SAS/master/CI_Single_Proportion.sas';"><font size="1" face="Courier New">https://raw.github.com/Jiangtang/Programming-SAS/master/CI_Single_Proportion.sas&#8217;;</font></a><font size="1">        <br /></font><font size="1" face="Courier New">%include CI;        <br />%CI_Single_Proportion(<font color="#ff0000">r=81,n=263</font>);</font></p>
</blockquote>
<p><font size="1">And the outputs(plus 4 additional methods):</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Jiangtang.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Jiangtang" border="0" alt="Jiangtang" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/Jiangtang_thumb.png" width="490" height="303" /></font></a></p>
<p><font size="1">In SAS 9.2 and 9.3, 6 of the 11 intervals can be calculated by </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_freq_syntax08.htm" target="_blank"><font size="1">PROC FREQ</font></a><font size="1">. First, method 1, 3, 9 ,8, 5 via a <em>binomial</em> option: </font></p>
<blockquote><p><font size="1" face="Courier New">data test;        <br />&#160;&#160;&#160; input grp outcome $ count;         <br />datalines;         <br />1 f 81         <br />1 u 182         <br />;</font></p>
<p><font size="1" face="Courier New">ods select BinomialCLs;        <br />proc freq data=test;         <br />&#160;&#160; tables outcome / binomial(all);         <br />&#160;&#160; weight Count;         <br />run;</font></p>
</blockquote>
<p><font size="1">The outputs:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/SASFreqCI.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SASFreqCI" border="0" alt="SASFreqCI" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/SASFreqCI_thumb.png" width="461" height="223" /></font></a></p>
<p><font size="1">And you can get another Wald interval with a continuity correction (method 2) via <em>binomialC</em> option:</font></p>
<blockquote><p><font size="1" face="Courier New">ods select BinomialCLs;        <br />proc freq data=test;         <br />&#160;&#160; tables outcome / <font color="#ff0000">binomialc</font>(all);         <br />&#160;&#160; weight Count;         <br />run;</font></p>
</blockquote>
<p><font size="1">get:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/SASFreqCI_CC.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SASFreqCI_CC" border="0" alt="SASFreqCI_CC" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/SASFreqCI_CC_thumb.png" width="417" height="240" /></font></a></p>
<h1><font style="font-weight: bold">R Notes</font></h1>
<p><font size="1">These two R packages contain a bunch of CI calculations:</font></p>
<blockquote><p><a href="http://cran.r-project.org/web/packages/binom/" target="_blank"><font size="1">Binom</font></a></p>
<p><a href="http://cran.r-project.org/web/packages/PropCIs/" target="_blank"><font size="1">PropCIS</font></a><font size="1"> </font></p>
</blockquote>
<p><font size="1">For SAS macro %CI_Single_Proportion, I borrowed a lot from this R implementation:</font></p>
<blockquote><p><a href="http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Software/prop.CI.r"><font size="1">http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Software/prop.CI.r</font></a></p>
</blockquote>
<h1><font style="font-weight: bold">Additional Notes</font></h1>
<p><font size="1">If interested, a nice paper on binomial intervals with ties, the paper <em><a href="http://stats-www.open.ac.uk/TechnicalReports/BinTies1.pdf" target="_blank">Confidence intervals for a binomial proportionin the presence of ties</a></em>,&#160; and<em> <a href="http://homepages.abdn.ac.uk/j.crawford/pages/dept/Binomial_Ties_CIs.htm" target="_blank">the program</a></em>. </font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/09/15/confidence-intervals-binomial-proportion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Statistical Notes (2): Equivalence Testing and TOST (Two One-Sided Test)</title>
		<link>http://www.jiangtanghu.com/blog/2012/09/12/tost-equivalence-test/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/09/12/tost-equivalence-test/#comments</comments>
		<pubDate>Thu, 13 Sep 2012 02:39:23 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[equivalence test]]></category>
		<category><![CDATA[Geometric Mean]]></category>
		<category><![CDATA[T-test]]></category>
		<category><![CDATA[TOST]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=662</guid>
		<description><![CDATA[Programmers Need to Learn Statistics Or I will Kill Them All –Zed A. Shaw In an equivalence testing&#160;example against lognormal data,&#160; a TOST (Two One-Sided Test)&#160; option used in SAS TTEST procedure: proc ttest data=auc dist=lognormal tost(0.8, 1.25); &#160;&#160; paired TestAUC*RefAUC; run; And the output: Since the 90% (who not 95%? see below) limit of [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><em><a href="http://zedshaw.com/essays/programmer_stats.html" target="_blank"><font size="1">Programmers Need to Learn Statistics Or I will Kill Them All</font></a><font size="1"> –Zed A. Shaw</font></em></p>
</blockquote>
<p><font size="1">In an </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_intropss_sect006.htm" target="_blank"><font size="1">equivalence testing</font></a><font size="1">&#160;</font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_ttest_examples05.htm"><font size="1">example</font></a><font size="1"> against lognormal data,&#160; a TOST (Two One-Sided Test)&#160; option used in SAS TTEST procedure:</font></p>
<blockquote><p><font size="1" face="Courier New">proc ttest data=auc dist=lognormal <font color="#ff0000">tost(0.8, 1.25)</font>;         <br />&#160;&#160; paired TestAUC*RefAUC;         <br />run;</font></p>
</blockquote>
<p><font size="1">And the output:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/tost.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="tost" border="0" alt="tost" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/tost_thumb.png" width="460" height="177" /></font></a></p>
<p><font size="1">Since the 90% (<em>who not 95%? see below</em>) limit of the geometric mean ratio (0.9412) , [0.8634,1.0260], lies in the FDA endorsed equivalence bounds [0.8,1.25],&#160; then we can make a conclusion of “Equivalent” among these Test and Reference drugs. Following are the notes on how this so called TOST (Two One-Sided Test) works.</font></p>
<p><font size="1">In its original form, the hypothesis of equivalence testing is written as </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_intropss_sect006.htm" target="_blank"><font size="1">difference on means</font></a><font size="1"> (equivalence by definition: not above the upper limit, and not below the lower limit):</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/hypo.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="hypo" border="0" alt="hypo" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/hypo_thumb.png" width="244" height="105" /></font></a></p>
<p><font size="1">Since our AUC example with lognormal data, the difference on means is transformed into a ratio,&#160; <a href="http://www.jiangtanghu.com/blog/2012/09/12/geomean/" target="_blank">geometric mean ratio</a>: if no difference in means, then the ratio simply equals 1. The two one-sided tests are (with form of ratio, not difference anymore):</font></p>
<blockquote><p><font size="1">I) upper one-sided T-test with a null ratio as the left bound of predefined limits, here is 0.8</font></p>
<p><font size="1">II) lower one-sided T-test with a null ratio as the right bound of predefined limits, here is 1.25.</font></p>
</blockquote>
<p><font size="1">T-test I can be done as (with option sides=U, where U means upper one-sided test. This option also only goes with SAS 9.2 and later)</font></p>
<blockquote><p><font size="1" face="Courier New">proc ttest data=auc dist=lognormal h0=0.8&#160; <strong><font color="#ff0000">sides=U</font></strong>;         <br />&#160;&#160; paired TestAUC*RefAUC;         <br />run;</font></p>
</blockquote>
<p><font size="1">And the output:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/upper.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="upper" border="0" alt="upper" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/upper_thumb.png" width="441" height="162" /></font></a></p>
<p><font size="1">T-test II, lower one-sided (with option sides=L, where L means lower one-sided test):</font></p>
<blockquote><p><font size="1" face="Courier New">proc ttest data=auc dist=lognormal h0=1.25 <font color="#ff0000">sides=L</font>;         <br />&#160;&#160; paired TestAUC*RefAUC;         <br />run;</font></p>
</blockquote>
<p><font size="1">And the output:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/lower.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="lower" border="0" alt="lower" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/lower_thumb.png" width="435" height="162" /></font></a></p>
<p><font size="1">So, the two one-sided tests together get a limit of [0.8634,1.0260], which is exactly as same as we got before using TOST option, except the former noted as “95%” and the later, “90%”. That’s because, the 0.1 (<em>1-90%</em>) should be dividend by 2 for the two one-sided tests to ensure they can both get their 0.05 significance respectively. Namely, at significant level α=5%, the equivalence test gets a&#160; 100(1-2α)% = 90% interval.</font></p>
<p><font size="1">At last, the overall P-value, will take the maximum one in these two one-sided tests (here we get max{0.0031,&lt;0.0001} = 0.0031).</font></p>
<h1>SAS Notes</h1>
<p><font size="1">Just did a quick search, PROC MIXED seemed more popular for statisticians to perform equivalence test years before:</font></p>
<p><a href="http://onbiostatistics.blogspot.com/2012/04/cookbook-sas-codes-for-bioequivalence.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+blogspot%2FsVwyB+%28On+Biostatistics+and+Clinical+Trials%29" target="_blank"><em><font size="1">Cookbook SAS Codes for Bioequivalence Test in 2x2x2 Crossover Design</font></em></a><font size="1">, by Chunqin Deng (2012)</font></p>
<p><em><a href="http://www.lexjansen.com/pharmasug/2004/posters/po05.pdf" target="_blank"><font size="1">The Paired T-Test: Does PROC MIXED Produce the Same Results as PROC TTEST?</font></a></em><font size="1"> by Jack Nyberg (2004)</font></p>
<p><font size="1">Section 8.2<em> Bioequivalence Testing,</em> in</font><em> </em><a href="http://www.amazon.com/Pharmaceutical-Statistics-Using-SAS-Practical/dp/159047886X" target="_blank"><font size="1"><em>Pharmaceutical Statistics Using SAS: A Practical Guide</em></font></a><font size="1">, by Alex Dmitrienko, Christy Chuang-Stein, and Ralph D&#8217;Agostino (2007)</font></p>
<h1><font style="font-weight: bold">Reference</font></h1>
<p><em><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_ttest_syntax01.htm" target="_blank"><font size="1">SAS TTEST Procedure User Guide</font></a></em></p>
<p><em><a href="http://pubs.acs.org/doi/pdf/10.1021/ac053390m" target="_blank"><font size="1">Beyond the t-Test</font></a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/09/12/tost-equivalence-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Statistical Notes (1): Geometric Mean and Geometric Mean Ratio</title>
		<link>http://www.jiangtanghu.com/blog/2012/09/12/geomean/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/09/12/geomean/#comments</comments>
		<pubDate>Thu, 13 Sep 2012 00:15:15 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[AUC]]></category>
		<category><![CDATA[clinical programmer]]></category>
		<category><![CDATA[equivalence test]]></category>
		<category><![CDATA[Geometric Mean]]></category>
		<category><![CDATA[GMT]]></category>
		<category><![CDATA[GMTR]]></category>
		<category><![CDATA[log transformation]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=652</guid>
		<description><![CDATA[Programmers Need to Learn Statistics Or I will Kill Them All –Zed A. Shaw Just read since SAS 9.2, the TTEST procedure also natively supports Equivalence Test by simply adding a TOST option (Two one-sided tests). In a example, TTEST procedure reports a geometric mean as 0.9412, which is the geometric mean of a ratio, [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><em><a href="http://zedshaw.com/essays/programmer_stats.html" target="_blank"><font size="1">Programmers Need to Learn Statistics Or I will Kill Them All</font></a><font size="1"> –Zed A. Shaw</font></em></p>
</blockquote>
<p><font size="1">Just read since SAS 9.2, the </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_ttest_examples05.htm" target="_blank"><font size="1">TTEST procedure</font></a><font size="1"> also natively supports </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_intropss_sect006.htm" target="_blank"><font size="1">Equivalence Test</font></a><font size="1"> by simply adding a TOST option (Two one-sided tests). In a </font><a href="http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_ttest_examples05.htm"><font size="1">example</font></a><font size="1">, TTEST procedure reports a <a href="http://en.wikipedia.org/wiki/Geometric_mean" target="_blank">geometric mean</a> as 0.9412, which is the geometric mean of a ratio, TestAUC/RefAUC. It can also be calculated manually by</font></p>
<blockquote><p><font size="1" face="Courier New">proc sql;        <br />&#160;&#160;&#160; select exp(mean(log(TestAUC/RefAUC)))         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;geometric mean of TestAUC/RefAUC&quot;         <br />&#160;&#160;&#160; from auc;         <br />quit;</font></p>
</blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/geom.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="geom" border="0" alt="geom" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/geom_thumb.png" width="203" height="97" /></font></a></p>
<p><font size="1">Actually this kind of geometric mean (of a ratio) is more often called <strong>geometric mean ratio</strong>(a ratio of two geometric means, in this case, geometric mean of TestAUC and geometric mean of RefAUC). Similarly,</font></p>
<blockquote><p><font size="1"><font face="Courier New">proc sql;          <br />&#160;&#160;&#160; select exp(mean(log(TestAUC))) as gmTest           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;geometric mean of TestAUC&quot;,           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; exp(mean(log(RefAUC)))&#160; as gmRef&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;geometric mean of RefAUC&quot; ,           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; CALCULATED&#160; gmTest / CALCULATED&#160; gmRef as gmr           <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;geometric mean ratio&quot;           <br />&#160;&#160;&#160; from auc;           <br />quit;</font> </font></p>
</blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/ratio.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ratio" border="0" alt="ratio" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/09/ratio_thumb.png" width="409" height="92" /></font></a></p>
<p><font size="1">78.315/83.2077 (the ratio of two geometric means) simply gets 0.941199 (geometric mean ratio), which can be also derived by calculating the geometric mean of a ratio (see above). You can prove it mathematically by playing some log-transformations:</font></p>
<blockquote><p><font size="1">geomean(A) / geomean(B) = geomean(A / B)</font></p>
</blockquote>
<p><font size="1">In vaccine trials (I worked before) where the interested values are antibody titers,&#160; the geometric mean is also called <strong>Geometric Mean Titer (GMT)</strong>, while geometric mean ratio&#160; referred as<strong> Geometric Mean Titer Ratio (GMTR, also named “n-fold rise”)</strong>. Both GMT and GMTR are wildly presented in statistical analysis reports.</font></p>
<p><font size="1">Usually, AUC data mentioned above (Area Under Curve, which is based on blood levels) and antibody titer values are </font><a href="http://en.wikipedia.org/wiki/Log-normal_distribution" target="_blank"><font size="1">log-normal</font></a><font size="1"> distributed(source data, noted as X), which means, if you take a log-transformation against X, namely Y=log(X), then Y follows the normal distribution (then Y has good properties to perform further statistical analysis). Suppose two treatment groups available, 1 and 2.</font></p>
<p><font size="1">Few extremely important conclusions, just as the codes above suggested, exp[mean(Y)]=exp{mean[log(X)]} is just geometric mean of X, and the geometric mean ratio, geomean (X1) / geomean(X2), simply equals exp[mean(Y1) – mean(Y2)]—This is the mathematical equivalence of ratio and difference. </font></p>
<p><font size="1">Back to the AUC example, the FDA endorsed equivalence bounds offered,&#160; 0.8 and 1.25, which are both ratio values. So, in the analysis, the original values are transformed to geometric mean ratio (0.9412 with 90% limit of [0.8634 , 1.0260]) to compare with the predefined bounds. For details of equivalence testing, I may extend it into a separated note.</font></p>
<p><font size="1"></font></p>
<h1>SAS Notes</h1>
<p><font size="1">In SAS/Base, </font><a href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p0ywq67uqarnnen135hhs9gcsuv0.htm" target="_blank"><font size="1">GEOMEAN</font></a><font size="1"> function is used to calculate the geometric mean. It takes a list of values as argument, which means, it can only perform on rows, but not on columns. So, if need the geometric mean of a variable, TestAUC for example, you should transpose the rows to columns or similarly, use a array:</font></p>
<blockquote><p><font size="1" face="Courier New"><strong>/*1. transpose*/</strong>        <br />proc transpose data=auc (keep=TestAUC) out=test prefix=t;        <br />&#160;&#160;&#160; var TestAUC;        <br />run;</font></p>
<p><font size="1" face="Courier New">data _null_;       <br />&#160;&#160;&#160; set test;        <br />&#160;&#160;&#160; gmTest=geomean (of t1-t12);        <br />&#160;&#160;&#160; put gmTest=;        <br />run;</font></p>
<p><font size="1" face="Courier New"><strong>/*2. array*/</strong></font></p>
<p><font size="1" face="Courier New">data _null_;       <br />&#160;&#160;&#160; if 0 then set auc(keep=TestAUC) nobs=nobs;        <br />&#160;&#160;&#160; call symputx(&#8216;nobs&#8217;,nobs);        <br />&#160;&#160;&#160; stop;        <br />run;</font></p>
<p><font size="1" face="Courier New">data _null_;       <br />&#160;&#160;&#160; set auc(keep=TestAUC) end=eof;        <br />&#160;&#160;&#160; array gm{&amp;obs} _temporary_;        <br />&#160;&#160;&#160; gm{_n_}=TestAUC;        <br />&#160;&#160;&#160; if eof then do;        <br />&#160;&#160;&#160;&#160;&#160;&#160; gmTest=geomean(of gm{*});        <br />&#160;&#160;&#160;&#160;&#160;&#160; put gmTest=;        <br />&#160;&#160;&#160; end;        <br />run;</font></p>
</blockquote>
<p><font size="1">Both methods return to the geometric mean of TestAUC as 78.314997096. The SQL solution I used above, <em><font face="Courier New">exp(mean(log(TestAUC)))</font></em>, is much simpler, and most important, it reminds us&#160; the applying of log-transformation.</font></p>
<h1>Reference</h1>
<p><font size="1"><em>Appendix F – Data Transformations</em> in </font><a href="http://www.amazon.com/Statistical-Methods-Clinical-Research-Examples/dp/160764228X/ref=la_B001K8B726_1_1?ie=UTF8&amp;qid=1347463509&amp;sr=1-1" target="_blank"><em><font size="1">Common Statistical Methods for Clinical Research with SAS Examples</font></em></a><font size="1"> by Glenn Walker and Jack Shostak supplies a concise discussion on log-transformation.&#160; Btw, this book is the No.1 statistical book I found ever for SAS programmers without statistical background.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/09/12/geomean/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is There Any Better Way? Publishing Process For CDISC Standards Documentation</title>
		<link>http://www.jiangtanghu.com/blog/2012/07/19/publishing-cdisc-standards/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/07/19/publishing-cdisc-standards/#comments</comments>
		<pubDate>Thu, 19 Jul 2012 05:54:10 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[GIThub]]></category>
		<category><![CDATA[Markdown]]></category>
		<category><![CDATA[publishing]]></category>
		<category><![CDATA[reStructuredText]]></category>
		<category><![CDATA[SDTM]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=630</guid>
		<description><![CDATA[&#160; 1. The Pain I read from Lex Jansen (@LexJansen) that CDISC SDTM v1.3 and SDTMIG v3.1.3 were newly released. It’s pretty nice since CDISC SDTM was supposed to be released semiannually in the new publishing cycle. We can see the team put great efforts on this new version, but frankly speaking, this delivery (the [...]]]></description>
				<content:encoded><![CDATA[<h1>&#160;</h1>
<h1><font style="font-weight: bold">1. The Pain</font></h1>
<p><font size="1">I read from Lex Jansen (</font><a href="https://twitter.com/lexjansen" target="_blank"><font size="1">@LexJansen</font></a><font size="1">) that <a href="http://www.cdisc.org/sdtm" target="_blank">CDISC SDTM v1.3 and SDTMIG v3.1.3 were newly released</a></font><font size="1"></font><font size="1">. It’s pretty nice since CDISC SDTM was <a href="http://www.jiangtanghu.com/blog/2012/03/28/rtp_cdisc_q1/" target="_blank">supposed to be released semiannually</a> in the new publishing cycle. We can see the team put great efforts on this new version, but frankly speaking, this delivery (the way to display, not the content itself) is far away elegant.</font></p>
<p><font size="1">The new SDTM Implementation Guide (IG) v1.3 is just a temporary workaround shipment, as an embedded file “<em>How to Use SDTMIG 3.1.3</em>” indicates, </font></p>
<blockquote><p><font size="1">SDTMIG 3.1.3 is presented as an annotated version of SDTMIG 3.1.2. This approach was taken for SDTMIG in order for the document to be released quickly without an extensive rewrite. The content presented as annotations will be incorporated into a single version of documentation in a future release.</font></p>
</blockquote>
<p><font size="1">What does “annotated” mean? When you replace “should” to “must” in the file,</font></p>
<ul>
<li><font size="1">strikethrough the word “should”</font> </li>
<li><font size="1">insert the replacement “must”, and</font> </li>
<li><font size="1">add a sticky note to indicate the change above</font> </li>
</ul>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/SDTMv313.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SDTMv313" border="0" alt="SDTMv313" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/SDTMv313_thumb.png" width="471" height="167" /></a></p>
<p><font size="1">This is annoying. There are 143 sticky notes throughout the whole documentation, including replacement, deleting, files attachment and such and the reason, is said to ensure “the document to be released quickly without an extensive rewrite”. BUT 143 sticky notes in a PDF file! it’s already huge editing effort ever!</font></p>
<h1><font style="font-weight: bold">2. The Reason (<em>or The Conjecture</em>)</font></h1>
<p><font size="1">Almost everybody complains of Microsoft Office Excel and Word, but Ура(!), they are still dominant in our working spaces (<em>especially heavy in clinical world? I’m not sure</em>). I didn’t have any personal connection with CDISC publishing team, but from the documentation released, I’m pretty confident that these files (SDTMIG v3.1.3 and others) were edited in Word and then published into PDF via Adobe products (very common practice, isn’t it?).</font></p>
<p><font size="1">Now you may understand why CDISC publishing team delivered this “annotated”&#160; version due to limited time and human resource (although editing 143 sticky notes was also a big work load). The clue is Word! Word! Word! </font></p>
<p><font size="1">Microsoft Word is extremely popular for its WYSIWYG (What You See Is What You Get), but it can&#8217;t separate contents from formats and it will a disaster when maintaining a frequent updated Word file by multiple users. In this CDISC SDTMIG case,&#160; there are about 143 <font color="#ff0000">content</font> updates supplied by CDISC community worldwide, but when applying such content updates to the original Word file, you are always reasonable to worry about that such updates would change something(<em>yes SOMETHING</em>) unexpectedly!</font><font size="1"> The biggest concern for CDISC standard files, I guess, again with confidence, is if such updates destroy the in-text links&#160; or other cross references which offers the nice navigation throughout the documentation.</font></p>
<p><font size="1">So, this “annotated” version at least is safe (<em>and SAFE is much more important than what it looks</em>): no links proven worktable in v3.1.2 will broken in this time pushing new release, and things would get better in the future (from the same source, “<em>How to Use SDTMIG 3.1.3</em>”):</font></p>
<blockquote><p><font size="1">CDISC is currently discussing how future documentation will be published ensure documentation is easy to navigate and read and at the same time easy to maintain.</font> </p>
</blockquote>
<h1>3. The Prospective</h1>
<p><font size="1">Yes I will end with a (set of) suggestion(s). The bottom line is no Word anymore and I promise no additional cost and pain compared to digging into Microsoft Word and Adobe Acrobat.</font></p>
<p><font size="1">Take SDTM IG v3.1.3 as a demo project:</font></p>
<ul>
<li><font size="1">Convert all the contents of SDTM IG v3.1.2 (from PDF, or original Word) to a text based format. Personally I prefer </font><a href="http://daringfireball.net/projects/markdown/" target="_blank"><font size="1">Markdown</font></a><font size="1"> and <a href="http://docutils.sourceforge.net/docs/ref/rst/introduction.html" target="_blank">reStructuredText</a>. Actually it doesn’t matter which one is chosen for test purpose, because such text based formats can be easily transferred (much easier than from Word/PDF). The benefits of these two formats are separation of contents and formats, and very intuitive to learn (much easier than HTML; <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html" target="_blank">almost WYSIWYG</a>). This task is machine doable somehow but also needs manually modification. But all in all,&#160; </font><font size="1">it is not a big deal, it is only about 300 pages. </font></li>
<li><font size="1">Edit these text files according to the new SDTM IG v3.1.3 updates. </font></li>
<li><font size="1">Distribute these text files (and rendered output files in PDF/ HTML formats) to a vendor supported or self hosted collaborating site, like <a href="https://github.com/" target="_blank">GitHub</a>.</font> </li>
<li><font size="1">Call for CDISC team members and users to </font><font size="1">report any issues and even encourage them to directly edit them online (don’t worry, it won’t be mess; we are in a version control system like <a href="https://github.com/" target="_blank">GitHub</a>).&#160; </font></li>
<li><font size="1">Then the next version will come out naturally (and peacefully).</font> </li>
</ul>
<p><font size="1">then I’m looking forward to hearing your ideas.</font></p>
<h1>4. Additional Notes</h1>
<p><font size="1">The markup standards mentioned above in my proposal, </font>&#160;<a href="http://daringfireball.net/projects/markdown/" target="_blank"><font size="1">Markdown</font></a><font size="1"> and <a href="http://docutils.sourceforge.net/docs/ref/rst/introduction.html" target="_blank">reStructuredText</a>, are not replacement for CDISC metadata standard, <a href="http://www.cdisc.org/odm" target="_blank">ODM</a> and its XML derivatives <a href="http://www.cdisc.org/define-xml" target="_blank">Define.xml</a>. Instead, they are better formats to get rid of Microsoft Word for community collaborating of editing the “narrative” parts of models (the PDF files we read from CDISC), for example, SDTMIG we discussed before. </font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/07/19/publishing-cdisc-standards/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tab is a Tab is a Tab is a Tab</title>
		<link>http://www.jiangtanghu.com/blog/2012/07/14/tab-is-a-tab-is-a-tab-is-a-tab/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/07/14/tab-is-a-tab-is-a-tab-is-a-tab/#comments</comments>
		<pubDate>Sun, 15 Jul 2012 03:10:40 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Clover]]></category>
		<category><![CDATA[Foxit Reader]]></category>
		<category><![CDATA[Notepad++]]></category>
		<category><![CDATA[Office Tab]]></category>
		<category><![CDATA[Sublime Text 2]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=621</guid>
		<description><![CDATA[Well I’m a big fan of “tabs” and feel much more comfortable when launching everything into tabs: web pages, text files, PDF files, Windows Office files (Word, Excel, PPT), and even folders.&#160; Followings are my best of choices to share: 1. File Explorer: Clover http://ejie.me/ There are lots of fancy/complicated file/folder management system beyond Windows [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">Well I’m a big fan of “tabs” and feel much more comfortable when launching everything into tabs: web pages, text files, PDF files, Windows Office files (Word, Excel, PPT), and even folders.&#160; Followings are my best of choices to share:</font></p>
<h1>1. File Explorer: Clover</h1>
<blockquote><p><a href="http://ejie.me/">http://ejie.me/</a></p>
</blockquote>
<p><font size="1"></font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/clover.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clover" border="0" alt="clover" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/clover_thumb.png" width="502" height="367" /></font></a></p>
<p><font size="1"></font></p>
<p><font size="1">There are lots of fancy/complicated file/folder management system beyond Windows Explore (<a href="http://www.ghisler.com/" target="_blank">Total Commander</a> might be the most famous one) while Clover, as its name indicates, is just as simple as I need:</font></p>
<ul>
<li><font size="1">Ctrl+T: open new tab</font></li>
<li><font size="1">Ctrl+W: close tab</font></li>
<li><font size="1">Ctr+tab: switch among tabs</font></li>
</ul>
<p><font size="1">And these shortcuts also work at the following applications (so, nothing new need to learn).</font></p>
<h1>2. Web Browser: Chrome</h1>
<blockquote><p><a href="https://www.google.com/intl/en/chrome/browser/">https://www.google.com/intl/en/chrome/browser/</a></p>
</blockquote>
<p><font size="1"></font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/chrome.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="chrome" border="0" alt="chrome" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/chrome_thumb.png" width="497" height="403" /></font></a></p>
<p><font size="1"></font></p>
<p><font size="1">While IE, as a saying goes, is a best browser to download Chrome(or <font size="1"><a href="http://www.mozilla.org/en-US/firefox/new/" target="_blank">Firefox</a> if you like</font>).</font></p>
<h1>3. PDF Reader: Foxit Reader</h1>
<blockquote><p><a href="http://www.foxitsoftware.com/Secure_PDF_Reader/">http://www.foxitsoftware.com/Secure_PDF_Reader/</a></p>
</blockquote>
<p><font size="1"></font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/foxit.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="foxit" border="0" alt="foxit" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/foxit_thumb.png" width="509" height="330" /></font></a></p>
<p><font size="1"></font></p>
<p><font size="1">Get rid of <a href="http://get.adobe.com/reader/" target="_blank">Adobe Reader</a>. Foxit Reader is no doubt the best of best PDF reader as it shows (and it’s free). </font></p>
<h1>4. Office Suite: Office Tab</h1>
<blockquote><p><a href="http://www.extendoffice.com/product/office-tab.html">http://www.extendoffice.com/product/office-tab.html</a></p>
</blockquote>
<p><font size="1"></font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/officeTab.png"><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/officeTab1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="officeTab" border="0" alt="officeTab" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/officeTab_thumb1.png" width="511" height="346" /></a></font></a></p>
<p><font size="1">Office Tab is a Microsoft Office add-in and it works (to launch Word, Excel and PPT files to tabs)!</font></p>
<h1>5. Text Editor: Notepad++/Sublime Text 2</h1>
<blockquote><p><a href="http://notepad-plus-plus.org/">http://notepad-plus-plus.org/</a></p>
<p><a href="http://www.sublimetext.com/">http://www.sublimetext.com/</a></p>
</blockquote>
<p><font size="1"></font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/NPP.png"><font size="1"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="NPP" border="0" alt="NPP" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/NPP_thumb.png" width="510" height="424" /></font></a></p>
<p><font size="1"></font></p>
<p><font size="1"><a href="http://support.sas.com/resources/papers/proceedings11/211-2011.pdf" target="_blank">I use Notepad++</a> for a long time and love it, but when I <a href="http://www.jiangtanghu.com/blog/2012/07/13/sublimetext2-sas/" target="_blank">take a look at Sublime Text 2</a>, I should admit that it has much of potentials to serve as my default text editor in the future:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/Sublime.png"><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/Sublime1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="Sublime" border="0" alt="Sublime" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/Sublime_thumb1.png" width="510" height="384" /></a></font></a></p>
<p><font size="1"></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/07/14/tab-is-a-tab-is-a-tab-is-a-tab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sublime Text 2 for SAS Programmers: A Quick Note</title>
		<link>http://www.jiangtanghu.com/blog/2012/07/13/sublimetext2-sas/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/07/13/sublimetext2-sas/#comments</comments>
		<pubDate>Fri, 13 Jul 2012 04:27:57 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Notepad++]]></category>
		<category><![CDATA[Sublime Text 2]]></category>
		<category><![CDATA[VIM]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=607</guid>
		<description><![CDATA[I’m playing with a new text editor, Sublime Text 2, and it has much potentials to replace my current handy Notepad++ and VIM. A quick note for further exploration(will keep update). /****update: 2012-10-16, Roy  Pardee maintains a nice bundle (here), so the following bundle will be not updated any more.***********/ Also created a Github repository [...]]]></description>
				<content:encoded><![CDATA[<p><span style="font-size: xx-small;">I’m playing with a new text editor, </span><a href="http://www.sublimetext.com/" target="_blank"><span style="font-size: xx-small;">Sublime Text 2</span></a><span style="font-size: xx-small;">, and it has much potentials to replace my current handy </span><a href="http://support.sas.com/resources/papers/proceedings11/211-2011.pdf" target="_blank"><span style="font-size: xx-small;">Notepad++</span></a><span style="font-size: xx-small;"> and </span><a href="http://www.jiangtanghu.com/blog/2011/11/13/vim-as-a-sas-ide/" target="_blank"><span style="font-size: xx-small;">VIM</span></a><span style="font-size: xx-small;">. A quick note for further exploration(<em>will keep update</em>).</span></p>
<p>/****update: 2012-10-16, Roy  Pardee maintains a nice bundle (<a href="http://implementing-vdw.blogspot.com/2012/10/new-sublime-text-package-available-for.html" target="_blank"><em>here</em></a>), so the following bundle will be not updated any more.***********/</p>
<p><span style="font-size: xx-small;">Also created a Github repository to hold all my SAS configuration files for Sublime Text 2. Fork me at</span></p>
<blockquote><p><span style="font-size: xx-small;"><a href="https://github.com/Jiangtang/sas.tmbundle">https://github.com/Jiangtang/sas.tmbundle</a></span></p></blockquote>
<h1><span style="font-weight: bold;">1. SAS syntax highlighting</span></h1>
<p><span style="font-size: xx-small;">Sublime Text 2 doesn’t support SAS syntax natively. I got a workaround so I didn’t need to write my own to play with it in the validation stage. Since  Sublime Text 2 supports </span><a href="http://macromates.com/" target="_blank"><span style="font-size: xx-small;">TextMate</span></a><span style="font-size: xx-small;">’s syntax configuration, Just borrowed a </span><a href="https://github.com/jakob-stoeck/sas.tmbundle" target="_blank"><span style="font-size: xx-small;">Textmate’s SAS syntax coloring theme</span></a><span style="font-size: xx-small;"> from </span><a href="https://github.com/jakob-stoeck" target="_blank"><span style="font-size: xx-small;">Jakob Stoeck</span></a><span style="font-size: xx-small;"> (thanks a lot man!).</span></p>
<p><span style="font-size: xx-small;">This SAS coloring theme is Github hosted, so you can clone the files to the user created “SAS” folder (C:Program FilesSublime Text 2dataPackagesSAS; I use a Win 7 machine) if your Git is installed properly:</span></p>
<blockquote><p><span style="font-family: 'Courier New'; font-size: xx-small;">git clone git://github.com/jakob-stoeck/sas.tmbundle SAS.tmbundle</span></p></blockquote>
<p><span style="font-size: xx-small;">or you can just simply save and copy this file to the SAS folder above:</span></p>
<blockquote><p><a href="https://raw.github.com/jakob-stoeck/sas.tmbundle/master/Syntaxes/SAS.tmLanguage"><span style="font-size: xx-small;">https://raw.github.com/jakob-stoeck/sas.tmbundle/master/Syntaxes/SAS.tmLanguage</span></a></p></blockquote>
<p><span style="font-size: xx-small;">Also can get from my repository forked from Jakob:</span></p>
<blockquote><p><a href="https://github.com/Jiangtang/sas.tmbundle/tree/master/Syntaxes">https://github.com/Jiangtang/sas.tmbundle/tree/master/Syntaxes</a></p></blockquote>
<p><span style="font-size: xx-small;">Then you get</span></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/Sublime_SAS.png"><span style="font-size: xx-small;"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="Sublime_SAS" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/Sublime_SAS_thumb.png" alt="Sublime_SAS" width="528" height="396" border="0" /></span></a></p>
<p><span style="font-size: xx-small;">Pretty nice, isn’t it? One of the neat functionalities of Sublime Text 2 is to open a folder as a project (showed in the left panel).</span></p>
<h1><span style="font-weight: bold;">2. VI(M) Emulation</span></h1>
<p><span style="font-size: xx-small;">We can also easily launch Vi(M) mode in Sublime Text 2, see</span></p>
<blockquote><p><a href="http://www.sublimetext.com/docs/2/vintage.html"><span style="font-size: xx-small;">http://www.sublimetext.com/docs/2/vintage.html</span></a></p>
<p><a href="https://github.com/SublimeText/VintageEx"><span style="font-size: xx-small;">https://github.com/SublimeText/VintageEx</span></a></p></blockquote>
<h1><span style="font-weight: bold;">3. Add Comments</span></h1>
<p><span style="font-size: xx-small;">Use this file from <a href="https://github.com/Jiangtang/sas.tmbundle" target="_blank">my repository</a>, <em><a href="https://github.com/Jiangtang/sas.tmbundle/blob/master/Comments%20(SAS).tmPreferences" target="_blank">Comments (SAS).tmPreferences</a></em>, then you can use the Sublime Text 2 default key shortcuts </span></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/comments.png"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="comments" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/comments_thumb.png" alt="comments" width="492" height="240" border="0" /></a></p>
<blockquote><p><span style="font-size: xx-small;"><strong>Ctrl+/</strong> to add <span style="color: #ff0000;">*comment;</span> style comments(toggle), and</span></p>
<p><span style="font-size: xx-small;"><strong>Shift + </strong><span style="font-size: xx-small;"><strong>Ctrl+/</strong>  to add <span style="color: #ff0000;">/*comment*/</span> style comments (toggle block)</span></span></p></blockquote>
<p><span style="font-size: xx-small;">Note that in SAS Enhanced Editor, we use <span style="font-size: xx-small;"><strong>Ctrl+/ </strong></span>to add toggle block comments.</span></p>
<h1><span style="font-weight: bold;">4. Code Autocomplete</span></h1>
<p><span style="font-size: xx-small;">I added a few snippets in <a href="https://github.com/Jiangtang/sas.tmbundle" target="_blank">my repository</a> to support some code autocomplete. </span></p>
<p><span style="font-size: xx-small;"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/snippets.png"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="snippets" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/snippets_thumb.png" alt="snippets" width="500" height="279" border="0" /></a></span></p>
<p><span style="font-size: xx-small;">For example, when type “s” and few alternatives show up,</span></p>
<p><span style="font-size: xx-small;"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/sql.png"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="sql" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/sql_thumb.png" alt="sql" width="384" height="265" border="0" /></a></span></p>
<p><span style="font-size: xx-small;">Hit RETURN and get</span></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/sql_auto.png"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="sql_auto" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/07/sql_auto_thumb.png" alt="sql_auto" width="430" height="233" border="0" /></a></p>
<p><span style="font-size: xx-small;">The neat thing is that your cursor is just in the shadow area /* variable(s)*/ after hitting RETURN where you can overwrite.</span></p>
<h1>5. Run SAS within Sublime Text 2</h1>
<p><span style="font-size: xx-small;">Copy the following system build file to SAS package folder (mine, <em>C:UsersjhuAppDataRoamingSublime Text 2PackagesSAS</em>):</span></p>
<blockquote><p><span style="font-family: 'Courier New';">{<br />
&#8220;cmd&#8221;: ["SAS","-sysin","$file"],<br />
&#8220;selector&#8221;: &#8220;source.sas&#8221;<br />
}<br />
</span></p></blockquote>
<blockquote><p><a href="https://github.com/Jiangtang/sas.tmbundle/blob/master/SAS.sublime-build">https://github.com/Jiangtang/sas.tmbundle/blob/master/SAS.sublime-build</a></p></blockquote>
<p><span style="font-size: xx-small;">Then you can run SAS code in Sublime Text 2 (by clicking “<strong>Build</strong>” or using shortcut <strong>Ctrl+B</strong>):</span></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/08/SublimeText2_SAS_build.png"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border: 0px;" title="SublimeText2_SAS_build" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/08/SublimeText2_SAS_build_thumb.png" alt="SublimeText2_SAS_build" width="485" height="384" border="0" /></a></p>
<p><span style="font-size: xx-small;">Actually it is batch run mode and you will get all the output files (.log, .lst and .pdf, .png and such) in the same folder you hold you SAS codes.</span></p>
<p><span style="font-size: xx-small;">I’m still working on how to set up interactive run mode and please leave any suggestions, comments and hints!</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/07/13/sublimetext2-sas/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Blogging is Awesome: CDISC Bloggers</title>
		<link>http://www.jiangtanghu.com/blog/2012/05/04/cdisc-blog/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/05/04/cdisc-blog/#comments</comments>
		<pubDate>Sat, 05 May 2012 02:42:32 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Clinical Standards]]></category>
		<category><![CDATA[eCTD]]></category>
		<category><![CDATA[EDC]]></category>
		<category><![CDATA[ODM]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=598</guid>
		<description><![CDATA[I remember when blogging was cool. Before the specializing and monetizing and Twitter-izing. &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8212;Peter Dewolf Well I think blogging is still cool (and awesome and awesome …). The most appealing personal reason is, blog posts are Google searchable and suitable for archive while Tweets NOT. Admittedly I hold some sort of&#160; Existentialism 2.0: if [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><a href="http://peterdewolf.com/i-remember-when-blogging-was-cool/" target="_blank"><font size="1">I remember when blogging was cool.</font></a></p>
<p><font size="1">Before the specializing and monetizing and Twitter-izing.</font></p>
<p><font size="1">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8212;</font><a href="http://peterdewolf.com/" target="_blank"><font size="1">Peter Dewolf</font></a></p>
</blockquote>
<p><font size="1">Well I think blogging is still cool (<em>and </em></font><a href="http://add-vodka.com/7-reasons-why-blogging-is-awesome/" target="_blank"><em><font size="1">awesome</font></em></a><em><font size="1"> and </font></em><a href="http://elevenminuteawesome.com/12-reasons-blogging-awesome/" target="_blank"><em><font size="1">awesome</font></em></a><font size="1"> …). The most appealing personal reason is, blog posts are Google searchable and suitable for archive while Tweets NOT. Admittedly I hold some sort of&#160; </font><a href="http://www.jiangtanghu.com/blog/2012/02/29/not-documented-not-exist/" target="_blank"><font size="1">Existentialism 2.0</font></a><font size="1">: </font></p>
<blockquote><p><font size="1">if it is not Google searched, it doesn’t exit!</font></p>
</blockquote>
<p><font size="1">Last month I placed a post on how to </font><a href="http://www.d-wise.com/blog/2012/04/26/keep-pace-with-cdisc/" target="_blank"><em><font size="1">keep pace with CDISC</font></em></a><font size="1"><em>&#160;</em>from its official channel<em>s </em>and I feel cool to add an appendix of source from the <em>awesome</em> blogosphere. Fortunately or not, CDISC is still in the niche market of topics and it takes few efforts to get the list(update me if someone else available! if you are a Google Reader user, just simply import </font><a href="http://jiangtanghu.com/docs/en/google-reader-subscriptions_CDISC_JiangtangHu.xml" target="_blank"><em><font size="1">this file</font></em></a><font size="1">, my Google Reader subscription on CDISC):</font></p>
<p><strong><font color="#ffffff" size="1">1. Blog @ </font></strong><a href="http://www.assero.co.uk" target="_blank"><strong><font color="#ffffff" size="1">Assero</font></strong></a><strong><font color="#ffffff" size="1"> by </font></strong><a href="http://www.assero.co.uk/about/" target="_blank"><strong><font color="#ffffff" size="1">Dave Iberson-Hurst</font></strong></a><strong><font color="#ffffff" size="1"> (“Dave IH”)</font></strong></p>
<blockquote><p><a href="http://www.assero.co.uk/category/blog/"><font size="1">http://www.assero.co.uk/category/blog/</font></a></p>
</blockquote>
<p><font size="1">Insightful and full of humor. I retweeted all of its latest posts and you can feel somehow on these tittles (YES on CDISC):</font></p>
<blockquote><h4><a href="http://www.assero.co.uk/2012/what-i-want-what-i-really-really-want/"><em><font size="1">What I Want, What I Really Really Want</font></em></a></h4>
<h4><a href="http://www.assero.co.uk/2012/churchill-the-fda-and-a-fall/"><em><font size="1">Churchill, the FDA and a Fall</font></em></a></h4>
<h4><a href="http://www.assero.co.uk/2012/mad-march-and-the-fda/"><em><font size="1">Mad March and the FDA</font></em></a></h4>
</blockquote>
<p><font size="1">Btw, I write blogs casual way while it is very impressive to read IH reminding me the George Orwell style.</font></p>
<p><font color="#ffffff" size="1"><strong>2. </strong></font><a href="http://www.d-wise.com/" target="_blank"><font color="#ffffff" size="1"><strong>d-Wise Technologies</strong></font></a><font color="#ffffff" size="1"><strong> Blog</strong></font></p>
<blockquote><p><a href="http://www.d-wise.com/blog/"><font size="1">http://www.d-wise.com/blog/</font></a></p>
</blockquote>
<p><font size="1">It is my employer’s official blog site where </font><a href="http://www.linkedin.com/pub/chris-decker/8/52/72" target="_blank"><font size="1">Chris Decker</font></a><font size="1"> is the key contributor to CDISC. You can check out his latest posts on </font><a href="http://www.phuse.eu/css" target="_blank"><font size="1">FDA/PhUSE Annual Computational Science Symposium</font></a><font size="1"> where he served as committee lead:</font></p>
<blockquote><h4><a href="http://www.d-wise.com/blog/2012/03/08/overcoming-industry-challenges-a-shift-to-collaboration/"><em><font size="1">Overcoming Industry Challenges: A Shift to Collaboration</font></em></a></h4>
<h4><a href="http://www.d-wise.com/blog/2012/03/19/validation-and-quality-are-they-the-same/"><em><font size="1">Validation and Quality: Are They the Same?</font></em></a></h4>
</blockquote>
<p><font size="1">I will also commit to update this blog as my understanding on clinical standards goes. Here is the saying:</font></p>
<blockquote><p><font size="1">look to the master,        <br />follow the master,         <br />walk with the master,         <br />see through the master,         <br />become the master.</font></p>
</blockquote>
<p><font color="#ffffff" size="1"><strong>3.&#160; </strong></font><a href="http://www.xml4pharma.com/" target="_blank"><font color="#ffffff" size="1"><strong>XML4Pharma</strong></font></a><font color="#ffffff" size="1"><strong> Blog</strong></font></p>
<blockquote><p><a href="http://cdiscguru.blogspot.com/"><font size="1">http://cdiscguru.blogspot.com/</font></a></p>
</blockquote>
<p><font size="1">with industry news and hard (while cool) way writing on XML (CDISC ODM, define.xml).</font></p>
<p><strong><font color="#ffffff" size="1">4. </font></strong><a href="http://blog.clinovo.com/" target="_blank"><strong><font color="#ffffff" size="1">eClinical Trends</font></strong></a><strong><font color="#ffffff" size="1"> by </font><a href="http://www.clinovo.com/" target="_blank"><font color="#ffffff" size="1">Clinovo</font></a></strong></p>
<blockquote><p><a href="http://blog.clinovo.com/category/cdisc/"><font size="1">http://blog.clinovo.com/category/cdisc/</font></a></p>
</blockquote>
<p><font size="1">Clinovo jumps to this topic by launching a CDISC SDTM convertor CDISC Express.</font></p>
<p><font size="1"><strong>5. eClinicalOpinion</strong></font></p>
<blockquote><p><a href="http://eclinicalopinion.blogspot.com/"><font size="1">http://eclinicalopinion.blogspot.com/</font></a></p>
</blockquote>
<p><font size="1">This blog is most focused on EDC, the clinical data management part. I like its <a href="http://eclinicalopinion.blogspot.com/2009/05/odm-tutorial-index.html" target="_blank">series discussion on CDISC ODM</a>.</font></p>
<p><font size="1"><strong>6. eCTD Regulatory Submissions Network</strong></font></p>
<blockquote><p><a href="http://ectdregulatorysubmissionsnetwork.blogspot.com/"><font size="1">http://ectdregulatorysubmissionsnetwork.blogspot.com/</font></a></p>
</blockquote>
<p><font size="1">This is a personal blog by Shakul Hameed. I read it mostly to get some information on submission requirements from European regulatory.</font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><a href="http://cdisc-end-to-end.blogspot.com/"><font size="1"></font></a></p>
<p><font size="1"></font></p>
<p><font color="#ffffff" size="1"><strong>7. HL7 Watch</strong></font></p>
<blockquote><p><a href="http://hl7-watch.blogspot.com/"><font size="1">http://hl7-watch.blogspot.com/</font></a></p>
</blockquote>
<p><font size="1">while it is not CDISC directly related (#6 also), it’s nice to get some voice of </font><a href="http://www.hl7.org/" target="_blank"><font size="1">HL7</font></a><font size="1"> which would be the future of CDISC.</font></p>
<p><font color="#ffffff" size="1"><strong>8. From a Logical Point of View-CDISC</strong></font></p>
<blockquote><p><a href="http://www.jiangtanghu.com/blog/category/cdisc/"><font size="1">http://www.jiangtanghu.com/blog/category/cdisc/</font></a></p>
</blockquote>
<p><font size="1">Yes this one, my 2 cents. I will keep recording my personal immersion and understanding on CDISC and related clinical standards. (while it is privilege to cross reference oneself in his/her own blog! Keep awesome, keep blogging.) </font></p>
<p><strong><font size="1">9. Linked Data and URI<font color="#ff0000">:</font>s for Enterprises</font></strong></p>
<blockquote><p><a href="http://kerfors.blogspot.com/"><font size="1">http://kerfors.blogspot.com/</font></a></p>
</blockquote>
<p><font size="1">Look at the colon (:) in the title of this blog and you’re right this blog plays (at least) with XML. I find it is good resource (thanks <a href="https://twitter.com/kerfors">@kerfors</a> for referencing!) to learn ODM, the foundation of CDISC while the latest post is </font></p>
<blockquote><p><font size="1"><em><a href="http://kerfors.blogspot.com/2012/05/semantic-models-for-cdisc-based.html" target="_blank">Semantic models for CDISC based standard and metadata management</a></em></font></p>
</blockquote>
<p><font size="1"></font></p>
<p><font size="1">P.S.: Blogger </font><a href="http://blogs.sas.com/content/sasdummy/" target="_blank"><font size="1">Chris Hemedinger</font></a><font size="1"> maintains a nice </font><a href="http://blogs.sas.com/content/sasdummy/2010/12/02/aggregating-assault-sas-blogs-are-everywhere/" target="_blank"><font size="1">list of SAS bloggers</font></a><font size="1"> (</font><a href="http://blogs.sas.com/content/sasdummy/2010/12/10/blogs-by-sas-employees-google-reader-bundle/"><em><font size="1">blogs by SAS employees</font></em></a><font size="1">, and </font><a href="http://blogs.sas.com/content/sasdummy/2010/12/10/blogs-by-sas-community-google-reader-bundle/"><em><font size="1">blogs by SAS customers, consultants, and the analytics community</font></em></a><font size="1">).</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/05/04/cdisc-blog/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Digital Life and Personal Data Analysis</title>
		<link>http://www.jiangtanghu.com/blog/2012/04/04/digital-life-and-personal-data-analysis/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/04/04/digital-life-and-personal-data-analysis/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 00:32:06 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[eBook]]></category>
		<category><![CDATA[Google Reader]]></category>
		<category><![CDATA[Graph]]></category>
		<category><![CDATA[JMP]]></category>
		<category><![CDATA[Stephen Wolfram]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=595</guid>
		<description><![CDATA[This picture (by newsobserver.com) took from Wake County Library Book Fair in North Carolina Fairground where I also went to pick up some books. I was and still is a big book (almost paper books) fan. But when I was standing among the 450,000 used books in the book fair, I felt depressed and reluctantly [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1"><img style="margin: 3px auto 5px; display: block; float: none" src="http://media2.newsobserver.com/smedia/2012/03/28/19/22/dP7WU.Em.156.jpg" width="485" height="316" /></font></p>
<p><a href="http://www.newsobserver.com/2012/03/29/1966004/book-bargains-abound-at-wake-county.html" target="_blank"><font size="1">This picture</font></a><font size="1"> (by newsobserver.com) took from <a href="http://www.wakegov.com/libraries/about/booksale.htm" target="_blank">Wake County Library Book Fair in North Carolina</a> Fairground where I also went to pick up some books. </font></p>
<p><font size="1">I was and still is a big book (almost paper books) fan. But when I was standing among the 450,000 used books in the book fair, I felt depressed and reluctantly had an impression: the paper&#160; books will and should go away in the future.&#160; eBooks will not fade away and they also have the economical, ecological and even <font color="#ff0000">aesthetical</font> advantages.</font></p>
<p><font size="1">Books are good(hundred and t<font size="1">housand years ago, our ancestors read books in silk, bamboo, shell, stone, . . .</font>), new paper books are good too. But the massive used books are burdens. I like the smell of ink of paper books but only for the new. The 450, 000 used books only have some recycling values: you can get a bag of books only for only 1 buck in the last exhibition day!</font></p>
<h1>Digital Life and Personal Data Analysis</h1>
<p><font size="1">eBook is one part of our digital library. We also have eMails, eBills, Tweets . . . and these data are born for analysis: complete, accurate, well formatted while in time(<em>again, analytical advantage!</em>). </font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/04/DailyOutgoingEmails.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="DailyOutgoingEmails" border="0" alt="DailyOutgoingEmails" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/04/DailyOutgoingEmails_thumb.png" width="473" height="204" /></a></p>
<p><font size="1"><a href="http://www.stephenwolfram.com/" target="_blank">Stephen Wolfram</a>, the founder and CEO of <a href="http://www.wolfram.com/" target="_blank">Wolfram Research</a>, posted <a href="http://blog.stephenwolfram.com/2012/03/the-personal-analytics-of-my-life/" target="_blank">an analysis of his personal emails</a> as above. That’s cool and you might know that years ago a writer would transcribe at least two copies of his/her mail, one for sending out and another for archiving (and publishing).</font></p>
<p><font size="1"><a href="http://blogs.sas.com/content/jmp/author/lizalucas/" target="_blank">Liza Lucas</a> of SAS JMP R&amp;D also contributed a page on her <a href="http://blogs.sas.com/content/jmp/author/lizalucas/" target="_blank">graphical financial life</a> while the data come from a online personal financial management system:</font></p>
<p><img style="margin: 3px auto 5px; display: block; float: none" src="http://blogs.sas.com/content/jmp/files/2012/03/spending1.png" width="363" height="336" /></p>
<p><font size="1">Back to reading. Below is my daily readings via Google Reader (in laptop and phone) in the past 30 days:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/04/chart.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="chart" border="0" alt="chart" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/04/chart_thumb.png" width="505" height="292" /></a></p>
<p><font size="1">Haa, I should clean up my subscribes now.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/04/04/digital-life-and-personal-data-analysis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenCDISC Validator V1.3: An Unboxing Review (1): counting issue</title>
		<link>http://www.jiangtanghu.com/blog/2012/03/31/opencdisc-validator-v1-3-an-unboxing-review-1-counting-issue/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/03/31/opencdisc-validator-v1-3-an-unboxing-review-1-counting-issue/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 20:58:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[OpenCDISC]]></category>
		<category><![CDATA[Validation]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=588</guid>
		<description><![CDATA[The lasted OpenCDISC Validator version 1.3 was released at 29 March, 2012 (btw, there is a typo in the Line 1 of CHANGELOG.txt within the package: “2012” not “2011”). As usual, you can submit the following SAS scripts to get some basic information(remember to customize your directory): filename CDISC url &#34;https://raw.github.com/Jiangtang/Programming-SAS/master/Rules_Count_OpenCDISC_XML.sas&#34;; %include CDISC; %Rules_Count_OpenCDISC_XML(dir=C:OpenCDISC1.3compareopencdisc-validator_1.3config) and [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">
<p>The lasted <a href="http://www.opencdisc.org" target="_blank">OpenCDISC</a> Validator version 1.3 was released at 29 March, 2012 (btw, there is a typo in the Line 1 of <em>CHANGELOG.txt</em> within the package: “2012” not “2011”). <a href="http://www.jiangtanghu.com/blog/2012/02/19/github-and-weekend-programming/" target="_blank">As usual</a>, you can submit the following SAS scripts to get some basic information(remember to customize your directory):</p>
<blockquote><p><font face="Courier New">filename CDISC url &quot;</font><a href="https://raw.github.com/Jiangtang/Programming-SAS/master/Rules_Count_OpenCDISC_XML.sas&quot;;"><font face="Courier New">https://raw.github.com/Jiangtang/Programming-SAS/master/Rules_Count_OpenCDISC_XML.sas&quot;;</font></a></p>
<p><font face="Courier New">%include CDISC;</font></p>
<p><font face="Courier New">%Rules_Count_OpenCDISC_XML(dir=C:OpenCDISC1.3compareopencdisc-validator_1.3config)</font></p>
</blockquote>
<p>and you get a summary of validation rules of OpenCDISC Validator V1.3 (<strong>499</strong> total unique rules):</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/OpenCDISC_V1.3.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="OpenCDISC_V1.3" border="0" alt="OpenCDISC_V1.3" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/OpenCDISC_V1.3_thumb.png" width="444" height="312" /></a></p>
<p>where</p>
<blockquote><p>AD: Analytical Data        <br />CT: Controlled Terminology         <br />DD: Data Definition         <br />OD: Operation Data Model         <br />SD: Study Data         <br />SE: <a href="http://www.cdisc.org/send" target="_blank">SEND</a> data         </p>
</blockquote>
<p>As comparison, a summary of V1.2.1 (<strong>385</strong> total unique rules) posted before:</p>
<p><img style="margin: 3px auto 5px; display: block; float: none" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/OC_by_model.png" width="446" height="292" /></p>
<p>The most significant enhancement of V1.3 against V1.2.1 is the adding of rules for <a href="http://www.cdisc.org/stuff/contentmgr/files/0/3fa5f30f40ce5ecc7b3f91e558b55f73/misc/amendment_1_to_study_data_tabulation_model_v1_2_and_sdtmig_v3_1_2_final_2011_12_14.pdf" target="_blank">SDTM 3.1.2 with Amendment 1</a> and <a href="http://www.cdisc.org/send" target="_blank">SEND 3.0</a>. You can see there are also some changes among others modules, such ADaM 1.0 and SDTM 3.1.2. The OpenCDISC release newsletter said that there are <strong>43</strong> new SDTM rules added. Well, rules deleted, rules added, rules commented, we now have some arithmetical discrepancies. </p>
<p>The scripts above capture all instances of validation rule IDs (also delete some commented for example in <em>config-<strong>define</strong>-1.0.xml</em>, four rules commented: OD0004, OD0005, OD0007, OD0008). We can also double validate the counts manually: </p>
<ul>
<li>copy all contents for example in <a href="http://www.opencdisc.org/projects/validator/cdisc-sdtm-3.1.2-validation-rules" target="_blank">SDTM 3.1.2</a> in its website into Notepad++ (where line numbers displayed) </li>
<li>delete all unnecessary entries </li>
<li>then the last line number is the total number of the rules (227 in this case).</li>
</ul>
<p>Another way to check the rules is to <a href="http://www.jiangtanghu.com/blog/2012/02/11/xml/" target="_blank">open the XML configuration files using a web browser</a>:</p>
<p><img style="margin: 3px auto 5px; display: block; float: none" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_IE1.png" width="455" height="405" /></p>
<p>Theoretically the three ways are identical in counting, but there is an open bug in the style sheet file in …OpenCDISC1.3opencdisc-validatorconfigresourcesxsl<strong>config.xsl</strong>, Line 175:</p>
<blockquote><p><font face="Courier New">&lt;xsl:template match=&quot;val:Unique|val:Condition|val:Match|val:Regex</font></p>
<p><font face="Courier New">|val:Required|val:Lookup|val:Metadata&quot;&gt;</font></p>
</blockquote>
<p>There is no “val:Find” to render all the Find validation rules (AD0061 in config-<strong>adam</strong>-1.0.xml) so all Find validators are not displayed. A suggested workaround is just to add “val:Find” to the file:</p>
<blockquote><p><font face="Courier New">&lt;xsl:template match=&quot;val:Unique|val:Condition|val:Match|val:Regex</font></p>
<p><font face="Courier New">|val:Required|val:Lookup|val:Metadata<font color="#ff0000">|val:Find</font>&quot;&gt;</font></p>
</blockquote>
<p>Actually in the “<em><a href="http://www.opencdisc.org/projects/validator/opencdisc-validation-framework#validation-rules" target="_blank">OpenCDISC Validation Framework</a></em>” page of OpenCDISC website, the “Find”validator is not <a href="http://www.jiangtanghu.com/blog/2012/02/29/not-documented-not-exist/" target="_blank">documented</a> yet. </p>
<p>&lt;<em>to be continued</em>&gt;</p>
<p> </font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/03/31/opencdisc-validator-v1-3-an-unboxing-review-1-counting-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fetch CDISC Control Terminology Files in NCI Vocabulary Repository: All in One Click</title>
		<link>http://www.jiangtanghu.com/blog/2012/03/30/fetch-cdisc-control-terminology-files-in-nci-vocabulary-repository-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/03/30/fetch-cdisc-control-terminology-files-in-nci-vocabulary-repository-2/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 04:23:17 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Control Terminology]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[NCI]]></category>
		<category><![CDATA[Wget]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=584</guid>
		<description><![CDATA[CDISC Control Terminology is the most frequent updated model among CDISC standards. Take SDTM as example, the latest SDTM terminologies released at 23 March 2012; and from 2009 to 2011, there were 15 different SDTM terminology versions! If you just rely on your own local repository, you might miss the pace somehow. Here is a [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1"><a href="http://www.cdisc.org/terminology" target="_blank">CDISC Control Terminology</a> is the most frequent updated model among CDISC standards. Take SDTM as example, the latest SDTM terminologies released at 23 March 2012; and f</font><font size="1">rom 2009 to 2011, there were 15 different SDTM terminology versions! If you just rely on your own local repository, you might miss the pace somehow.</font></p>
<p><font size="1">Here is a simple approach. Just submit the following one line of codes in a shell,</font></p>
<blockquote><p><font face="Courier New">wget </font><a href="http://evs.nci.nih.gov/ftp1/CDISC/"><font face="Courier New">http://evs.nci.nih.gov/ftp1/CDISC/</font></a><font face="Courier New"> -r &#8211;no-parent&#160; -l 3</font></p>
</blockquote>
<p><font size="1">and you will get all the CDISC Control Terminology files (plus historical versions) with proper folder structures in your local driver (the current directory of your shell).</font></p>
<p><font size="1">For syntax details, you can refer to its <a href="http://www.gnu.org/software/wget/manual/wget.html" target="_blank">online manual</a>:</font></p>
<blockquote><p><font size="1">-r: recursive retrieving</font></p>
<p><font size="1">&#8211;no-parent: only fetch files under the URL</font></p>
<p><font size="1">-l 3: set maximum depth level of 3 </font>&#160;</p>
</blockquote>
<p><font size="1">If you are a Windows user, you might install <a href="http://gnuwin32.sourceforge.net/packages/wget.htm" target="_blank">Wget for Windows</a> (it is a native tool in Unix/Linux under <font size="1">GNU</font>)and add it<em> </em>into your environmental variable, <em>Path</em>. You can also save the above scripts in a notepad and save it as a .bat file(<em>test.bat</em> for example). Next time you just click the <em>test.bat</em> to get all the updates.</font></p>
<p><font size="1">Wget is a very powerful tool. For me, the download speed is pretty acceptable (depends on internet connection) and almost no difference between a Windows 7 and a Ubuntu 11 machine:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/Wget_Win7.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Wget_Win7" border="0" alt="Wget_Win7" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/Wget_Win7_thumb.png" width="492" height="175" /></a></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/Wget_ubuntu11.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="Wget_ubuntu11" border="0" alt="Wget_ubuntu11" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/Wget_ubuntu11_thumb.png" width="491" height="149" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/03/30/fetch-cdisc-control-terminology-files-in-nci-vocabulary-repository-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick Notes on RTP CDISC User&#8217;s Group Q1 Meeting</title>
		<link>http://www.jiangtanghu.com/blog/2012/03/28/rtp_cdisc_q1/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/03/28/rtp_cdisc_q1/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 04:43:03 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=575</guid>
		<description><![CDATA[It’s my first time to attend a local event, RTP (Research Triangle Park) CDISC User’s Group meeting, Q1 and here are some quick notes. 1. people Almost fresh faces for me. It’s nice to meet Jack Shostak of Duke Clinical Research Institute again. I visited him in Duke last year after SAS Global Forum in [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">It’s my first time to attend a local event, RTP (<a href="http://en.wikipedia.org/wiki/Research_Triangle_Park" target="_blank">Research Triangle Park</a>) CDISC User’s Group meeting, <a href="http://tech.groups.yahoo.com/group/rtp_cdisc/message/411" target="_blank">Q1</a> and here are some quick notes.</font></p>
<h1>1. people</h1>
<p><font size="1">Almost fresh faces for me. It’s nice to meet <a href="http://support.sas.com/publishing/authors/shostak.html" target="_blank">Jack Shostak</a> of Duke Clinical Research Institute again. I visited him in Duke last year after SAS Global Forum in Las Vegas. Jack has a forthcoming book on SAS and CDISC, <a href="http://support.sas.com/publishing/authors/shostak.html" target="_blank"><em>Implementing CDISC Using SAS: An End-to-End Guide</em></a><em>. </em>It’s the first book on this topic and worth waiting!</font></p>
<p><font size="1">I also met (unexpectedly and exciting) a Chinese friend Chunmao in the meeting. Very interesting: after introduction, then we got that we emailed on CDISC mapping before! Chunmao just moved from DC to Triangle as SAS programmer weeks before(a side message: Triangle is hiring!). Big bonus to attend this meeting.</font></p>
<p><font size="1">My colleague <a href="https://twitter.com/#!/jcdecker71" target="_blank">Chris Decker</a> of d-Wise Technologies also showed up in this meeting. Actually he and Jack both serve as committee members in RTP CDISC User’s Group (they are also core members in CDISC community worldwide).</font></p>
<p><font size="1">Tom Soeder of Cato (venue supplier for this meeting) kindly served as host while Jeff Abolafia of Rho the moderator.</font></p>
<h1>2. agenda</h1>
<p><font size="1">Jeff and another key member of this group introduced some important updates from CDISC. One of the most interesting messages for me is the regular release cycle of SDTM Model and Implementation Guide. SDTM will be released semiannually, so we will get SDTMIG 3.1.3 in this summer, 3.1.4 at the end of year which will mainly hold the recently <a href="http://www.cdisc.org/extranet/index.php?a=3334" target="_blank">updates of Trial Summary</a>, an <a href="http://www.cdisc.org/stuff/contentmgr/files/0/3fa5f30f40ce5ecc7b3f91e558b55f73/misc/amendment_1_to_study_data_tabulation_model_v1_2_and_sdtmig_v3_1_2_final_2011_12_14.pdf" target="_blank">amendment</a>,&#160; and CDISC <a href="http://www.cdisc.org/stuff/contentmgr/files/0/3fa5f30f40ce5ecc7b3f91e558b55f73/misc/1.device_supplement_to_sdtmig_2012_01_24_draft.pdf" target="_blank">Devise domains</a> respectively.</font></p>
<p><font size="1">SDTM is the flagship model of CDISC.</font> <font size="1">SDTMIG 3.1.1 published in 2005 while 3.1.2 in 2008. It’s nice to see from the new more frequent release schedule that the CDISC community is expanding (and more organized and expected). </font></p>
<p><font size="1">Recently SDTM does have lots of updates, including a copy of the Metadata Submission Guideline (<a href="http://www.cdisc.org/extranet/index.php?a=3402" target="_blank">MSG</a>). CDISC organization will also offer periodic webinars on updates.</font></p>
<p><font size="1">Chris then gave a summary on latest FDA/PhUSE Computational Science Symposium (<a href="http://www.phuse.eu/css" target="_blank">CSS</a> while Chris organized it). You may get more information on <a href="http://d-wise.com/blog/2012/03/08/overcoming-industry-challenges-a-shift-to-collaboration/" target="_blank">Chris’s blog</a>, and <a href="http://www.cdisc.org/content3263" target="_blank">CDISC blog</a>. It’s better to keep CSS in watch list.</font></p>
<p><font size="1">Jack and Jeff had comments on working the <a href="http://www.phuse.eu/css" target="_blank">FDA/PhUSE working groups</a>.</font></p>
<p><font size="1">Peter Schaefer of Certara released the outputs of latest CDISC user network <a href="http://tech.groups.yahoo.com/group/rtp_cdisc/message/406" target="_blank">servey</a> where SDTM and ADaM are still on the top of user’s list.</font></p>
<p><font size="1">Final part (most practical), group exercises! Three groups were assigned to map some challenging CRF pages to SDTM. Some users also took some CRF pages from their own companies for public discussion (nice to have some flavors!). </font></p>
<h1>3. Links</h1>
<p><font size="1">RTP CDISC User’s Group on Yahoo Group (the traffic is low but still informative):</font></p>
<blockquote><p><a href="http://tech.groups.yahoo.com/group/rtp_cdisc/"><font size="1">http://tech.groups.yahoo.com/group/rtp_cdisc/</font></a></p>
</blockquote>
<p><font size="1">CDISC official site:</font></p>
<blockquote><p><a href="http://www.cdisc.org/"><font size="1">http://www.cdisc.org/</font></a></p>
</blockquote>
<p><font size="1">Now we have more reasons to visit CDISC website frequently for new updates models (e.g., Control Terminology also released semiannually) and webinar postings.</font></p>
<p><font size="1">FDA/PhUSE working groups Wiki:</font></p>
<blockquote><p><a href="http://www.phusewiki.org/wiki/index.php?title=PhUSE_Wiki"><font size="1">http://www.phusewiki.org/wiki/index.php?title=PhUSE_Wiki</font></a></p>
</blockquote>
<p><font size="1">Lots of action followed by the six working groups.</font></p>
<p><font size="1">Chris is one of the core members to promote CDISC among industry and regulator&#160; and he is also the most active blog writer on d-Wise blog and you can get informed:</font></p>
<blockquote><p><a href="http://d-wise.com/blog/"><font size="1">http://d-wise.com/blog/</font></a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/03/28/rtp_cdisc_q1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>US Post Beats Menu Cost</title>
		<link>http://www.jiangtanghu.com/blog/2012/03/24/us-post-beats-menu-cost/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/03/24/us-post-beats-menu-cost/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 05:29:47 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[CPI]]></category>
		<category><![CDATA[economics]]></category>
		<category><![CDATA[Inflation]]></category>
		<category><![CDATA[mail stamp]]></category>
		<category><![CDATA[menu cost]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=572</guid>
		<description><![CDATA[One of the interesting observations in my first few months in US: there is no price printed in the new mail stamps! It is interesting because as a former student of economics, I think US Post system did a nice attempt to beat the so called “menu cost” which should honor to Harvard economist Mankiw. [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1"></font></p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200">
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/stamp_5c.jpg"><img style="background-image: none; border-right-width: 0px; margin: 3px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="stamp_5c" border="0" alt="stamp_5c" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/stamp_5c_thumb.jpg" width="196" height="235" /></a></p>
</td>
<td valign="top" width="200">
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/stamp2011.jpg"><img style="background-image: none; border-right-width: 0px; margin: 3px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="stamp2011" border="0" alt="stamp2011" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/stamp2011_thumb.jpg" width="201" height="236" /></a></p>
</td>
</tr>
</tbody>
</table>
<p><font size="1">One of the interesting observations in my first few months in US: there is no price printed in the new mail stamps!</font></p>
<p><font size="1">It is interesting because as a former student of economics, I think US Post system did a nice attempt to beat the so called “<a href="http://en.wikipedia.org/wiki/Menu_cost" target="_blank">menu cost</a>” which should honor to Harvard economist <a href="http://en.wikipedia.org/wiki/N._Gregory_Mankiw" target="_blank">Mankiw</a>. Literally the menu cost is the cost of a restaurant to print new menus due to price adjustment. In this story, it is the cost of US Post to print new stamps with adjusted price.</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/US_CPI.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="US_CPI" border="0" alt="US_CPI" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/US_CPI_thumb.png" width="459" height="360" /></a></p>
<p><font size="1">Why US Post need to print new stamps with new price? It is because of the inflation! I took a quick search, the first class postage rate was 5 cents in 1963 and never changed until 1968. But during this 5 years, the CPI (<a href="http://en.wikipedia.org/wiki/Consumer_price_index" target="_blank">consumer price index</a>, one of the robust measures of inflation; data see <a href="http://www.johnstonsarchive.net/other/postage.html" target="_blank">here</a>, codes see below) increased from 30.6 to 33.4, which means, the actual price (see <font color="#ff0000">red</font> line below) of a postage in 1967 was even less than in 1963! </font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/US_Postage_Rates.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="US_Postage_Rates" border="0" alt="US_Postage_Rates" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/03/US_Postage_Rates_thumb.png" width="484" height="384" /></a></p>
<p><font size="1">Why US Post didn’t adjust the postage rate accordingly in these years? In a free market, prices are supposed to be adjusted immediately upon market demands and supplies. <a href="http://en.wikipedia.org/wiki/New_Keynesian_economics" target="_blank">A school of economics</a> argues that even in free markets, the prices can be sticky. One of causes of such price stickiness is the menu cost. In this case, US Post knew that the actual cost of posting a mail was up, but it still didn’t will to print new stamps with new price due to printing cost itself (suppose there were lots of stocks) and even the cost to inform people(and such small costs).</font></p>
<p><font size="1">Now US Post doesn’t want to lose money by supplying mail services with a price under market value while also want to avoid so called menu cost, then a stamp without price printed seems good enough to solve such dilemma!</font></p>
<p><font size="1">/*&#8212;&#8212;&#8212;&#8211;codes for graphics go here and it’s nice to post the first SGPLOT in this blog while watching NCAA game of NCSU vs Kansas&#8212;&#8212;&#8212;&#8212;&#8211;*/</font></p>
<blockquote><p><font face="Courier New">data rate;       <br />&#160;&#160;&#160; input Year Nominal Real CPI;        <br />datalines;        <br />1866&#160;&#160;&#160; 3&#160;&#160;&#160; 44.0&#160;&#160;&#160; 15.4        <br />1867&#160;&#160;&#160; 3&#160;&#160;&#160; 47.4&#160;&#160;&#160; 14.3        <br />1868&#160;&#160;&#160; 3&#160;&#160;&#160; 49.1&#160;&#160;&#160; 13.8        <br /><em>(data see </em><a href="http://www.johnstonsarchive.net/other/postage.html" target="_blank"><em>here</em></a><em>)</em>        <br />;</font></p>
<p><font face="Courier New">proc means data=rate;       <br />&#160;&#160;&#160; var Nominal Real CPI;        <br />run;</font></p>
<p><font face="Courier New">proc sgplot data=rate;       <br />&#160;&#160;&#160; title &quot;History of United States CPI&quot;;        <br />&#160;&#160;&#160; series x=year y=cpi;        <br />&#160;&#160;&#160; xaxis values= (1870 to 2010 by 10);        <br />&#160;&#160;&#160; refline 100 / transparency = 0.5;        <br />run;</font></p>
<p><font face="Courier New">proc sgplot data=rate;       <br />&#160;&#160;&#160; title &#8216;History of United States Postage Rates&#8217;;        <br />&#160;&#160;&#160; series x=Year y=Nominal;        <br />&#160;&#160;&#160; series x=Year y=Real;        <br />&#160;&#160;&#160; xaxis values= (1870 to 2010 by 10);        <br />&#160;&#160;&#160; yaxis label=&#8217;Rates&#8217;;        <br />&#160;&#160;&#160; refline 10 44 / transparency = 0.5&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; label = (&#8216;Nominal (Mean)&#8217; &#8216;Real (Mean)&#8217;);        <br />run;</font></p>
</blockquote>
<p><font size="1">&#160;</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/03/24/us-post-beats-menu-cost/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Not Documented, Not Exist?!</title>
		<link>http://www.jiangtanghu.com/blog/2012/02/29/not-documented-not-exist/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/02/29/not-documented-not-exist/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 00:48:44 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Documentation]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=520</guid>
		<description><![CDATA[Weeks before I first got the column edit mode in SAS 9.3 Enhanced Editor. Since had no previous SAS versions in machine, I just checked the online documentation of SAS 9.2 in which it’s not mentioned (while documented in SAS 9.3) then I concluded the column mode is an exciting new feature in SAS 9.3: [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">Weeks before I first got the <a href="http://www.jiangtanghu.com/blog/2012/02/12/column-mode-in-sas-9-3-enhanced-editor/" target="_blank">column edit mode in SAS 9.3 Enhanced Editor</a>. Since had no previous SAS versions in machine, I just checked the <a href="http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#editor_enhanced.htm" target="_blank">online documentation of SAS 9.2</a> in which it’s not mentioned (while documented in <a href="http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#editor_enhanced.htm" target="_blank">SAS 9.3</a>) then I concluded the column mode is an exciting new feature in SAS 9.3: if it is not documented, it doesn’t exist!</font></p>
<p><font size="1">Then it turns that I was wrong. My friend <a href="http://www.linkedin.com/pub/venkat-veerisetty/5/33/8b9" target="_blank">Venkat Veerisetty</a> just told me that this feature was available since SAS v8. I also found a machine with SAS v9.2 and it works.</font></p>
<p><font size="1">While not-documented-not-exist is obviously an arbitrary assumption regardless of facts, I still hold it somehow when emphasizing the importance of documentation.&#160; <a href="http://blogs.sas.com/content/sasdummy" target="_blank">Chris Hemedinger</a> gave <a href="http://blogs.sas.com/content/sasdummy/2011/03/29/undocumented-features-theres-a-reason-they-are-not-documented/" target="_blank">a reason why there are some undocumented “behaviors” in SAS</a>. It makes sense, while in this case, it would be just happened to be missed in other documents and then newly added in v9.3.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/02/29/not-documented-not-exist/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Happy Leap Year From Logical (Point of View) Operators</title>
		<link>http://www.jiangtanghu.com/blog/2012/02/29/happy-leap-year-from-logical-point-of-view-operators/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/02/29/happy-leap-year-from-logical-point-of-view-operators/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 05:14:07 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[logic operator]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=518</guid>
		<description><![CDATA[Today is Feb 29, –another leap year! I just found it is a good chance to raise the topic of logic operators again. To determine if 2012 is a leap year, use the straightforward logic expression (demo is SAS, follow the pseudo code in the wiki page of leap year): if mod(year,4) = 0 then [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">Today is Feb 29, –another <a href="http://en.wikipedia.org/wiki/Leap_year" target="_blank">leap year</a>! I just found it is a good chance to raise the topic of <a href="http://www.jiangtanghu.com/blog/2010/11/04/power-of-logic-operators-a-trick/" target="_blank">logic operators again</a>.</font></p>
<p><font size="1">To determine if 2012 is a leap year, use the straightforward logic expression (demo is SAS, follow the pseudo code in the wiki page of <a href="http://en.wikipedia.org/wiki/Leap_year" target="_blank">leap year</a>):</font></p>
<blockquote><p><font size="1" face="Courier New">if mod(year,4) = 0 then do;&#160;&#160; <br />&#160;&#160;&#160; if mod(year,100) = 0 then do;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if mod(year,400) = 0 then is_leap = 1;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; else is_leap = 0;        <br />&#160;&#160;&#160; end;        <br />&#160;&#160;&#160; else is_leap = 1;        <br />end;        <br />else leap=0;</font></p>
</blockquote>
<p><font size="1">while using logic operators (Boolean expression), only one line of codes needed:</font></p>
<blockquote><p><font size="1" face="Courier New">is_leap = (mod(year,4) = 0) <font color="#ff0000">and</font>         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (mod(year,100) ^= 0) <font color="#ff0000">or</font> (mod(year,400) = 0)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; );</font>      </p>
</blockquote>
<p><font size="1">or using SAS bitwise logical operations:</font></p>
<blockquote><p><font size="1" face="Courier New">is_leap=<font color="#ff0000">bor</font>(<font color="#ff0000">band</font>(mod(year,4) = 0,mod(year,100) ^= 0), mod(year,400) = 0)</font></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/02/29/happy-leap-year-from-logical-point-of-view-operators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitHub and Weekend Programming</title>
		<link>http://www.jiangtanghu.com/blog/2012/02/19/github-and-weekend-programming/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/02/19/github-and-weekend-programming/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 21:17:32 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GIThub]]></category>
		<category><![CDATA[OpenCDISC]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=513</guid>
		<description><![CDATA[Yihui of Iowa State just texted me that GitHub is programmers’ Facebook. Inspired by him(great thanks!), I also begin to play with GitHub now: https://github.com/Jiangtang Currently I only created one repo as personal SAS code repository. To kill weekend time, I uploaded piece of codes to count the OpenCDISC validation rules by models. To use [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1"><a href="https://github.com/yihui" target="_blank">Yihui</a> of Iowa State just texted me that <a href="https://github.com/" target="_blank">GitHub</a> is programmers’ Facebook. Inspired by him(great thanks!), I also begin to play with GitHub now:</font></p>
<blockquote><p><a href="https://github.com/Jiangtang"><font size="1">https://github.com/Jiangtang</font></a></p>
</blockquote>
<p><font size="1">Currently I only created one repo as <a href="https://github.com/Jiangtang/Programming-SAS" target="_blank">personal SAS code repository</a>. To kill weekend time, I uploaded piece of codes to <a href="https://github.com/Jiangtang/Programming-SAS/blob/master/Rules_Count_OpenCDISC_XML.sas" target="_blank">count the OpenCDISC validation rules by models</a>. To use it:</font></p>
<blockquote><p><font size="1">filename CDISC url “<a href="https://raw.github.com/Jiangtang/Programming-SAS/master/Rules_Count_OpenCDISC_XML.sas">https://raw.github.com/Jiangtang/Programming-SAS/master/Rules_Count_OpenCDISC_XML.sas</a>”;</font></p>
<p><font size="1">%include CDISC;</font></p>
<p><font size="1">%Rules_Count_OpenCDISC_XML(dir=C:tempOpenCDISCsoftwareopencdisc-validatorconfig)</font></p>
</blockquote>
<p><font size="1">while get:</font></p>
<p><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/OC_by_model.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="OC_by_model" border="0" alt="OC_by_model" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/OC_by_model_thumb.png" width="360" height="238" /></a></font></p>
<p><font size="1">Happy weekend and happy programming.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/02/19/github-and-weekend-programming/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Column Mode in SAS 9.3 Enhanced Editor</title>
		<link>http://www.jiangtanghu.com/blog/2012/02/12/column-mode-in-sas-9-3-enhanced-editor/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/02/12/column-mode-in-sas-9-3-enhanced-editor/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 16:05:28 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=508</guid>
		<description><![CDATA[A Sunday finding, column mode new in SAS 9.3 Enhanced Editor (in Windows OS): Currently this column mode only supports selecting (highlighting) but not editing. Hoo, it’s better than nothing. Update: the column selection mode was available since SAS v8, see http://www.jiangtanghu.com/blog/2012/02/29/not-documented-not-exist/]]></description>
				<content:encoded><![CDATA[<p><span style="font-size: xx-small;">A Sunday finding, <a href="http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#editor_enhanced.htm" target="_blank">column mode</a> new in SAS 9.3 Enhanced Editor (in Windows OS): </span></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/column_SAS_editor.png"><img style="background-image: none; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="column_SAS_editor" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/column_SAS_editor_thumb.png" alt="column_SAS_editor" width="439" height="207" border="0" /></a></p>
<p><span style="font-size: xx-small;">Currently this column mode only supports selecting (highlighting) but not editing. Hoo, it’s better than nothing.</span></p>
<p>Update: the column selection mode was available since SAS v8, see</p>
<p><a href="http://www.jiangtanghu.com/blog/2012/02/29/not-documented-not-exist/">http://www.jiangtanghu.com/blog/2012/02/29/not-documented-not-exist/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/02/12/column-mode-in-sas-9-3-enhanced-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Face Off: Review OpenCDISC XML files</title>
		<link>http://www.jiangtanghu.com/blog/2012/02/11/xml/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/02/11/xml/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 21:35:35 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Notepad++]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OpenCDISC]]></category>
		<category><![CDATA[SAS XML Mapper]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=479</guid>
		<description><![CDATA[OpenCDISC, the first open source CDISC validator, is already in the toolbox of FDA reviewers (CDER/CBER, see CDISC Standards in the Regulatory Submission Process, 26 January 2012, P.33). The key features in OpenCDISC is a dichotomy of validation rules (XML based) and application logic. Currently OpenCDISC Validator (Version 1.2.1) officially supports the four following CDISC [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.opencdisc.org/" target="_blank"><font size="1">OpenCDISC</font></a><font size="1">, the first open source CDISC validator, is already in the toolbox of FDA reviewers (CDER/CBER, see <em><a href="http://www.cdisc.org/stuff/contentmgr/files/0/8d99d69f1195d2a2954e62d2fbb3470f/misc/cdisc_standards_in_fda_submissions_2012_01_26pdf.pdf" target="_blank">CDISC Standards in the Regulatory Submission Process</a></em>, 26 January 2012, P.33). The key features in OpenCDISC is a <a href="http://www.opencdisc.org/projects/validator/opencdisc-validation-framework" target="_blank">dichotomy of validation rules (XML based) and application logic</a>. </font><font size="1">Currently OpenCDISC Validator (<a href="http://www.opencdisc.org/download" target="_blank">Version 1.2.1</a>) officially supports the four following CDISC modules:</font></p>
<ul>
<ul>
<li><a href="http://www.opencdisc.org/projects/validator/cdisc-sdtm-3.1.2-validation-rules">SDTM 3.1.2</a> </li>
<li><a href="http://www.opencdisc.org/projects/validator/cdisc-sdtm-3.1.1-validation-rules">SDTM 3.1.1</a> </li>
<li><a href="http://www.opencdisc.org/projects/validator/cdisc-define.xml-1.0-validation-rules">Define.xml 1.0</a> </li>
<li><a href="http://www.opencdisc.org/projects/validator/cdisc-adam-1.0-validation-rules">ADaM 1.0</a> </li>
</ul>
</ul>
<p><font size="2"></font></p>
<p><font size="1">You can get the corresponding configuration files (validation rules) </font><a href="http://www.opencdisc.org/download" target="_blank"><font size="1">online</font></a><font size="1"> or in the software folder (in ..<em>opencdisc-validatorconfig </em>with extension of .xml). Since SDTM 3.1.2 has the most rich set of validation rules from Janus, WebSDM and of course additional&#160; OpenCDISC rules by itself, its configuration file (<em><a href="http://www.opencdisc.org/downloads/config/config-sdtm-3.1.2-v1.2.zip" target="_blank">config-sdtm-3.1.2.xml</a></em>) deserves more attention. Better understanding of <a href="http://www.opencdisc.org/downloads/config/config-sdtm-3.1.2-v1.2.zip" target="_blank"><em>config-sdtm-3.1.2.xml</em></a><em>&#160;</em>is the first step to customize the software according to business needs. Followings are some personal tips and tricks to play and even “torture” the file, using Notepad++, web browsers (IE and Firefox), Excel with MSXML and SAS XML Mapper. </font></p>
<h1>1. DON’T use the Windows default Notepad to open and edit the xml file</h1>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_Notepad2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="XML_Notepad" border="0" alt="XML_Notepad" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_Notepad_thumb2.png" width="453" height="275" /></a><font size="1"></font></p>
<p><font size="1">while the reason:</font></p>
<blockquote><p><font size="1">if you use Notepad to open a XML file, almost you get nothing but strings and strings.</font></p>
</blockquote>
<p><font size="1">and another supporting reason, see bellowing picture.</font></p>
<h1>2. USE <a href="http://notepad-plus-plus.org/" target="_blank">Notepad++</a> or other REAL text editors to open and edit it</h1>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_Notepad3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="XML_Notepad  " border="0" alt="XML_Notepad  " src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_Notepad_thumb3.png" width="441" height="321" /></a></p>
<p><font size="1">Notepad++ makes the difference. It supports multiple tabs view, XML syntax highlighting and XML tags match and other fancy stuff never in the plain Notepad. And like OpenCDISC, it’s free, both in sense of free beer and free speech.</font></p>
<p><font size="1">Other real text editor, include Vim, UltraEdit and such, but for most users, I still think Notepad++ is the most handy one.</font></p>
<h1>3. At first, use a web browsers to review it</h1>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_IE1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="XML_IE" border="0" alt="XML_IE" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_IE_thumb1.png" width="423" height="398" /></a></p>
<p><font size="1">It is the web view of <a href="http://www.opencdisc.org/downloads/config/config-sdtm-3.1.2-v1.2.zip" target="_blank"><em>config-sdtm-3.1.2.xml</em></a><em>. </em>The secret is a style file, <strong>define-1.0.xsl</strong> in ..opencdisc-validatorconfigschematron. This is another story of dichotomy. The <a href="http://www.opencdisc.org/downloads/config/config-sdtm-3.1.2-v1.2.zip" target="_blank"><em>config-sdtm-3.1.2.xml</em></a> file itself is only used to store metadata (machine-readable), while the style file (also a XML file) used to instruct how to display it (human-readable). Within some proper internal interface, web browsers (I tested in IE and Firefox; Google Chrome doesn’t work). Excel can also render this XML file well (only test on Excel 2010 and 2007) while </font><font size="1">Web view is much better</font><font size="1">:</font></p>
<p><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_Excel.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="XML_Excel" border="0" alt="XML_Excel" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_Excel_thumb.png" width="401" height="577" /></a></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<p><font size="1"></font></p>
<h1>4. The real awesome job: use Microsoft XML parser or other XML parsers to dig into XML structure</h1>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_Tags_Excel1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="XML_Tags_Excel" border="0" alt="XML_Tags_Excel" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_Tags_Excel_thumb1.png" width="406" height="622" /></a></p>
<p><font size="1">I use Excel 2010 with Microsoft XML parser (<a href="http://en.wikipedia.org/wiki/MSXML" target="_blank"><em>MSXML 6.0</em></a><em>. </em>You can get the version of your MSXML by visiting <a href="http://home.arcor.de/martin.honnen/xslt/processorTest.xml" target="_blank">this website</a> in IE and you will get the different results when switching to other web browsers because Firefox and Chrome use other parsers). </font></p>
<p><font size="1">You can also get a instance of each XML tag:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_Tags_Excel_preview1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="XML_Tags_Excel_preview" border="0" alt="XML_Tags_Excel_preview" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/XML_Tags_Excel_preview_thumb1.png" width="416" height="640" /></a></p>
<h1>5. The real awesome job: use SAS XML Mapper to get the tabulation view</h1>
<p><font size="1">And you may want to exact all the tables in the XML file with tabulation view, ideally, in SAS dataset:</font></p>
<p><font size="1">For example, the first few rows in <em>config-sdtm-3.1.2.xml</em>:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/ODM_xml_tab1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="ODM_xml_tab" border="0" alt="ODM_xml_tab" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/ODM_xml_tab_thumb1.png" width="399" height="148" /></a></p>
<p>and the corresponding SAS dataset:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/ODM_tab1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="ODM_tab" border="0" alt="ODM_tab" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/ODM_tab_thumb1.png" width="414" height="48" /></a></p>
<p><font size="1"></font></p>
<p><font size="1">Actually you can put all the data in XML into a big dataset but with lots of redundancies. To use SAS XML Mapper (the latest version is 9.3), you should design a mapping file to tell the structure of the XML file. For the simple ODM dataset, you indicate the table name, column name and path, type and length:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/map.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="map" border="0" alt="map" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/map_thumb.png" width="357" height="150" /></a></p>
<p><font size="1">It never be fun to play with XML files. SAS XML Mapper is supposed to read CDISC ODM based XML files automatically (OpenCDISC XML files are called ODM compliant), but at least for this config-sdtm-3.1.2.xml, it failed and that’s why we should create a mapping file (<em>see above</em>) by ourselves. Fortunately you don’t need to write it from scratch (it would be thousands of lines of codes):</font></p>
<ul>
<li><font size="1">find a CDISC ODM based XML file that SAS XML Mapper can read automatically, e.g., in <a href="http://www.cdisc.org/define-xml">http://www.cdisc.org/define-xml</a>, a file named <em>define-example1.xml</em> works well.</font> </li>
<li><font size="1">use AutoMap function in SAS XML Mapper to get the mapping file.</font> </li>
<li><font size="1">modify the mapping file to fit your needs.</font> </li>
<li><font size="1">for details, refer SAS XML mapping syntax.</font> </li>
</ul>
<h1>6. Final Notes for Excel</h1>
<p><font size="1">Right click <a href="http://www.opencdisc.org/downloads/config/config-sdtm-3.1.2-v1.2.zip" target="_blank"><em>config-sdtm-3.1.2.xml</em></a> then open with “Microsoft Excel”:</font></p>
<p><font size="1"><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/Excel11.png"><img style="background-image: none; border-right-width: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Excel1" border="0" alt="Excel1" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/Excel1_thumb1.png" width="412" height="163" /></a></font></p>
<p><font size="1">Option 2 will go to section 3. If go with option 1:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/Excel21.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="Excel2" border="0" alt="Excel2" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/02/Excel2_thumb1.png" width="320" height="181" /></a></p>
<p><font size="1">Option 1-1 and 1-2:&#160;&#160; tabulation view in section 5</font></p>
<p><font size="1">Option&#160; </font><font size="1">1-3:&#160; tag view in section 4.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/02/11/xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy New Year (Yes Again)</title>
		<link>http://www.jiangtanghu.com/blog/2012/01/24/happy-new-year-yes-again/</link>
		<comments>http://www.jiangtanghu.com/blog/2012/01/24/happy-new-year-yes-again/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 04:06:11 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=443</guid>
		<description><![CDATA[Then I feel great to reset my year of 2012 as brand new one. Today, Jan 23, is the first day of Chinese New Year, and it is Monday, the first day of work week&#8211;it is always joyful to have such coincidenceJ. HAPPY NEW YEAR! I had a big move this year. Actually I passed [...]]]></description>
				<content:encoded><![CDATA[<p>Then I feel great to reset my year of 2012 as brand new one.</p>
<p>Today, Jan 23, is the first day of <a href="http://en.wikipedia.org/wiki/Chinese_New_Year">Chinese New Year</a>, and it is Monday, the first day of work week&#8211;it is always joyful to have such coincidence<span style="font-family: Wingdings;">J</span>. HAPPY NEW YEAR!</p>
<p>I had a big move this year. Actually I passed through multiply new years of 2012: I took my flight from Beijing in Jan 1 (<span style="font-size: 7pt;"><em>happy new year!</em></span>) and landed in Raleigh, North Carolina also in the same day due to the time difference among China and US where I take a new job as a Life Sciences Consultant at <a href="http://www.d-wise.com/">d-Wise Technologies</a>. I&#8217;m not supposed to be a pure SAS programmer any more, but I don&#8217;t want to change the theme of my blog (&#8220;<a href="http://www.jiangtanghu.com/blog/"><em>Hello World by A SAS Programmer</em></a>&#8220;) since my most handy language is still SAS while my role will expose me more SAS products and solutions.</p>
<p>Chinese New Year is also called &#8220;Spring Festival&#8221; and &#8220;spring&#8221; is always the key word for the holiday:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2012/01/012412_0406_HappyNewYea11.png" alt="" width="404" height="262" /></p>
<p style="text-align: center;"><span style="font-size: 8pt;">(Chinese Characters for &#8220;the Beauty of Spring&#8221;. I wrote these years before in Beijing)<br />
</span></p>
<p>And I also want to spread my spring greetings with few sentences from Walt Whitman, <em>These I Singing in Spring</em>:</p>
<p style="margin-left: 36pt;">THESE, I, singing in spring, collect for lovers,</p>
<p style="margin-left: 36pt;">. . .</p>
<p style="margin-left: 36pt;">Collecting, I traverse the garden, the world—but soon</p>
<p style="margin-left: 36pt;">I pass the gates,</p>
<p style="margin-left: 36pt;">Now along the pond-side—now wading in a little, fearing not the wet,</p>
<p style="margin-left: 36pt;">Now by the post-and-rail fences, where the old stones</p>
<p style="margin-left: 36pt;">thrown there, pick&#8217;d from the fields, have accumulated,</p>
<p style="margin-left: 36pt;">(Wild-flowers and vines and weeds come up through</p>
<p style="margin-left: 36pt;">the stones, and partly cover them—Beyond these I pass,)</p>
<p style="margin-left: 36pt;">Far, far in the forest, before I think where I go,</p>
<p style="margin-left: 36pt;">Solitary, smelling the earthy smell, stopping now and then in the silence,</p>
<p style="margin-left: 36pt;">Alone I had thought—yet soon a troop gathers around me,</p>
<p style="margin-left: 36pt;">Some walk by my side, and some behind, and some embrace my arms or neck,</p>
<p style="margin-left: 36pt;">They, the spirits of dear friends, dead or alive—thicker</p>
<p style="margin-left: 36pt;">they come, a great crowd, and I in the middle,</p>
<p style="margin-left: 36pt;">Collecting, dispensing, singing in spring, there I wander with them,</p>
<p style="margin-left: 36pt;">Plucking something for tokens—tossing toward whoever is near me;</p>
<p style="margin-left: 36pt;">. . .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2012/01/24/happy-new-year-yes-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim as A SAS IDE</title>
		<link>http://www.jiangtanghu.com/blog/2011/11/13/vim-as-a-sas-ide/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/11/13/vim-as-a-sas-ide/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 03:11:14 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[VIM]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/11/13/vim-as-a-sas-ide/</guid>
		<description><![CDATA[Few configurations (just copy this sas.vim file to C:Program Filesvimvim73syntax if you also use gVIM 7.3 at Windows) to make Vim as a simple SAS IDE where F3: run SAS codes (in batch mode) F4: close other two windows (the current active window is Log window after F3 running; F4 jump to SAS file with [...]]]></description>
				<content:encoded><![CDATA[<p>Few configurations (just copy this <a href="http://jiangtanghu.com/docs/en/sas.vim" target="_blank"><em>sas.vim</em></a> file to <em>C:Program Filesvimvim73syntax</em> if you also use <a href="ftp://ftp.vim.org/pub/vim/pc/gvim73_46.ex" target="_blank">gVIM 7.3</a> at Windows) to make Vim as a simple <a href="http://www.jiangtanghu.com/blog/2011/11/05/get-start-with-wps-and-call-for-an-elegant-sas-ide/" target="_blank">SAS IDE</a> where</p>
<blockquote><p>F3: run SAS codes (in batch mode)<br />
F4: close other two windows (the current active window is Log window after F3 running; F4 jump to SAS file with full window)</p>
<p>F5: jump to SAS file<br />
F6: jump to Log file<br />
F7: jump to lst file (list output)<br />
F8: keep only the current window (full window)</p></blockquote>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto;" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/11/VIM_SAS.png" alt="" /></p>
<p>****************</p>
<p>Details and Credits</p>
<p>1. The first post on Vim and SAS I read is by <a href="http://www.blog496.org/2011-7-17-win-use-vim-as-sas-r-editor.html" target="_blank">Xiaowei Wang</a> in Chinese.</p>
<p>The original SAS syntax file took from <a href="http://www.vim.org/scripts/script.php?script_id=3522" target="_blank">Zhenhuan Hu</a>.</p>
<p><a href="http://www-personal.umich.edu/~knassen/vim/sasfns.html" target="_blank">Kent Nassen</a> also maintains some Vim functions to run SAS codes and check log.</p>
<p>2. To run SAS codes using F3:</p>
<blockquote><p><span style="font-family: 'Courier New';">map &lt;F3&gt; :w&lt;CR&gt;:!SAS % -CONFIG &#8220;<span style="color: #ff0000;">C:Program FilesSASSASFoundation9.2nlsenSASV9.CFG</span>&#8220;&lt;CR&gt;:sp  %&lt;.lst&lt;CR&gt;:sp  %&lt;.log&lt;CR&gt;</span></p></blockquote>
<p>3. Close other windows using F4:</p>
<blockquote><p><span style="font-family: 'Courier New';">map &lt;F4&gt; :close&lt;CR&gt;:close&lt;CR&gt;</span></p></blockquote>
<p>4. Keep only current window using F8:</p>
<blockquote><p><span style="font-family: 'Courier New';">map &lt;F8&gt; : only&lt;CR&gt;</span></p></blockquote>
<p>5. Jump to SAS file using F5:</p>
<blockquote><p><span style="font-family: 'Courier New';">map &lt;F5&gt; :e %&lt;.sas&lt;CR&gt;</span></p></blockquote>
<p>6. Jump to Log file using F6:</p>
<blockquote><p><span style="font-family: 'Courier New';">map &lt;F6&gt; :e %&lt;.log&lt;CR&gt;</span></p></blockquote>
<p>7. Jump to Lst file using F7:</p>
<blockquote><p><span style="font-family: 'Courier New';">map &lt;F7&gt; :e %&lt;.lst&lt;CR&gt;</span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/11/13/vim-as-a-sas-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Collection of SAS Macro Repositories</title>
		<link>http://www.jiangtanghu.com/blog/2011/11/08/my-collection-of-sas-macro-repositories/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/11/08/my-collection-of-sas-macro-repositories/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 13:41:54 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Macro]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/11/08/my-collection-of-sas-macro-repositories/</guid>
		<description><![CDATA[Then I just find that the most effective and safest way to synchronize bookmarks across machines is making them Google searchable, i.e, putting them online. Followings are my personal collections of SAS macro Repositories (I will keep it update according to new sites reached and your inputs). Most of them are rich, well documented and [...]]]></description>
				<content:encoded><![CDATA[<p>Then I just find that the most effective and safest way to synchronize bookmarks across machines is making them Google searchable, i.e, putting them online.</p>
<p>Followings are my personal collections of SAS macro Repositories (I will keep it update according to new sites reached and your inputs). Most of them are rich, well documented and friendly for navigation and review: </p>
<p>/***General***/</p>
<p><strong><font color="#ff0000">1. SAS Macros by </font><a href="http://www.devenezia.com/" target="_blank"><font color="#ff0000">Richard DeVenezia</font></a></strong><strong></strong></p>
<p> <a href="http://www.devenezia.com/downloads/sas/macros/index.php">http://www.devenezia.com/downloads/sas/macros/index.php</a>   <br /> 
<p>Richard is a very active contributor in SAS-L. He also plays with Java, Perl, PHP and JavaScript and you can find all these codes in his homepage. Besides the well organized macros, there are some interesting utilities:</p>
<p><a href="http://www.devenezia.com/downloads/sas/samples/">http://www.devenezia.com/downloads/sas/samples/</a></p>
<p><strong><font color="#ff0000">2. </font></strong><a href="http://www.datasavantconsulting.com/roland/" target="_blank"><strong><font color="#ff0000">Roland</font></strong></a><strong><font color="#ff0000">&#8216;s SAS Macros</font></strong></p>
<p><a href="http://www.datasavantconsulting.com/roland/Spectre/maclist2.html">http://www.datasavantconsulting.com/roland/Spectre/maclist2.html</a></p>
<p>Roland, a proficient SAS programmer from Europe, also supply two SAS applications:</p>
<p><strong>Spectre</strong> &#8211; a Practical and Educational Clinical Trials Reporting Engine     <br /><a href="http://www.datasavantconsulting.com/roland/Spectre/index.html">http://www.datasavantconsulting.com/roland/Spectre/index.html</a></p>
<p><strong>RGPP</strong> -Graphical Patient Profiler     <br /><a href="http://www.datasavantconsulting.com/roland/RGPP/rgpp.html">http://www.datasavantconsulting.com/roland/RGPP/rgpp.html</a></p>
<p>And some tips:    <br /><a href="http://www.datasavantconsulting.com/roland/sastips.html">http://www.datasavantconsulting.com/roland/sastips.html</a></p>
<p><strong><font color="#ff0000">3. </font></strong><a href="http://www.cswenson.com/" target="_blank"><strong><font color="#ff0000">Chris</font></strong></a><strong><font color="#ff0000">&#8216;s SAS Macros</font></strong></p>
<p><a href="http://sas.cswenson.com/downloads/macros">http://sas.cswenson.com/downloads/macros</a></p>
<p>I just found Chris’ site weeks before and Chris is a pretty cool programmer: in one of his <a href="http://sas.cswenson.com/downloads/fun-macros" target="_blank">fun macros</a>, an error message will be such kind of form:</p>
<blockquote><p>ERROR: MWA HA HA! You fool! You are cursed with leprosy!</p>
</blockquote>
<p><strong><font color="#ff0000">4. </font></strong><a href="http://www.sconsig.com/" target="_blank"><strong><font color="#ff0000">sconsig</font></strong></a><strong><font color="#ff0000"> SAS Coding Tips and Techniques</font></strong>&#160; </p>
<p><a href="http://www.sconsig.com/sastip.htm">http://www.sconsig.com/sastip.htm</a></p>
<p>rich while badly for navigating and review </p>
<p><font color="#ff0000">5. Arnold Schick&#8217;s macros</font></p>
<p><a href="http://schick.tripod.com/macros.html">http://schick.tripod.com/macros.html</a></p>
<p>also some macros collected from SAS-L : </p>
<p><a href="http://schick.tripod.com/p-index.html">http://schick.tripod.com/p-index.html</a></p>
<p><font color="#ff0000">6. Rodney A. Sparapani ‘s Macro</font></p>
<p><a href="http://www.mcw.edu/PCOR/Education/SASMacros.htm">http://www.mcw.edu/PCOR/Education/SASMacros.htm</a></p>
<p>Rodney is best known for his contribution to <a href="http://ess.r-project.org/Manual/ess.html" target="_blank">SAS support in ESS</a> (Emacs Speaks Statistics) as a cool programmer and <a href="http://www.mrc-bsu.cam.ac.uk/bugs/welcome.shtml" target="_blank">WinBugs</a> and Bayesian then he works as a statistician.</p>
<p>Rodney’s site also contains lots of statistical stuff.</p>
<p>/***Statistics***/</p>
<p><font color="#ff0000">1. Mayo Clinic Locally Written SAS Macros</font>     <br /><a href="http://cancercenter.mayo.edu/mayo/research/biostat/sasmacros.cfm">http://cancercenter.mayo.edu/mayo/research/biostat/sasmacros.cfm</a></p>
<p>or in </p>
<p><a href="http://mayoresearch.mayo.edu/biostat/sasmacros.cfm">http://mayoresearch.mayo.edu/biostat/sasmacros.cfm</a></p>
<p><font color="#ff0000">2. Paul D. Allison</font>     <br /><a href="http://www.ssc.upenn.edu/~allison/#Macros">http://www.ssc.upenn.edu/~allison/#Macros</a>     <br />new site: <a href="http://www.pauldallison.com/Download3.html">http://www.pauldallison.com/Download3.html</a></p>
<p>Paul is a prolific writer with books <a href="http://www.amazon.com/Paul-D.-Allison/e/B001H6KWN6/ref=sr_ntt_srch_lnk_1?qid=1320758969&amp;sr=8-1" target="_blank">on SAS and statistics</a>.</p>
<p><font color="#ff0000">3. MCHP SAS Macros</font> </p>
<p><a href="http://mchp-appserv.cpe.umanitoba.ca/viewConcept.php?conceptID=1048">http://mchp-appserv.cpe.umanitoba.ca/viewConcept.php?conceptID=1048</a></p>
<p><font color="#ff0000">4. Ralph O&#8217;Brien ,UnifyPow: A SAS Module for Sample-Size Analysis</font>     <br /><a href="http://www.bio.ri.ccf.org/Power/">http://www.bio.ri.ccf.org/Power/</a> </p>
<p><font color="#ff0000">5. Usual Dietary Intakes: SAS Macros for the NCI Method</font>     <br /><a href="http://riskfactor.cancer.gov/diet/usualintakes/macros.html">http://riskfactor.cancer.gov/diet/usualintakes/macros.html</a></p>
<p><font color="#ff0000">6. Clinician&#8217;s corner: SAS macros</font>     <br /><a href="http://www.medicine.mcgill.ca/epidemiology/Joseph/PBelisle/sas-macros.html">http://www.medicine.mcgill.ca/epidemiology/Joseph/PBelisle/sas-macros.html</a></p>
<p>/***Graph***/</p>
<p><font color="#ff0000">1. Robert Allison&#8217;s SAS/Graph Examples!</font>     <br /><a href="http://robslink.com/SAS/Home.htm">http://robslink.com/SAS/Home.htm</a></p>
<p>My first stop for SAS graphics.</p>
<p><font color="#ff0000">2. SAS Graphic Programs and Macros by Michael Friendly</font>     <br /><a href="http://www.datavis.ca/sasmac/">http://www.datavis.ca/sasmac/</a></p>
<p>more popular in academia.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/11/08/my-collection-of-sas-macro-repositories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Start with WPS, and Call for an Elegant SAS IDE!</title>
		<link>http://www.jiangtanghu.com/blog/2011/11/05/get-start-with-wps-and-call-for-an-elegant-sas-ide/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/11/05/get-start-with-wps-and-call-for-an-elegant-sas-ide/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 13:50:42 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[VIM]]></category>
		<category><![CDATA[WPS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/11/05/get-start-with-wps-and-call-for-an-elegant-sas-ide/</guid>
		<description><![CDATA[I got a trial version of WPS (the latest version 2.5.2.0 at Windows), which engine can interpret “some of the language of SAS”. I took piece of codes for testing and some passed while some popped up with errors (so currently it is only a limited version of SAS). I don’t drive into the deep [...]]]></description>
				<content:encoded><![CDATA[<p>I got a trial version of <a href="http://www.teamwpc.co.uk/products/wps" target="_blank">WPS</a> (the latest version 2.5.2.0 at Windows), which engine can interpret “some of the language of SAS”. I took piece of codes for testing and some passed while some popped up with errors (so currently it is only a limited version of SAS). I don’t drive into the deep part yet of what WPS can do and can’t do, but I do love the WPS way to organize projects, folders and files (including souse files):</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/11/WPS_SAS.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="WPS_SAS" border="0" alt="WPS_SAS" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/11/WPS_SAS_thumb.png" width="507" height="380" /></a></p>
<p>WPS uses a lite version of <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> as GUI(WPS Workbench; the “lite” means WPS Workbench can’t be extensible as the original Eclipse but really with shorter response time). Besides its Project Explore for folders and files management(left panel), I also love its Outline in right panel to show the SAS programming elements and errors information in log window: </p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/11/WPS_LOG.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="WPS_LOG" border="0" alt="WPS_LOG" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/11/WPS_LOG_thumb.png" width="502" height="381" /></a> </p>
<p>Then I’d like to switch to SAS itself. Frankly speaking, at least in IDE part, WPS looks pretty better than the current corresponding SAS:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/11/SAS_GUI.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="SAS_GUI" border="0" alt="SAS_GUI" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/11/SAS_GUI_thumb.png" width="495" height="406" /></a></p>
<p>Of course I hold the principle of “substance over form”, but if available, the form itself also make people comfortable and enjoyable (for example, the Apple products…). As far as I know, the new version of SAS DI Studio and Enterprise Miner both have pretty much improvement in GUI from ergonomic point of view. Even for code editor, Enterprise Guide Editor&#160; is now more superior than so called SAS Enhanced Editor. But as a SAS programmer (not only the SAS user), I may spend all my day in the Base SAS window! </p>
<p>I also spent some time to configure VIM as a relative simple SAS IDE as a temporally replacement (F3 to run, F5 to jump to program window, F6 to log window, F7 to output window just as the same as in SAS IDE):</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/11/VIM_SAS.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="VIM_SAS" border="0" alt="VIM_SAS" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/11/VIM_SAS_thumb.png" width="488" height="575" /></a> It’s simple but always can do the job as SAS itself while looks really cool to comfort myself as a programmer. So, what’s going on in the next release? Still wait.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/11/05/get-start-with-wps-and-call-for-an-elegant-sas-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello Python</title>
		<link>http://www.jiangtanghu.com/blog/2011/10/31/hello-python/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/10/31/hello-python/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 12:29:43 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/10/31/hello-python/</guid>
		<description><![CDATA[Inspired by Jian’s polyglot programming practice, I also begin to brush up Python and C++ which I learned during graduate school. Following is a Python response to one of Jian Dai’s former programming challenges for lines count of source codes: [cce lang="python"] import os #count number of lines of #single file def lineCount(fileName): countSingle=0 for [...]]]></description>
				<content:encoded><![CDATA[<p>Inspired by <a href="http://www.jiangtanghu.com/blog/2011/08/15/sas-bloggers-in-action-2-jian-dai-and-his-sas-academy/" target="_blank">Jian’s polyglot programming practice</a>, I also begin to brush up Python and C++ which I learned during graduate school. Following is a Python response to one of <a href="http://tech.groups.yahoo.com/group/sas_academy/" target="_blank">Jian Dai</a>’s former programming challenges for <a href="http://blog.clinovo.com/megha-becomes-the-third-time-winner-june-programming-challenge-now-is-finished/" target="_blank">lines count of source codes</a>:<br />
[cce lang="python"]<br />
import os</p>
<p>#count number of lines of<br />
#single file<br />
def lineCount(fileName):<br />
	countSingle=0<br />
	for line in open(fileName):<br />
		countSingle += 1<br />
	return countSingle</p>
<p>#count number of lines of<br />
#directory and subdirectories<br />
def dirCount(dir,extension):<br />
	countTotal=0<br />
	for r,d,f in os.walk(dir):<br />
		for files in f:<br />
			if files.endswith(extension):<br />
				fileName=os.path.join(r,files)<br />
				countSingle=lineCount(fileName)<br />
				countTotal += countSingle<br />
	return countTotal</p>
<p>a=dirCount(&#8220;C:/Program Files/CDISC Express/&#8221;,&#8221;.sas&#8221;)</p>
<p>print  a<br />
[/cc]</p>
<p>I use <a href="http://www.jiangtanghu.com/docs/en/readME_IDE.txt" target="_blank">python-2.7.2</a>, the final Python 2.x release most because of the various modules support for learning purpose. The book helps me to get the quick review of Python is <em><a href="http://greenteapress.com/thinkpython/thinkpython.html" target="_blank">Think Python: How to Think Like a Computer Scientist</a></em> by Allen Downey.</p>
<p>Also, I begin to use <a href="http://kpumuk.info/projects/wordpress-plugins/codecolorer/" target="_blank">CodeColorer</a> for this blog to insert codes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/10/31/hello-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Online Latin to English Translator via SAS</title>
		<link>http://www.jiangtanghu.com/blog/2011/10/08/an-online-latin-to-english-translator-via-sas/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/10/08/an-online-latin-to-english-translator-via-sas/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 13:47:59 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Latin]]></category>
		<category><![CDATA[Translate]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/10/08/an-online-latin-to-english-translator-via-sas/</guid>
		<description><![CDATA[Last month I submitted piece of SAS codes for a monthly programming challenge hosted by Jian Dai to translate the Latin motto of Hogwarts School in Harry Potter into English: draco dormiens nunquam titillandus You can get the meaning using Google search of course—but not in Google Translator (Google Translator can’t recognize all of such [...]]]></description>
				<content:encoded><![CDATA[<p>Last month I submitted piece of SAS codes for a monthly programming challenge hosted by <a href="http://www.jiangtanghu.com/blog/2011/08/15/sas-bloggers-in-action-2-jian-dai-and-his-sas-academy/" target="_blank">Jian Dai</a> to <a href="http://blog.clinovo.com/programming-challenge-6-motto-of-hogwarts-school/" target="_blank">translate the Latin motto of Hogwarts School in Harry Potter</a> into English<em></em>:</p>
<blockquote><p><em>draco dormiens nunquam titillandus</em></p></blockquote>
<p>You can get the meaning using Google search of course—but not in Google Translator (Google Translator can’t recognize all of such Latin words!). Jian posted a concise <a href="http://blog.clinovo.com/october-programming-challenge-ranking-american-heroes/" target="_blank">Perl way to parse webs</a> which contain this Latin phrase and key words “mean”,  “means” and such and you can always find <a href="http://www.ehow.com/about_6530758_meaning-__draco-dormiens___.html" target="_blank">page</a> like</p>
<blockquote><p>&#8220;draco dormiens nunquam titillandus,&#8221; which means &#8220;never tickle a sleeping dragon.&#8221;</p></blockquote>
<p>My <a href="http://jiangtanghu.com/docs/en/Latin2Eng.sas" target="_blank">SAS approach</a> can’t return a human readable sentence like this one but a 100% word to word machine translation and you can use it to translate any Latin sentence which happens not appear in any singe web page. The usage is also very simple:</p>
<blockquote><p>filename L2E url &#8216;<a href="http://jiangtanghu.com/docs/en/Latin2Eng.sas">http://jiangtanghu.com/docs/en/Latin2Eng.sas&#8217;;</a><br />
%include L2E;</p>
<p>%Latin2Eng(<span style="color: #ff0000;">draco dormiens nunquam titillandus</span>)</p></blockquote>
<p>and you get:</p>
<p align="left"><span style="font-size: xx-small;"><strong>Obs   draco         dormiens                               nunquam                         titillandus</strong> </span></p>
<p align="left"><span style="font-size: xx-small;">1    dragon    sleep, rest                 at no time, never            tickle, titillate, provoke<br />
2     snake     be/fall asleep          not in any circumstances     stimulate sensually<br />
3                   behave as if asleep<br />
4                   be idle, do nothing</span></p>
<p align="left">and also (2*4*2*2=) 32 Cartesian combinations to feel the meaning if needed.</p>
<p align="left">Then you can also test the words by Julius Caesar:</p>
<blockquote>
<p align="left">%Latin2Eng(<span style="color: #ff0000;">Veni Vidi Vici</span>)</p>
</blockquote>
<p>and get:</p>
<p><strong>Obs   Veni       Vidi                                                                     Vici</strong></p>
<p>1     come    see, look at                                                     conquer, defeat, excel<br />
2                 consider                                                           outlast<br />
3                (PASS) seem, seem good, appear, be seen      succeed</p>
<p>This SAS translator is based on <a href="http://users.erols.com/whitaker/words.htm " target="_blank">WORDS (version 1.97FC) by William Whitaker</a> and the codes still needs some modifications when any unexpected special symbols popped up in the translating page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/10/08/an-online-latin-to-english-translator-via-sas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Map and Reduce in MapReduce: a SAS Illustration</title>
		<link>http://www.jiangtanghu.com/blog/2011/10/04/map-and-reduce-in-mapreduce-a-sas-illustration/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/10/04/map-and-reduce-in-mapreduce-a-sas-illustration/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 13:31:18 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[data mining]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Hadoop]]></category>
		<category><![CDATA[Lisp]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[MapReduce]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/10/04/map-and-reduce-in-mapreduce-a-sas-illustration/</guid>
		<description><![CDATA[In last post, I mentioned Hadoop, the open source implementation of Google’s MapReduce for parallelized processing of big data. In this long National Holiday, I read the original Google paper, MapReduce: Simplified Data Processing on Large Clusters by Jeffrey Dean and Sanjay Ghemawat and got that the terminologies of “map” and “reduce” were basically borrowed [...]]]></description>
				<content:encoded><![CDATA[<p>In <a href="http://www.jiangtanghu.com/blog/2011/09/14/analytical-valley/" target="_blank">last post</a>, I mentioned <a href="http://hadoop.apache.org/">Hadoop</a>, the open source implementation of Google’s <a href="http://en.wikipedia.org/wiki/Mapreduce" target="_blank">MapReduce</a> for parallelized processing of big data. In this long National Holiday, I read the original Google paper, <em><a href="http://static.googleusercontent.com/external_content/untrusted_dlcp/labs.google.com/en//papers/mapreduce-osdi04.pdf" target="_blank">MapReduce: Simplified Data Processing on Large Clusters</a></em> by Jeffrey Dean and Sanjay Ghemawat and got that the terminologies of “map” and “reduce” were basically borrowed from Lisp, an old functional language that I even didn’t play “hello world” with. For Python users, the idea of Map and Reduce is also very straightforward because the workhorse data structure in Python is just the list, a sequence of values that you can just imagine that they are the nodes(clusters, chunk servers, …) in a distributed system. </p>
<p>MapReduce is a programming framework and really language independent, so SAS users can also get the basic idea from their daily programming practices and here is just a simple illustration using data step array (not array in Proc FCMP or matrix in IML). Data step array in SAS is fundamentally not a data structure but a convenient way of processing group of variables, but it can also be used to play some list operations like in Python and other rich data structure supporting languages(an editable version can be founded in <a href="http://jiangtanghu.com/docs/en/MapReduce.sas" target="_blank">here</a>):</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/10/MapReduce.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="MapReduce" border="0" alt="MapReduce" align="left" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/10/MapReduce_thumb.png" width="506" height="535" /></a></p>
<p>Follow code above, the programming task is to capitalize a string “Hadoop” (Line 2) and the “master” method is just to capitalize the string in buddle(Line 8): just use a master machine to processing the data.</p>
<p>Then we introduce the idea of “big data” that the string is too huge to one master machine, so “master method” failed. Now we distribute the task to thousands of low cost machines (workers, slaves, chunk servers,. . . in this case, the one dimensional array with size of 6, see Line 11), each machine produces parts of the job (each array element only capitalizes a single letter in sequence, see Line 12-14). Such distributing operation is called “<font color="#ff0000">map</font>”. In a MapReduce system, a master machine is also needed to assign the maps and reduce.</p>
<p>How about “<font color="#ff0000">reduce</font>”?&#160; A “reduce” operation is also called “fold”—for example, in Line 17, the operation to combine all the separately values into a single value: combine results from multiple worker machines.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/10/04/map-and-reduce-in-mapreduce-a-sas-illustration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An Analytical Valley: Big Data and Data Scientists (and SAS Programmers)</title>
		<link>http://www.jiangtanghu.com/blog/2011/09/14/analytical-valley/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/09/14/analytical-valley/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 14:15:17 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Big Data]]></category>
		<category><![CDATA[data mining]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/09/14/analytical-valley/</guid>
		<description><![CDATA[Tom Davenport reported an observation that Silicon Valley is becoming more analytical since companies in the Valley such as Google, Facebook, eBay, LinkedLn all have strong presences in analytics. Besides such predominant companies, I’d also like to add Yahoo to the list although Yahoo is no longer in its peak. Yahoo is the largest sponsor [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/09/hadoop.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="hadoop" border="0" alt="hadoop" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/09/hadoop_thumb.jpg" width="240" height="180" /></a></p>
<p><a href="http://blogs.sas.com/content/sascom/author/tomdavenport" target="_blank">Tom Davenport</a> reported an observation that <a href="http://blogs.sas.com/content/sascom/2011/09/13/is-silicone-valley-becoming-more-analytical/" target="_blank">Silicon Valley is becoming more analytical</a> since companies in the Valley such as Google, Facebook, eBay, LinkedLn all have strong presences in analytics. Besides such predominant companies, I’d also like to add Yahoo to the list although Yahoo is no longer in its peak. Yahoo is the largest sponsor and contributor of <a href="http://hadoop.apache.org/" target="_blank">Hadoop</a>, an open source framework for distributed processing of so called “big data”. When taking a look at the outstanding <a href="www.facebook.com/data" target="_blank">Facebook data team</a> or <a href="http://sna-projects.com/sna/" target="_blank">LinkedIn data team</a>, we can see that Hadoop is also one of the most overwhelmingly successful technical factors. Such Valley companies themselves are the huge consumers of big data and have strong incentives to develop analytical solutions beyond their high technology product pipelines.</p>
<p>Analytical staffs in LinkedLn also helps a lot to promote the widely usage of the term “data scientist”. They identify themselves as data scientists and that’s really cool. Now more and more statisticians are also very glad to accept this brand new title. According to a <a href="http://blog.revolutionanalytics.com/2011/08/statisticians-at-jsm-consider-themselves-data-scientists.html" target="_blank">survey in JSM</a> (2011, Miami), more than 85% (164) statisticians there considered themselves “data scientists”. </p>
<p>McKinsey also released a report this May <a href="http://www.mckinsey.com/mgi/publications/big_data/pdfs/MGI_big_data_full_report.pdf" target="_blank">on big data</a> and the huge gap of qualified analytical talents. You know when a management consulting firm begins to talk something technical, it is no longer a fashion to follow the discussion of the concept. To embrace the challenge of big data, one or the team needs multidiscipline background—basically speaking, computer science and statistics (and data mining or machine learning is just an interdisciplinary subject of them). Here is an ambitious list on “How do I become a data scientist”:</p>
<blockquote><p><a href="http://www.quora.com/Educational-Resources/How-do-I-become-a-data-scientist">http://www.quora.com/Educational-Resources/How-do-I-become-a-data-scientist</a></p>
</blockquote>
<p>For these learning plans, just feel the meaning and don’t take it too seriously. Check yourself and set up your own priority. </p>
<h3>Notes for SAS Programmers</h3>
<p>For SAS programmers, I read an exciting post besides High Performance Computing that <a href="http://blogs.sas.com/content/datamanagement/2011/08/29/sas-hadoop-and-big-data" target="_blank">SAS will also play with Hadoop</a> by introducing some functionality in SAS/Access and SAS Data Integration Studio.</p>
<p>For SAS programmers with no IT background, it is not a good idea to jump into algorithms and data structures and other hard core computer courses immediately. Instead I recommend to take the full advantages of SAS language and system itself to dive into computer world gradually:</p>
<blockquote><p>1. Learn and practice and practice <a href="http://support.sas.com/documentation/cdl/en/sqlproc/63043/HTML/default/viewer.htm#titlepage.htm" target="_blank">SAS Proc SQL</a> which is compliant with the <a href="http://en.wikipedia.org/wiki/SQL-92">SQL-92</a> standard. SQL is the common language in database world and SAS Proc SQL can help you switch smoothly to Oracle SQL, Teradata SQL, MySql SQL and other SQL implementations although there are some non-critical <a href="http://www.jiangtanghu.com/blog/2009/12/04/work-with-oracle-a-quick-sheet-for-sas-programmers-2/" target="_blank">differences</a> in details.</p>
<p>2. Dig into the operating system specific documentation of SAS, for example in SAS 9.3,&#160; <em><a href="http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#titlepage.htm" target="_blank">SAS 9.3 Companion for Windows</a></em> or <em><a href="http://support.sas.com/documentation/cdl/en/hostunx/63053/HTML/default/viewer.htm#titlepage.htm" target="_blank">SAS 9.3 Companion for UNIX Environments</a></em> or others depending the OS you are working on. They are the critical important documentations but unfortunately often missed in SAS programmers’&#160; reading list. </p>
<p>Such docs will help SAS programmers to deal with the machines and expose to the wide computer world in a way that a SAS programmer can understand. You can’t expect to be an expert on computer via such docs, but at least you can communicate fluently with internal IT staff. </p>
<p>3. Then you get all the confidences to play with computer and can switch to any other topics interested in <a href="http://www.quora.com/Educational-Resources/How-do-I-become-a-data-scientist" target="_blank">the list above</a>!</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/09/14/analytical-valley/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fours Errors in SAS 9.2 Fisher&#8217;s Iris Data in SASHELP Library</title>
		<link>http://www.jiangtanghu.com/blog/2011/09/03/fours-errors-in-sas-9-2-fishers-iris-data-in-sashelp-library/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/09/03/fours-errors-in-sas-9-2-fishers-iris-data-in-sashelp-library/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 13:13:42 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Fisher]]></category>
		<category><![CDATA[Iris]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/09/03/fours-errors-in-sas-9-2-fishers-iris-data-in-sashelp-library/</guid>
		<description><![CDATA[In the previous post, I just mentioned that Fisher&#8217;s Iris Data is embedded officially in SASHELP library in SAS 9.2. Note that even in SAS 9.1.3, you can also find this data with several instances from some demos in user guide (just search &#34;Iris&#34; in &#34;SAS Help and Documentation&#34; accompany with you SAS product), for [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/09/iris.gif"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="iris" border="0" alt="iris" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/09/iris_thumb.gif" width="240" height="237" /></a></p>
<p>In the <a href="http://www.jiangtanghu.com/blog/2011/08/31/who-is-alfred/" target="_blank">previous post</a>, I just mentioned that <a href="http://en.wikipedia.org/wiki/Iris_flower_data_set" target="_blank">Fisher&#8217;s Iris Data</a> is embedded officially in SASHELP library in SAS 9.2. Note that even in SAS 9.1.3, you can also find this data with several instances from some demos in user guide (just search &quot;Iris&quot; in &quot;SAS Help and Documentation&quot; accompany with you SAS product), for example, in <a href="http://support.sas.com/onlinedoc/913/getDoc/en/imlug.hlp/graphstart_sect13.htm" target="_blank">SAS 9.1.3 IML</a>.</p>
<p>Iris dataset is so important and popular that researchers round the world use it as benchmark to test and compare their algorithms and also as pedagogical purpose. It is also the overwhelming No. 1 dataset considering popularity in <a href="http://archive.ics.uci.edu/ml/" target="_blank">UCI Machine Learning Repository</a>. Here 4 errors in SASHELP.iris listed for your consideration if interested and if you find some slightly differences in outputs following some demos out of SAS using this data:</p>
<blockquote><p>Error 1: Line 35, the PetalWidth of Setosa should be 2 mm, not 1 mm;</p>
<p>Error 2: Line 38, the SepalWidth of Setosa should be 36 mm, not 31 mm;</p>
<p>Error 3: Line 38, the PetalLength of Setosa should be 14 mm, not 15 mm;</p>
<p>Error 4: Line 119, the PetalLength of Virginica should be 69 mm, not 70 mm.</p>
</blockquote>
<p>For errors 1-3, there is also an interesting story in statistical literature. In 1936, Fisher the Great published his famous paper, <em><a href="http://rcs.chph.ras.ru/Tutorials/classification/Fisher.pdf" target="_blank">The use of multiple measurements in taxonomic problems</a></em> and the Iris data also attached (called <font color="#ff0000">Fisher Version</font> in this post). In the following years (until today), people <a href="http://archive.ics.uci.edu/ml/datasets/Iris" target="_blank">cited</a> this paper and the Iris data Fisher Version is also replicated and distributed worldwide and then a version with above errors 1-3 might gain a very dominant popularity (I don’t know the source of there errors). In UCI Machine Learning Repository, the dataset <a href="http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data" target="_blank">iris.data</a> is the one with such 3 errors (called <font color="#ff0000">UCI Version</font> as well).</p>
<p>We could see that the duplicated UCI Version is even more popular in some extension than its original Fisher Version (SASHELP.iris also seems to be copied from UCI Version). Story goes on. In 1998, James Bezdek and other scholars just found the three discrepancies between Iris Fisher Version and UCI Version (and in some published papers using the same version of data). You can read it in <em><a href="http://pages.bangor.ac.uk/~mas00a/papers/jbjkrklknptfs99.pdf" target="_blank">Will the Real Iris Data Please Stand Up?</a></em> </p>
<p>Bezdek then proposed to use the original Fisher Version of Iris, and UCI Machine Learning Repository also <a href="http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.names" target="_blank">documented these three errors</a> and added new dataset called <a href="http://archive.ics.uci.edu/ml/machine-learning-databases/iris/bezdekIris.data" target="_blank">bezdekIris.data</a> (<font color="#ff0000">Bezdek Version</font>) which is exactly Fisher Version (iris.data kept and I think it is because now the so called error version is also valuable).</p>
<p>Return to error 4 and I can’t figure out why and I might as well call it Iris <font color="#ff0000">SAS Version</font>. Note that the unit in SAS Version is millimeter (mm), while others version all use centimeter (cm). </p>
<p>The interesting part is that I also check the <a href="http://support.sas.com/onlinedoc/913/getDoc/en/imlug.hlp/graphstart_sect13.htm" target="_blank">Iris data in SAS 9.1.3 IML</a> mentioned before and not surprising, it is exactly the Fisher Version (you can also find a right one in a demo from <a href="http://support.sas.com/documentation/cdl/en/imlsug/62558/HTML/default/viewer.htm#ugappdatasets_sect11.htm" target="_blank">SAS 9.2 IML Studio 3.2</a>).</p>
<p>The following codes generate several Iris versions:</p>
<blockquote><p>iris_uci: <font color="#ff0000">UCI Version</font> with both CM and MM as unit</p>
<p>bezdekiris_uci: <font color="#ff0000">Bezdek Version</font> or <font color="#ff0000">Fisher Version</font> with both CM and MM as unit</p>
<p>iris_mm: <font color="#ff0000">UCI Version</font> with MM as unit and attributes alike SASHELP.iris, <font color="#ff0000">SAS Version</font></p>
<p>bezdekiris_mm: <font color="#ff0000">Bezdek Version</font> or <font color="#ff0000">Fisher Version</font> with MM as unit and attributes alike SASHELP.iris, <font color="#ff0000">SAS Version</font></p>
</blockquote>
<p> <span id="more-375"></span><br />
<blockquote>
<p><font face="Courier New">filename iris URL &quot;</font><a href="http://archive.ics.uci.edu/ml/machine-learning-databases/iris/&quot;;"><font face="Courier New">http://archive.ics.uci.edu/ml/machine-learning-databases/iris/&quot;;</font></a></p>
<p><font face="Courier New">%macro getIris(input);       <br />data &amp;input._uci;        <br />&#160;&#160;&#160; length _Species $15.;        <br />&#160;&#160;&#160; length&#160; Species $10.;        <br />&#160;&#160;&#160; infile iris(&amp;input..data) dlm=&#8217;,';        <br />&#160;&#160;&#160; input _SepalLength _SepalWidth _PetalLength _PetalWidth _Species $; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; Species=propcase(scan(_Species,2)); </font></p>
<p><font face="Courier New">&#160;&#160;&#160; array iris {*}&#160; _SepalLength _SepalWidth _PetalLength _PetalWidth;       <br />&#160;&#160;&#160; array iris_mm{4} SepalLength&#160; SepalWidth&#160; PetalLength&#160; PetalWidth; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; do i=1 to dim(iris);       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; iris_mm{i}=iris{i}*10;        <br />&#160;&#160;&#160; end; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; drop i; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; label&#160;&#160; _sepallength=&#8217;Sepal Length (cm)&#8217;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; _sepalwidth =&#8217;Sepal Width (cm)&#8217;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; _petallength=&#8217;Petal Length (cm)&#8217;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; _petalwidth =&#8217;Petal Width (cm)&#8217;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; _Species =&#8217;Iris Species&#8217;; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; label&#160;&#160; sepallength=&#8217;Sepal Length (mm)&#8217;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sepalwidth =&#8217;Sepal Width (mm)&#8217;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; petallength=&#8217;Petal Length (mm)&#8217;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; petalwidth =&#8217;Petal Width (mm)&#8217;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Species =&#8217;Iris Species&#8217;;        <br />run; </font></p>
<p><font face="Courier New">data &amp;input._mm (label=&quot;Fisher&#8217;s Iris Data (1936)&quot;);       <br />&#160;&#160;&#160; set &amp;input._uci;        <br />&#160;&#160;&#160; drop _:;        <br />run; </font></p>
<p><font face="Courier New">%mend getIris; </font></p>
<p><font face="Courier New">%getIris(iris)       <br />%getIris(bezdekIris)</font></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/09/03/fours-errors-in-sas-9-2-fishers-iris-data-in-sashelp-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who is Alfred?</title>
		<link>http://www.jiangtanghu.com/blog/2011/08/31/who-is-alfred/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/08/31/who-is-alfred/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 14:18:09 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[Iris]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/08/31/who-is-alfred/</guid>
		<description><![CDATA[Tell me something about Alfred, male or female? age? height and weight? Oracle database (version 9 and below) had a well known default demo account SCOTT with a password, TIGER (and TIGER was the name of the real person Bruce Scott ’s cat, see) and in this account, there are some tables named DEPT, EMP, [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p>Tell me something about Alfred, male or female? age? height and weight? </p>
</blockquote>
<p>Oracle database (version 9 and below) had a well known default demo account SCOTT with a password, TIGER (and TIGER was the name of the real person Bruce Scott ’s cat, <a href="http://www.dba-oracle.com/t_scott_tiger.htm" target="_blank">see</a>) and in this account, there are some tables named DEPT, EMP, BONUS and SALGRADE (you can read their meaning). Almost every Oracle DBA learn SQL using these database and an joke just says that in DBA’s meetings, people just&#160; warm up saying “how about Smith?” And you should know that in the database, Smith is a clerk and his boss is Ford (whose boss is Jones)!</p>
<p>In the beginning I also raise a question for SAS programmers: who is Alfred? Don’t give quick answer such that “Alfred who”. Actually, you should already go through with Alfred very well as a SAS programmer:</p>
<blockquote><p><font face="Courier New">proc print data=sashelp.class;       <br />&#160;&#160;&#160; where name=&quot;Alfred&quot;;        <br />run;</font></p>
</blockquote>
<p>As a clinical SAS programmer, I play with data, get acquaintance with the data and subjects and then subjects are no longer “subject”. They have identities and&#160; Alfred is a 14 years old boy. I have such habit mostly because in clinical world, data are very expensive (not like the massive transaction data in financial industry) and should be took more care. </p>
<p>I dare say that “class” is the most famous SAS dataset in sashelp library and then in the SAS world. The first dataset used for demo is almost this “class”. I just did a quick Google search, “<a href="http://www.google.com/search?hl=en&amp;source=hp&amp;biw=1111&amp;bih=561&amp;q=sas+sashelp.class&amp;btnG=Google+Search&amp;aq=f&amp;aqi=g10&amp;aql=&amp;oq=&amp;gs_rfai=#pq=+sas+sashelp.class&amp;hl=en&amp;cp=0&amp;gs_id=t&amp;xhr=t&amp;q=sas+sashelp.class&amp;qe=c2FzIHNhc2hlbHAuY2xhc3M&amp;qesig=-1hRQj8XDofruHqJt-7o1Q&amp;pkc=AFgZ2tkn99yjg_kNxO238PUOVve2MCFJUcgPCK-pXmvfyldpJvG0DchYcRuz_Azx9jhciBgWit8jDgrY6zs4T42InGlJtSBhGQ&amp;pf=p&amp;sclient=psy&amp;source=hp&amp;pbx=1&amp;oq=sas+sashelp.class&amp;aq=f&amp;aqi=&amp;aql=&amp;gs_sm=&amp;gs_upl=&amp;bav=on.2,or.r_gc.r_pw.r_cp.&amp;fp=265f5e3edf2ec82b&amp;biw=1166&amp;bih=665&amp;bs=1" target="_blank">sas sashelp.class</a>” returns about 44,400 results. Hope you can find any other SAS datasets to beat it.</p>
<p>Alfred in “class” pops into my mind because today, I do find a strong candidate. In SAS 9.2 (and 9.3), the sashelp library has a new member, Iris. YES, it is the “<a href="http://en.wikipedia.org/wiki/Iris_flower_data_set" target="_blank">Fisher Iris Flower Data</a>”, which can be safely considered the most famous and most&#160; used dataset in machine learning and data mining papers and statistical applications. Currently it has <a href="http://www.google.com/search?hl=en&amp;source=hp&amp;biw=1111&amp;bih=561&amp;q=sas+sashelp.class&amp;btnG=Google+Search&amp;aq=f&amp;aqi=g10&amp;aql=&amp;oq=&amp;gs_rfai=#sclient=psy&amp;hl=en&amp;source=hp&amp;q=sas+sashelp.iris+&amp;pbx=1&amp;oq=sas+sashelp.iris+&amp;aq=f&amp;aqi=&amp;aql=&amp;gs_sm=e&amp;gs_upl=277383l277383l5l277945l1l1l0l0l0l0l0l0ll0l0&amp;bav=on.2,or.r_gc.r_pw.r_cp.&amp;fp=265f5e3edf2ec82b&amp;biw=1166&amp;bih=665" target="_blank">only 859 hits in Google</a>, I think the number will reach high accompany with the wide use of SAS 9.2 and above, and to enforce my prediction, I will definitely play with the Iris data in the following future!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/08/31/who-is-alfred/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I am a 20% SAS Nerd!</title>
		<link>http://www.jiangtanghu.com/blog/2011/08/23/i-am-a-20-sas-nerd/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/08/23/i-am-a-20-sas-nerd/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 13:57:14 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/08/23/i-am-a-20-sas-nerd/</guid>
		<description><![CDATA[Kirk Paul Lafler drafted a checking list for identifying a SAS nerd (or geek, in its positive ways) in one of his intriguing papers: You Could be a SAS® Nerd If . . . Here I’m glad to find that I am roughly a 20% SAS nerd (12 matched in all 57 lists): 8. You [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Kirk_Paul_Lafler" target="_blank">Kirk Paul Lafler</a> drafted a checking list for identifying a SAS nerd (or geek, in its positive ways) in one of his intriguing papers:</p>
<blockquote><p><em><a href="http://www.wuss.org/proceedings10/coders/2910_3_COD-Lafler2.pdf" target="_blank">You Could be a SAS® Nerd If . . .</a></em> </p>
</blockquote>
<p>Here I’m glad to find that I am roughly a 20% SAS nerd (12 matched in all 57 lists):</p>
<blockquote><p>8. You blog SAS-related comments and technical solutions frequently. </p>
<p>9. You have more than five SAS blogs in your RSS feed. </p>
<p>10. Your home page is support.sas.com, sasCommunity.org, SAS-L, or LexJansen.com. </p>
<p>11. You know more than ten SAS keyboard shortcuts. </p>
<p>12. You get excited when you find a new match-merge technique that performs better than the one you developed the week before.</p>
<p>21. You have more than one version of SAS on your machine or network so you can compare and contrast program, processing and output differences.</p>
<p>28. You spend your Friday evenings and weekends responding to SAS-L posts, entering sasCommunity blog entries, and reading the latest “hot” SAS topic on LexJansen.com.</p>
<p>38. The first thing you read in the morning is the “Tip of the Day”.</p>
<p>45. You subscribe to five or more SAS groups on LinkedIn, sasCommunity, and Facebook and you use a tabbed browser so you can be online with all of them at the same time.</p>
<p>47. You spend your evenings and weekends SAS-L’ing, Googling and Binging looking for elegant SAS technical solutions.</p>
<p>50. You proudly proclaim that you’re a SAS programmer when asked by a fellow passenger, “What do you do for a living?”</p>
<p>51. You’re amazed when your fellow airline passenger replies, “What is a “SAS programmer?”.</p>
</blockquote>
<p>I also asked Kirk if he is a 100% SAS nerd and Kirk replied, NO. He said he is a 99% SAS nerd:)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/08/23/i-am-a-20-sas-nerd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS Bloggers in Action (2): Jian Dai and his SAS Academy</title>
		<link>http://www.jiangtanghu.com/blog/2011/08/15/sas-bloggers-in-action-2-jian-dai-and-his-sas-academy/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/08/15/sas-bloggers-in-action-2-jian-dai-and-his-sas-academy/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 12:59:29 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/08/15/sas-bloggers-in-action-2-jian-dai-and-his-sas-academy/</guid>
		<description><![CDATA[My first post on SAS bloggers begins with Rick Wicklin and I plan a series of posts. It would be nice for a statement of rational before following pages. As a learner, I benefit frequently from lots of high quality blogs. But I’m also slightly lazy as a reader: I read almost all blogs in [...]]]></description>
				<content:encoded><![CDATA[<p>My first post on SAS bloggers begins with <a href="http://www.jiangtanghu.com/blog/2011/07/17/sas-bloggers-in-action1-rick-wicklin-sasiml-and-color-revolution/" target="_blank">Rick Wicklin</a> and I plan a series of posts. It would be nice for a statement of rational before following pages.</p>
<p>As a learner, I benefit frequently from lots of high quality blogs. But I’m also slightly lazy as a reader: I read almost all blogs in Google Reader rather than returning to the original web pages and adding some comments. Here I’d like to post a series of SAS bloggers and their blogs (that I subscribed and read frequently) to extent my thanks, share with friends and sometimes amuse the bloggers themselves:) </p>
<p>In this page, honor belongs to <a href="http://www.linkedin.com/pub/jian-dai/1a/1b/b05" target="_blank">Jian Dai</a> and his Yahoo group, “<a href="http://tech.groups.yahoo.com/group/sas_academy/" target="_blank">SAS Academy</a>”:</p>
<blockquote><p><a href="http://tech.groups.yahoo.com/group/sas_academy/">http://tech.groups.yahoo.com/group/sas_academy/</a></p>
</blockquote>
<p>Wait. You may ask: a Yahoo group? </p>
<p>Jian actually is a blogger for a collective blog, <em><a href="http://blog.clinovo.com/" target="_blank">Clinical Trial New Technologies &amp; Best Practices</a></em>. But here I’d like to refer this Yahoo group which actually serves as his own blog and I also use Google Reader to subscribe its RSS feed: </p>
<blockquote><p>launched at December of 2008</p>
<p>444 posts till July 2011, averagely 14 posts per month (and roughly 1 post for every 2 days!)</p>
</blockquote>
<p>And all in all, most (and almost every) posts are under Jian’s name and few posts come from other’s hands are just outlier-like(less than 10). Note that I just read all the historical messages in a weekend and got the impressions. In the following page, I might <a href="http://www.jiangtanghu.com/blog/2011/07/20/retrieve-blogs-using-sas/" target="_blank">retrieve all the data</a> from the <a href="http://tech.groups.yahoo.com/group/sas_academy/" target="_blank">SAS Academy</a> and supply accurate reports.</p>
<p>Recently Jian posted <a href="http://tech.groups.yahoo.com/group/sas_academy/message/454" target="_blank">a C implementation of a SAS tokenizer</a> based on Finite-state Machine(<a href="http://en.wikipedia.org/wiki/Finite-state_machine" target="_blank">FSM</a>). A tokenizer is a lexical analyzer of a specific programming language and in this case you can just imagine it is a small part of SAS Supervisor to recognize all <a href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a001961603.htm" target="_blank">tokens</a>. In <a href="http://tech.groups.yahoo.com/group/sas_academy/" target="_blank">SAS Academy</a>, Jian posted lots wonderful (and beautiful) implementation of lots of general or specific problems using <a href="http://tech.groups.yahoo.com/group/sas_academy/messages/425?l=1" target="_blank">C</a>, <a href="http://tech.groups.yahoo.com/group/sas_academy/msearch?query=perl&amp;submit=Search&amp;charset=UTF-8" target="_blank">Perl</a>, <a href="http://tech.groups.yahoo.com/group/sas_academy/msearch?query=JScript&amp;submit=Search&amp;charset=UTF-8" target="_blank">JScript</a>, <a href="http://tech.groups.yahoo.com/group/sas_academy/msearch?query=JavaScript&amp;submit=Search&amp;charset=UTF-8" target="_blank">JavaScript</a>, <a href="http://tech.groups.yahoo.com/group/sas_academy/msearch?query=PowerShell&amp;submit=Search&amp;charset=UTF-8" target="_blank">PowerShell</a>, <a href="http://tech.groups.yahoo.com/group/sas_academy/msearch?query=vb*&amp;submit=Search&amp;charset=UTF-8" target="_blank">VBS/VBA</a>, . . . and even <a href="http://tech.groups.yahoo.com/group/sas_academy/msearch?query=ProLog&amp;submit=Search&amp;charset=UTF-8" target="_blank">ProLog</a>, a general logic programming language!</p>
<p>Wait wait. You may wonder: is Jian a SAS programmer?</p>
<p>I don’t know how Jian identify himself as a programmer and it would be best to leave this question to himself. But don’t worry. There is no such phrase engraved at the door of Jian’s <a href="http://tech.groups.yahoo.com/group/sas_academy/" target="_blank">SAS Academy</a>:</p>
<blockquote><p>Let no one ignorant of C/Perl enter.</p>
</blockquote>
<p>Actually Jian is a SAS/statistical/clinical programmer by job and he of course has lots of interesting SAS codes posted, including SAS implementation of <a href="http://tech.groups.yahoo.com/group/sas_academy/msearch?query=Lambda+&amp;submit=Search&amp;charset=UTF-8" target="_blank">Lambda Expression</a> and <a href="http://tech.groups.yahoo.com/group/sas_academy/msearch?query=recursion&amp;submit=Search&amp;charset=UTF-8" target="_blank">recursion</a>(Jian is also an active conference speaker on this topic). &#8211;Some clinical programmers without any computer background would find it difficult to understand the CS part even of Jian’s SAS codes, for example, <strong>Lambda Expression</strong>. Suggestion: Google it and you will enter a totally new joy world.</p>
<p>Jian plays like a geek, and he is always making efforts to extend the horizon and scope of SAS programming language by taking advantage from computer science(actually he had some posts titled <em><strong>play like a CS pro</strong></em>). I have great experience by exploring Jian’s <a href="http://tech.groups.yahoo.com/group/sas_academy/" target="_blank">SAS Academy</a> and very often, a popular book title pops up in my mind:</p>
<blockquote><p><a href="http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/0201657880" target="_blank">Programming Pearls</a></p>
</blockquote>
<p>If you want sometimes programming for fun, just for fun, that’s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/08/15/sas-bloggers-in-action-2-jian-dai-and-his-sas-academy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retrieve blogs using SAS</title>
		<link>http://www.jiangtanghu.com/blog/2011/07/20/retrieve-blogs-using-sas/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/07/20/retrieve-blogs-using-sas/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 13:47:46 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[IML]]></category>
		<category><![CDATA[Rick Wicklin]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/07/20/retrieve-blogs-using-sas/</guid>
		<description><![CDATA[Recently I posted a frequency analysis on Rick Wicklin’s popular SAS/IML blog. Sanjay Matange also produced a nice heatmap on Rick’s blogging history using the summary data I published. Here just release the ideas and SAS codes to get data from Rick’s blog dynamically. You may modify the codes slightly to obtain data from all [...]]]></description>
				<content:encoded><![CDATA[<p><font size="2">Recently I posted a </font><a href="http://www.jiangtanghu.com/blog/2011/07/17/sas-bloggers-in-action1-rick-wicklin-sasiml-and-color-revolution/" target="_blank"><font size="2">frequency analysis</font></a><font size="2"> on Rick Wicklin’s popular </font><a href="http://blogs.sas.com/iml/" target="_blank"><font size="2">SAS/IML blog</font></a><font size="2">. Sanjay Matange also produced a nice </font><a href="https://sites.google.com/site/smatange/ods-graphics/rick-s-blog-history-heatmap" target="_blank"><font size="2">heatmap on Rick’s blogging history</font></a><font size="2"> using the summary data I published. Here just release the ideas and SAS codes to get data from Rick’s blog dynamically. You may modify the codes slightly to obtain data from all other SAS in-house blogs (</font><a href="http://blogs.sas.com/index.php"><font size="2">http://blogs.sas.com/index.php</font></a><font size="2">) since they share the same template. For other blogs, you should research the web pages accordingly to get the best suitable methods and this post can also serve as an example.</font></p>
<h1><strong>First step: define the scope</strong></h1>
<p><font size="2">For my purpose, I only need the titles and publish dates of Rick’s posts. It is so called the “metadata” of the blog. I do not need all the post contents. By the way, if all information needed, you can use a blog backup tool, or write codes to retrieve all the pages of </font><a href="http://blogs.sas.com/iml"><font size="2">http://blogs.sas.com/iml</font></a> at the maximum depth<font size="2">, or simply, you can write to Rick and say: hey Rick, could you please send me all the contents of your blog? And Rick may go to the management console of his own blog, export all the contents to an XML file and get back to you.</font></p>
<h1><strong>Second step: analyze the web pages</strong></h1>
<p><font size="2">Browse to the right panel of Rick’s blog, in the ARCHIVES frame, click “<a href="http://blogs.sas.com/iml/index.php?/archive" target="_blank">Older</a>”</font><font size="2">:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0025.jpg"><font size="2"></font></a><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0026.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image002" border="0" alt="clip_image002" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image002_thumb1.jpg" width="235" height="298" /></a></a></a></p>
<p><font size="2">And you get </font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0034.gif"><font size="2"></font></a><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0035.gif"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image003" border="0" alt="clip_image003" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image003_thumb.gif" width="362" height="274" /></a></a></a></p>
<p><font size="2">This page just gives a big picture of Rick’s blog (ARCHIVE section is always a good place to get such metadata, for example, <a href="http://www.jiangtanghu.com/blog/archives/" target="_blank">archives for my blog</a></font><font size="2">). But we need more. Click “<a href="http://blogs.sas.com/iml/index.php?/archives/2010/09/summary.html" target="_blank">view topics</a>” for example of September, 2010:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0044.gif"><font size="2"></font></a><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0045.gif"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image004" border="0" alt="clip_image004" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image004_thumb.gif" width="372" height="443" /></a></a></a></p>
<p><font size="2">This page is exactly what we want with titles and dates. Open an editor to write codes immediately to read all the information in this page?—wait. Currently this blog has posts across 11 months and you can expect the increase. You should design a dynamic method to read all the topics pages: Sep 2010, Oct 2010, … and, <font face="Courier New">today()</font>.</font></p>
<p><font size="2">Return to the <a href="http://blogs.sas.com/iml/index.php?/archive" target="_blank">archives page</a>. RCM (right click your mouse) and select “View page source” if you use Google Chrome web browser (“View Source” in IE; “View Page Source” in Firefox) and you get all the HTML scripts (<strong>Note: you DO not need any knowledge of HTML to understand this post</strong>). Copy and paste them into a text editor supporting HTML syntax highlighting (such as Notepad++). Search all instances of “view topics” we mentioned before:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0066.jpg"><font size="2"></font></a><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0067.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image006" border="0" alt="clip_image006" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image006_thumb2.jpg" width="519" height="312" /></a></a></a></p>
<p><font size="2">We are lucky. They are 11 instances of “view topics” accompanying with 11 hyperlinks for the currently 11 months’ archives of Rick’s blog. We can read such 11 hyperlinks to a macro array for dynamic retrieval.</font></p>
<p><font size="2">Then we return to the single <a href="http://blogs.sas.com/iml/index.php?/archives/2010/09/summary.html" target="_blank">topics page</a>, for example of September, 2010</font><font size="2">. Review the HTML source file. Search for “posted_by_date” and we get 14 instances which is same as the number of posts in September 2010:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0085.jpg"><font size="2"></font></a><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0086.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image008" border="0" alt="clip_image008" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image008_thumb1.jpg" width="518" height="307" /></a></a></a></p>
<p><font size="2">We should also need to locate all the instances of titles. Search “/iml/index.php?/archives/” and we get 17 responses:</font></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0105.jpg"><font size="2"></font></a><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0106.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image010" border="0" alt="clip_image010" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image010_thumb1.jpg" width="517" height="298" /></a></a></a></p>
<p><font size="2">We see 3 instances at end of the finding results don’t contain any titles. You can check other pages to confirm such pattern. Yes we can use regular expressions to parse the HTML pages to locate more exactly for the titles. But for a quick job and due to the relative simple HTML pages, some basic SAS character functions are enough for our purpose. In the following codes, limited regular expressions are used only to remove HTML tags such as “&lt;a href=”.</font></p>
<p><font size="2">After such explorative search of HTML scripts, we can get the basic idea where can we find the interested information. Then we begin to coding work.</font></p>
<h1><strong>Third step: Coding at last!</strong></h1>
<p><font size="2">For our purpose, we should first read the archive page to get all the topics links to a macro array, then read the all the topics pages dynamically. Finally, we should also add the all the calendar dates with holidays. Some friends may find that they met piece of the following codes before. Yes, such codes just assembled some skills what I learned from Art Carpenter, Richard DeVenezia, Jian Dai and lots of programmers before!</font></p>
<h3>3-1: read archive page</h3>
<blockquote><p><font face="Courier New">%let URL=</font><a href="http://blogs.sas.com/iml/index.php?/archive;"><font face="Courier New">http://blogs.sas.com/iml/index.php?/archive;</font></a></p>
<p><font face="Courier New">filename archive URL &quot;&amp;URL&quot;; </font></p>
<p><font face="Courier New">data archive;        <br />&#160;&#160;&#160; length text $1024;         <br />&#160;&#160;&#160; infile archive lrecl=1024;         <br />&#160;&#160;&#160; input text $;         <br />&#160;&#160;&#160; text= _infile_;         <br />&#160;&#160;&#160; if index(text, &quot;&gt;view topics&lt;&quot;) then output;         <br />run; </font></p>
<p><font face="Courier New">data&#160; archive1;        <br />&#160;&#160;&#160; set archive;         <br />&#160;&#160;&#160; summary=scan(text,4,&#8217;&quot;&#8217;);         <br />run;</font></p>
</blockquote>
<h3>3-2: read all topics pages</h3>
<blockquote><p><font face="Courier New">data _null_;        <br />&#160;&#160;&#160; set&#160; archive1 end=eof;         <br />&#160;&#160;&#160; I+1;         <br />&#160;&#160;&#160; II=left(put(I,2.));         <br />&#160;&#160;&#160; call symputx(&#8216;summary&#8217;||II,summary);         <br />&#160;&#160;&#160; if eof then call symputx(&#8216;total&#8217;,II);         <br />run; </font></p>
<p><font face="Courier New">%macro readit;        <br />&#160;&#160;&#160; %do i=1 %to &amp;total;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; filename f&amp;i URL &quot;&amp;&amp;summary&amp;i&quot;;&#160;&#160;&#160; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; data f&amp;i;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; length text $1024;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; infile f&amp;i lrecl=1024;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; input text $;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; text= _infile_;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if index(text, &quot;/iml/index.php?/archives/&quot;) or index(text, &quot;posted_by_date&quot;) then output;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; run; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; <font color="#ff0000">/*remove HTML tags;*/</font>         <br />&#160;&#160;&#160; data ff&amp;i;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; set f&amp;i;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; prx=prxparse(&quot;s/&lt;.*?&gt;//&quot;);         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; call prxchange(prx,99,text);         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; drop prx; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; flag=ifn(mod(_n_,2),1,2);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; grpn=&amp;i;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if index(text,&quot;201&quot;) and length(text)&lt;10 then delete;<font color="#ff0000">/*be carefull! hard coding;*/          <br /></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160; seq=_n_;         <br />&#160;&#160;&#160;&#160; run; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160; /*transpose data;*/        <br />&#160;&#160;&#160;&#160; data fff&amp;i;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set ff&amp;i;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; by grpn seq flag; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">retain</font> title;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if first.flag then title=lag(text);         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if flag=1 then delete;         <br />&#160;&#160;&#160;&#160; run; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; %end; </font></p>
<p><font face="Courier New">%mend readit;        <br />%readit </font></p>
<p><font face="Courier New">%macro getall;        <br />&#160;&#160;&#160; data Rick;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; set %do i=1 %to &amp;total; fff&amp;i %end; ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; seq=seq/2;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; drop flag;         <br />&#160;&#160;&#160; run;&#160;&#160;&#160; <br />%mend getall;         <br />%getall </font></p>
<p><font face="Courier New">data rick2;        <br />&#160;&#160;&#160; set rick; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; datetime=scan(text,2,&quot;,&quot;);&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; year=scan(text,2,&quot;.&quot;);&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; month=scan(scan(text,2,&quot;,&quot;),1);         <br />&#160;&#160;&#160; day=scan(scan(text,2,&quot;,&quot;),2);&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; week=scan(text,6);&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; dt=compress(catx(&quot;&quot;,day,substr(month,1,3),year));&#160;&#160; <br />&#160;&#160;&#160; worddat=input(dt,date9.);&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; format worddat&#160; ddmmyy10.;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; m=scan(put(worddat,ddmmyy10.),2);&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; my=compress(catx(&quot;&quot;,year,m));&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />run; </font></p>
<p><font face="Courier New">proc sort ;        <br />&#160;&#160;&#160; by&#160; worddat descending seq ;         <br />run;</font></p>
</blockquote>
<p> <span id="more-354"></span>
<p>It is also interesting to add additional information for further analysis, such as all calendar dates during Rick’s blogging history and holidays.</p>
<h3>3-3: get all calendar dates</h3>
<blockquote><p><font face="Courier New">proc sort data=rick2 out=rick3 nodupkey;        <br />&#160;&#160;&#160; by my;         <br />run; </font></p>
<p><font face="Courier New">data _null_;        <br />&#160;&#160;&#160; set rick3 end=eof;         <br />&#160;&#160;&#160; I+1;         <br />&#160;&#160;&#160; II=left(put(I,2.));         <br />&#160;&#160;&#160; call symputx(&#8216;year&#8217;||II,year);         <br />&#160;&#160;&#160; call symputx(&#8216;month&#8217;||II,m);         <br />&#160;&#160;&#160; if eof then call symputx(&#8216;total&#8217;,II);         <br />run; </font></p>
<p><font face="Courier New">%macro getCalendar;        <br />&#160;&#160;&#160; %do i=1 %to &amp;total;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; data calendar&amp;i;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; date1 = mdy (&amp;&amp;month&amp;i,1,&amp;&amp;year&amp;i);         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; date2 = intnx (&#8216;month&#8217;, date1, 1) &#8211; 1; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; do worddat = date1 to date2;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; wim = intck (&#8216;week&#8217;, date1, worddat);         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dim = worddat-date1+1;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; output;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; format worddat&#160; ddmmyy10.;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; keep&#160;&#160; worddat&#160; dim ;         <br />&#160;&#160;&#160;&#160;&#160; run;         <br />&#160;&#160;&#160; %end;         <br />%mend getCalendar;         <br />%getCalendar; </font></p>
<p><font face="Courier New">%macro allCalendar;        <br />&#160;&#160;&#160; data Calendar;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; set %do i=1 %to &amp;total; calendar&amp;i %end; ;&#160;&#160;&#160; <br />&#160;&#160;&#160; run;&#160;&#160;&#160; <br />%mend allCalendar;         <br />%allCalendar</font></p>
</blockquote>
<h3>3-4: get holidays</h3>
<p><font size="2">I have no specific idea about US holidays and just referenced the two pages:</font></p>
<blockquote><p><a title="http://support.sas.com/kb/24/655.html  " href="http://support.sas.com/kb/24/655.html&nbsp; ">http://support.sas.com/kb/24/655.html&#160; </a></p>
<p><a title="http://www.opm.gov/Operating_Status_Schedules/fedhol/2011.asp" href="http://www.opm.gov/Operating_Status_Schedules/fedhol/2011.asp">http://www.opm.gov/Operating_Status_Schedules/fedhol/2011.asp</a></p>
</blockquote>
<p><font size="2">Also, the holidays and observances should manully modified according to personal working schedule. So this section serves only for demonstration.</font></p>
<blockquote><p><font size="1" face="Courier New">filename hld url &quot;</font><a href="http://jiangtanghu.com/docs/en/US_holiday.sas&quot;;"><font size="1" face="Courier New">http://jiangtanghu.com/docs/en/US_holiday.sas&quot;;</font></a></p>
<p><font face="Courier New">%include hld; </font></p>
<p><font face="Courier New">%US_holiday(2010)        <br />%US_holiday(2011) </font></p>
<p><font face="Courier New">data holiday;        <br />&#160;&#160;&#160; set holiday2010 holiday2011;         <br />run;</font></p>
<p><font face="Courier New">proc sort ;        <br />&#160;&#160;&#160; by&#160; worddat;         <br />run;</font></p>
</blockquote>
<h3>3-5: put all together</h3>
<blockquote><p><font face="Courier New">data rick_all;        <br />&#160;&#160;&#160; merge rick2 calendar holiday;         <br />&#160;&#160;&#160; by worddat;&#160; <br />&#160;&#160;&#160; </font><font face="Courier New">if worddat &lt;&#8217;03Sep2010&#8242;d then delete;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; <font color="#ff0000">if worddat &gt;&#8217;15Jul2011&#8242;d then delete;</font>         <br />&#160;&#160;&#160; drop today;         <br />run;</font></p>
<p><font face="Courier New"></font></p>
</blockquote>
<p><font size="2"></font></p>
<p><font size="2"></font></p>
<p><font size="2"></font></p>
<p><font size="2"></font></p>
<p>A pooled version (beta) also available at </p>
<blockquote><p><a href="http://jiangtanghu.com/docs/en/SAS_Blogs.sas">http://jiangtanghu.com/docs/en/SAS_Blogs.sas</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/07/20/retrieve-blogs-using-sas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS Bloggers In Action(1): Rick Wicklin, SAS/IML and &#8220;Color Revolution&#8221;</title>
		<link>http://www.jiangtanghu.com/blog/2011/07/17/sas-bloggers-in-action1-rick-wicklin-sasiml-and-color-revolution/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/07/17/sas-bloggers-in-action1-rick-wicklin-sasiml-and-color-revolution/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 08:16:49 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[IML]]></category>
		<category><![CDATA[Rick Wicklin]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/07/17/sas-bloggers-in-action1-rick-wicklin-sasiml-and-color-revolution/</guid>
		<description><![CDATA[It is well known that the French writer, author of The Three Musketeer, Alexandre Dumas, wrote his master piece of work in different colored papers according to literary genre: non-fiction on&#160; rose, fiction on blue, poetry on yellow The SAS blog writer, author of Statistical Programming with SAS/IML Software, Rick Wicklin of SAS Institute,&#160; also [...]]]></description>
				<content:encoded><![CDATA[<p>It is well known that the French writer, author of <em>The Three Musketeer</em>, Alexandre Dumas, wrote his master piece of work in different colored papers according to literary genre:</p>
<blockquote><p><font color="#ff0000"><strong>non-fiction on&#160; rose,</strong></font></p>
<p><font color="#0000ff"><strong>fiction on blue,</strong></font></p>
<p><font color="#ffff80"><strong>poetry on yellow</strong></font></p>
</blockquote>
<p>The SAS blog writer, author of <em><a href="http://support.sas.com/publishing/authors/wicklin.html">Statistical Programming with SAS/IML Software</a></em>, <a href="http://blogs.sas.com/iml/" target="_blank">Rick Wicklin</a> of SAS Institute,&#160; also leads a strong “color revolution” in SAS blog community:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/JohariWindow1.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="JohariWindow" border="0" alt="JohariWindow" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/JohariWindow_thumb.jpg" width="333" height="330" /></a>In an interesting personal statement, <a href="http://blogs.sas.com/iml/index.php?/archives/124-Blogging,-Programming,-and-Johari-Windows.html"><em>Blogging, Programming, and Johari Windows</em></a>, Rick summarizes his rich and colorful blogging rhythms according to the above <a href="http://en.wikipedia.org/wiki/Johari_window"><em>Johari window</em></a>:&#160;&#160; </p>
<ul>
<li><font color="#ffff80">Mondays</font>, writes introductory notes (corresponding to the upper right quadrant of Johari window).&#160; </li>
<li><font color="#bcdee2">Wednesdays</font>, experimental articles on sampling, simulation and other statistical programming topics(lower left quadrant). </li>
<li><font color="#008000">Fridays</font>, on explorative analysis of data (upper left quadrant). </li>
</ul>
<p>So what about the <font color="#ff8080">lower right quadrant</font>? Rick rediscovers and exposes what he once knew. Just suppose that, Rick picks up some codes he wrote before (ten years ago maybe) with big surprise: oh, who on earth wrote such damned clever beautiful codes? He or she must be in his/her aggressive youth. –then Rick wrote them all in blog.</p>
<p>Here I produced a summary table for Rick’s blogging activities (numbers per month per weekday; before July 16, 2011 Beijing time; <em>next following post would introduce how to use SAS to analyze data from website such as Rick’s blog</em>):</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/Rick.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Rick" border="0" alt="Rick" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/Rick_thumb.png" width="485" height="433" /></a>&#160;</p>
<p>Key findings:</p>
<ul>
<li>Rick is really a frequent and productive blogger with averagely 0.5 posts per day! </li>
<li>Rick DOES keep his words. Most of the posts are published in <font color="#008000">Friday</font>, <font color="#bcdee2">Wednesday </font>and <font color="#ffff80">Monday</font>(44, 44, 42 posts respectively). </li>
<li>None posted in Saturdays and Sunday. </li>
</ul>
<p>Rick began his writing since September&#160; 3. 2010, <font color="#008000">Friday</font>.&#160; Up to July 15. 2011, <font color="#008000">Friday</font>, there are 48 <font color="#008000">Fridays</font>, 46 <font color="#bcdee2">Wednesdays </font>and 46 <font color="#ffff80">Mondays</font>.&#160; Only 10 colored weekdays (4 <font color="#008000">Fridays</font>, 2 <font color="#bcdee2">Wednesdays </font>and 4 <font color="#ffff80">Mondays</font>) passed with no posts and most all them are due to national holidays: </p>
<blockquote><p>06/09/2010 , <font color="#ffff80">Monday</font>&#160;&#160;&#160;&#160;&#160;&#160; : Labor Day       <br />24/11/2010 , <font color="#bcdee2">Wednesday</font>: round Thanksgiving Day       <br />26/11/2010 , <font color="#008000">Friday</font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : round Thanksgiving Day       <br />22/12/2010 , <font color="#bcdee2">Wednesday</font>       <br />24/12/2010 , <font color="#008000">Friday</font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : Christmas Day       <br />27/12/2010 , <font color="#ffff80">Monday</font>       <br />31/12/2010 , <font color="#008000">Friday</font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : New Year’s Day       <br />30/05/2011 , <font color="#ffff80">Monday</font>&#160;&#160;&#160;&#160;&#160; : Memorial Day       <br />10/06/2011 , <font color="#008000">Friday</font>       <br />04/07/2011 , <font color="#ffff80">Monday</font>&#160;&#160;&#160;&#160;&#160; : Independence Day</p>
</blockquote>
<p>At least in 4 holidays (most in <font color="#ffff80">Monday</font>), Rick was also active in writing:</p>
<blockquote><p>11/10/2011, <font color="#ffff80">Monday</font>, Columbus Day: <em>How Do You Reshape a Matrix?</em>       <br />11/11/2010, Thursday, Veterans Day: <em>It&#8217;s Here!</em>       <br />17/01/2011, <font color="#ffff80">Monday</font>, Birthday of Martin Luther King, Jr.: <em>On the Flip Side: Exchanging Rows and Columns</em>       <br />21/02/2011, <font color="#ffff80">Monday</font>, Washington’s Birthday: <em>How to Build a Vector from Expressions</em></p>
</blockquote>
<p>Amazing Rick keeps a fixed writing pattern and in next following post, detailed analysis and SAS codes will be presented so you can also keep eyes on the metadata of your favorite bloggers’ writing and may rise a question like:</p>
<p>Hey Rick, what’s up in Jun 10, 2011, Friday?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/07/17/sas-bloggers-in-action1-rick-wicklin-sasiml-and-color-revolution/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tango Haiku</title>
		<link>http://www.jiangtanghu.com/blog/2011/07/15/tango-haiku/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/07/15/tango-haiku/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 14:50:18 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[haiku]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/07/15/tango-haiku/</guid>
		<description><![CDATA[Happy weekend and Haiku again! My finger hurts, I can not dance Tango in Bastille. So… any ideas? … … … … … … OK. I am a terrible Haiku writer. The sentences are not self explained without&#160; /*commentaries*/ . So the story behind the scene… One day my remote workstation was very very slow [...]]]></description>
				<content:encoded><![CDATA[<p>Happy weekend and <a href="http://www.jiangtanghu.com/blog/2010/12/30/a-sas-programmers-end-year-haiku/" target="_blank">Haiku again</a>!</p>
<blockquote><p>My finger hurts,</p>
<p>I can not dance</p>
<p>Tango in Bastille.</p>
</blockquote>
<p>So… any ideas?</p>
<p>…</p>
<p>… …</p>
<p>… … …</p>
<p>OK. I am a terrible Haiku writer. The sentences are not self explained without&#160; /*commentaries*/ . So the story behind the scene…</p>
<p>One day my remote workstation was very very slow due to some network issues. But I still needed to write and run SAS codes in the server which is located in France. It really hurt my fingers from the ergonomic point of view.</p>
<p>“Tango” was my project code. But why Bastille? oh, that day happened to be round the Bastille Day in France. The performance of the remote server that time was just as terrible as the Bastille I want to break so I could do my project work more smoothly!</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Note that after my completing this Tango Haiku, I did a Google search and found that there is really a French book called <em><a href="http://www.amazon.com/Bastille-tango-Jean-Fran%C3%A7ois-Vilar/dp/2742716785" target="_blank">Bastille tango</a></em>!</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/Tango.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="Tango" border="0" alt="Tango" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/Tango_thumb.jpg" width="152" height="240" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/07/15/tango-haiku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A SAS Implementation of Confidence Intervals for Single Proportion: Eleven Methods</title>
		<link>http://www.jiangtanghu.com/blog/2011/07/14/a-sas-implementation-of-confidence-intervals-for-single-proportion-eleven-methods/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/07/14/a-sas-implementation-of-confidence-intervals-for-single-proportion-eleven-methods/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 14:05:44 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Confidence Interval]]></category>
		<category><![CDATA[Newcombe]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[Single Proportion]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/07/14/a-sas-implementation-of-confidence-intervals-for-single-proportion-eleven-methods/</guid>
		<description><![CDATA[The following two papers by Professor Robert Newcombe, in my limit observation, are the most frequently cited papers in the industry for CI calculation: Two-sided confidence intervals for the single proportion: comparison of seven methods. Newcombe RG, Stat Med , Volume 17 , 8 (April 1998) pp.857-872 Interval estimation for the difference between independent proportions: [...]]]></description>
				<content:encoded><![CDATA[<p><font size="1">The following two papers by Professor </font><a href="http://medicine.cf.ac.uk/en/person/prof-robert-gordon-newcombe/"><font size="1">Robert Newcombe</font></a><font size="1">, in my limit observation, are the most frequently cited papers in the industry for CI calculation:</font></p>
<ul>
<li><cite><a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=pubmed&amp;dopt=Abstract&amp;list_uids=9595616&amp;query_hl=1"><strong><font size="1">Two-sided confidence intervals for the single proportion: comparison of seven methods.</font></strong></a><font size="1"> </font></cite>      <br /><font size="1">Newcombe RG, <cite>Stat Med</cite> , Volume 17 , 8 (April 1998) pp.857-<strong>872</strong><strong></strong> </font></li>
<li><cite><a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=pubmed&amp;dopt=Abstract&amp;list_uids=9595617&amp;query_hl=1"><strong><font size="1">Interval estimation for the difference between independent proportions: comparison of eleven methods.</font></strong></a><font size="1"> </font></cite>      <br /><font size="1">Newcombe RG, <cite>Stat Med</cite> , Volume 17 , 8 (April 1998) pp.<strong>873</strong>-890 </font></li>
</ul>
<p style="margin-right: 0px"><font size="1">This post serves as an implementation using SAS accompany with the first paper on confidence intervals for single proportion(method 1-7). Additional 4 methods also provided:</font></p>
<blockquote><p><font size="1">1.&#160; Simple asymptotic, Without CC&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />2.&#160; Simple asymptotic, With CC&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />3.&#160; Score method, Without CC&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />4.&#160; Score method, With CC&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />5.&#160; Binomial-based, &#8216;Exact&#8217;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />6.&#160; Binomial-based, Mid-p&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />7.&#160; Likelihood-based&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />8.&#160; Jeffreys&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />9.&#160; Agresti-Coull,z^2/2 successes&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />10. Agresti-Coull,2 successes and 2 fail&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />11. Logit </font></p>
</blockquote>
<p style="margin-right: 0px"><font size="1">The codes are available at</font></p>
<blockquote><p style="margin-right: 0px"><a href="http://jiangtanghu.com/docs/en/CI_Single_Proportion.sas"><font size="1">http://jiangtanghu.com/docs/en/CI_Single_Proportion.sas</font></a><font size="1">&#160;</font></p>
</blockquote>
<p style="margin-right: 0px"><font size="1">It is a purely SAS/Base(data step and SQL) approach. I prefer data steps because it can be seamlessly incorporate into production work which looks like:</font></p>
<blockquote><p><font size="1" face="Courier New">/*r is the observed number of events/responders in n observations;*/ </font></p>
<p><font size="1" face="Courier New">%macro _Wald(r,n,alpha=0.05); </font></p>
<p><font size="1" face="Courier New">&#160;&#160;&#160;&#160;&#160; p=&amp;r/&amp;n;        <br />&#160;&#160;&#160;&#160;&#160; z = probit (1-&amp;alpha/2);         <br />&#160;&#160;&#160;&#160;&#160; sd=sqrt(&amp;n*p*(1-p)); *Standard Deviation ;         <br />&#160;&#160;&#160;&#160;&#160; se=sd/&amp;n;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; *standard error;         <br />&#160;&#160;&#160;&#160;&#160; me=z*se;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; *margin of error;         <br />&#160;&#160;&#160;&#160;&#160; p_CI_low = p-me;         <br />&#160;&#160;&#160;&#160;&#160; p_CI_up&#160; = p+me;         <br />&#160;&#160;&#160;&#160; p_CI=compress(catx(&quot;&quot;,&quot;[&quot;,put(round(p_CI_low,0.0001),6.4),&quot;,&quot;,put(round(p_CI_up,0.0001),6.4),&quot;]&quot;));         <br />%mend _Wald; </font></p>
<p><font size="1" face="Courier New">data test;        <br />&#160;&#160;&#160;&#160;&#160; input r n;         <br />&#160;&#160;&#160;&#160; <font color="#ff0000">%_Wald(r,n);</font>         <br />&#160;&#160;&#160;&#160;&#160; keep r n p p_CI;         <br />datalines;         <br />81 263         <br />15 148         <br />0 20         <br />1 29         <br />29 29         <br />;&#160;&#160; <br />run; </font></p>
<p><font size="1" face="Courier New">proc print data=test;run;</font></p>
</blockquote>
<p style="margin-right: 0px"><font size="1">But when simulation required (in methods 6-7), some SQL clauses pop up. Admit that It makes the codes less elegant. In this situation, matrix operation language such as SAS/IML or R will do a better job.</font></p>
<p style="margin-right: 0px"><font size="1">Note that in SAS 9.2, PROC FREQ can produce the following five intervals(method 1, 3, 9 ,8, 5):</font></p>
<blockquote><p><font size="1">Wald (also with method 2)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />Wilson&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />Agresti-Coull&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />Jeffreys&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />Clopper-Pearson (Exact)</font></p>
</blockquote>
<p style="margin-right: 0px"><font size="1">For the five intervals in SAS 9.2, a good reference is <em>Confidence Intervals for the Binomial Proportion with Zero Frequency</em> by Xiaomin He and Shwu-Jen Wu:</font></p>
<blockquote><p style="margin-right: 0px"><a href="www.pharmasug.org/download/papers/SP10.pdf" target="_blank"><font size="1">www.pharmasug.org/download/papers/SP10.pdf</font></a></p>
</blockquote>
<p style="margin-right: 0px"><font size="1">Also, an equivalent R version of the eleven methods by Abteilung Kriminologie is also available at</font></p>
<blockquote><p style="margin-right: 0px"><a href="http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Software/prop.CI.r"><font size="1">http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Software/prop.CI.r</font></a></p>
</blockquote>
<p><font size="1">Such R repository is also a good resource for SAS users. I almost “translate” R implementations directly to SAS for this post.</font></p>
<p><font size="1"></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/07/14/a-sas-implementation-of-confidence-intervals-for-single-proportion-eleven-methods/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dive into CDISC Express (5): Generate and Validate SDTM domains and define.xml</title>
		<link>http://www.jiangtanghu.com/blog/2011/07/07/dive-into-cdisc-express-5-generate-and-validate-sdtm-domains-and-define-xml/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/07/07/dive-into-cdisc-express-5-generate-and-validate-sdtm-domains-and-define-xml/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 14:32:03 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[CDISC Express]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/07/07/dive-into-cdisc-express-5-generate-and-validate-sdtm-domains-and-define-xml/</guid>
		<description><![CDATA[Dive into CDISC Express (1): Introductory Dive into CDISC Express (2): Create a New Study Dive into CDISC Express (3): Navigate mapping file Dive into CDISC Express (4): Data manipulation techniques A more friendly PDF version of these all CDISC Express series is also available in http://jiangtanghu.com/docs/en/CDISCExpress.pdf The following tasks, such as generating SDTM domains [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><a href="http://www.jiangtanghu.com/blog/2011/06/28/dive-into-cdisc-express-1-introductory/"><em>Dive into CDISC Express (1): Introductory</em></a></p>
<p><em><a href="http://www.jiangtanghu.com/blog/2011/07/02/dive-into-cdisc-express-2-create-a-new-study/">Dive into CDISC Express (2): Create a New Study</a></em></p>
<p><em><a href="http://www.jiangtanghu.com/blog/2011/07/03/dive-into-cdisc-express-3-navigate-mapping-file/">Dive into CDISC Express (3): Navigate mapping file</a></em></p>
</p>
<p><em><a href="http://www.jiangtanghu.com/blog/2011/07/04/dive-into-cdisc-express-4-data-manipulation-techniques-2/" target="_blank">Dive into CDISC Express (4): Data manipulation techniques</a></em></p>
</blockquote>
<p>A more friendly PDF version of these all CDISC Express series is also available in</p>
<blockquote><p><a title="http://jiangtanghu.com/docs/en/CDISCExpress.pdf" href="http://jiangtanghu.com/docs/en/CDISCExpress.pdf">http://jiangtanghu.com/docs/en/CDISCExpress.pdf</a></p>
</blockquote>
<p>The following tasks, such as generating SDTM domains and define.xml, need just some clicking button work in CDISC Express using a well designed mapping file. Few words needed due to the software.</p>
<p> <span id="more-311"></span><br />
<h4><strong>5. Step 3 of 6: Validate mapping file (<em>Validate_Mapping_File.sas</em>)</strong></h4>
<p>It would be back and forth to design, validate then modify and re-validate the mapping file. And sure finally, you will get all the work done, at least no syntax error (how to avoid semantic errors is upon your domain knowledge). A validated mapping file, named mapping.xls will be copied to <b>&#8230; docMapping file &#8211; validated version</b> from the working file, tmpmaping.xls. You will see </p>
<blockquote><p>The corresponding log file in folder <b>&#8230; log</b></p>
<p>A report in <b>…resultsMapping Validation</b>, named Mapping_validation.html</p>
</blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/validate.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="validate" border="0" alt="validate" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/validate_thumb.png" width="499" height="281" /></a> </p>
<p>Also the temporary datasets in <b>…tempdata</b> and <b>…temp</b>:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0041.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image004" border="0" alt="clip_image004" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image004_thumb1.jpg" width="497" height="189" /></a></p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image0061.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image006" border="0" alt="clip_image006" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image006_thumb1.jpg" width="496" height="313" /></a></p>
<h4><b>6. Step 4 of 6: Generate SDTM datasets </b>(<em>generate_SDTM.sas</em>)</h4>
<p>If mapping file is OK, generating SDTM domains is just clicking the button. After submitting the codes, you will see the log file, reports, SDTM datasets and temporary datasets in corresponding folders:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/SDTM.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="SDTM" border="0" alt="SDTM" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/SDTM_thumb.png" width="506" height="483" /></a> </p>
<h5><b>7. Step 5 of 6: Validate SDTM datasets </b>(<em>Validate_SDTM_Domains.sas</em>)</h5>
<p>The outputs files of validating SDTM datasets are all located in <b>C:Program FilesCDISC ExpressSDTM Validation</b>:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image010.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image010" border="0" alt="clip_image010" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image010_thumb.jpg" width="500" height="377" /></a></p>
<h5><b>8. Step 6 of 6: Generate Define.xml and xpt </b>(<em>generate_Definexml.sas</em>)</h5>
<p>Get the final define.xml file and SAS transport files (.xpt):</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image012.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image012" border="0" alt="clip_image012" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image012_thumb.jpg" width="502" height="402" /></a></p>
<h3>9. Recommended reading and action taken</h3>
<p>For a quick start and deep understanding, you could read the official documentations in the following sequence:</p>
<p><b>C:Program FilesCDISC ExpressdocumentationFAQ.htm</b></p>
<p><b>C:Program FilesCDISC ExpressdocumentationQuick Start.htm</b></p>
<p><b>C:Program FilesCDISC ExpressdocumentationUser guide.htm</b></p>
<p>A video tutorial would be also helpful:</p>
<p><b>C:Program FilesCDISC Expressdocumentationvideotutorial.htm</b></p>
<p>A must-read conference paper, <i>An Excel Framework to Convert Clinical Data to CDISC SDTM Leveraging SAS Technology</i> by Sophie McCallum and Stephen Chan of Clinovo, supplies a wonderful discussion the architectures of CDISC Express:</p>
<p><a href="http://www.lexjansen.com/pharmasug/2011/ad/pharmasug-2011-ad08.pdf">http://www.lexjansen.com/pharmasug/2011/ad/pharmasug-2011-ad08.pdf</a></p>
<p>Of course, you do not need to review all the pages then get the confidence to use the software. Learn by doing and just dive into it. There is an opportunity for your practicing and you will also have a change to win an iPad2 from Clinovo’s CDISC Express Contest:</p>
<blockquote><p><a href="http://www.clinovo.com/cdisc/game">http://www.clinovo.com/cdisc/game</a></p>
</blockquote>
<p>The due day is July 15<sup>th</sup> and I already submitted my work. That’s fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/07/07/dive-into-cdisc-express-5-generate-and-validate-sdtm-domains-and-define-xml/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dive into CDISC Express (4): Data manipulation techniques</title>
		<link>http://www.jiangtanghu.com/blog/2011/07/04/dive-into-cdisc-express-4-data-manipulation-techniques-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/07/04/dive-into-cdisc-express-4-data-manipulation-techniques-2/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 12:52:42 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[CDISC Express]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/07/04/dive-into-cdisc-express-4-data-manipulation-techniques-2/</guid>
		<description><![CDATA[Dive into CDISC Express (1): Introductory Dive into CDISC Express (2): Create a New Study Dive into CDISC Express (3): Navigate mapping file 4.3 Data manipulation techniques in CDISC Express CDISC Express supplies relative rich sets of data manipulation techniques assembling with SAS languages used for data mapping. Following is a not limited listing and [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><a href="http://www.jiangtanghu.com/blog/2011/06/28/dive-into-cdisc-express-1-introductory/" target="_blank"><em>Dive into CDISC Express (1): Introductory</em></a></p>
<p><em><a href="http://www.jiangtanghu.com/blog/2011/07/02/dive-into-cdisc-express-2-create-a-new-study/" target="_blank">Dive into CDISC Express (2): Create a New Study</a></em></p>
<p><em><a href="http://www.jiangtanghu.com/blog/2011/07/03/dive-into-cdisc-express-3-navigate-mapping-file/" target="_blank">Dive into CDISC Express (3): Navigate mapping file</a></em></p>
</blockquote>
<h3>4.3 Data manipulation techniques in CDISC Express</h3>
<p>CDISC Express supplies relative rich sets of data manipulation techniques assembling with SAS languages used for data mapping. Following is a not limited listing and I will keep it updated.</p>
<h3>4.3.1 Reference one dataset</h3>
<p>A raw dataset name appear in “Dataset” column indicate a “set” operation in SAS.</p>
<p>All dataset options can be used when referencing a dataset, such as</p>
<blockquote><p><font face="Courier New">siteinv(drop=invcode)</font></p>
<p><font face="Courier New">siteinv(rename=(invcode=inv))</font></p>
<p><font face="Courier New">siteinv(where=(invcode ne “”))</font></p>
</blockquote>
<p>You can also reference an external dataset. You should incorporate the external file in spreadsheet with name beginning with an underscore, “_”, and “_visits” in this case:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image001.gif"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image001" border="0" alt="clip_image001" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image001_thumb.gif" width="434" height="302" /></a></p>
<p>Then you can use it in any domains needed, e.g., TV domain:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image003.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image003" border="0" alt="clip_image003" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image003_thumb.jpg" width="493" height="244" /></a></p>
<p>There is a macro <font color="#ff0000">%cpd_importlist</font> used to import the external dataset, “_visits”. Again, this macro roots in <b>C:Program FilesCDISC Expressmacrosfunction_library</b>.</p>
<p>Using a macro call to re-sharp or modify an input dataset offers great flexibility referencing data. We will also discuss the benefits later on.</p>
<h3>4.3.2 Assignment</h3>
<p>You can assign a number, string and a dataset variable with any valid SAS functions to a SDTM domain variable in “Expression” column. </p>
<p>Sometimes a temporary variable needed for later calculation. You can produce such temporary variable in “Dataset” column with an assignment in the “Expression” column just similar with any other domain variables. Two differences: first, such temporary variables named begin with an asterisk, “*”; second, all temporary variables will not be included in the final domain. Once created, such temporary variables can be used for any other expressions.</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image005.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image005" border="0" alt="clip_image005" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image005_thumb.jpg" width="494" height="312" /></a></p>
<p>There are three special symbols used in “Dataset” column of CDISC Express. Asterisk, “*” indicates a temporary variable, while other two are </p>
<blockquote><p>Tilde, “~” : indicate a variable used for supplemental domain (SUPPQUAL).</p>
<p>Number sign, “#”: indicate a variable used for comments domain (CO).</p>
</blockquote>
<p>Another symbol, at sign, “@”, used in “Expression” column, indicated referencing a variables produced before:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image006.gif"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image006" border="0" alt="clip_image006" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image006_thumb.gif" width="448" height="104" /></a></p>
<p>In this case, “AGEU” uses “AGE” as input, while “AGE” is calculated before. “@AGE” just indicates the dependency. In concept, it looks like the “calculated” option in SAS PROC SQL:</p>
<blockquote><p><font face="Courier New"><b>proc</b> <b>sql</b> ;</font></p>
<p><font face="Courier New">select (AvgHigh &#8211; <b>32</b>) * <b>5</b>/<b>9</b> as HighC , </font></p>
<p><font face="Courier New">(AvgLow &#8211; <b>32</b>) * <b>5</b>/<b>9</b> as LowC ,</font></p>
<p><font face="Courier New">(calculated HighC &#8211; calculated LowC)</font></p>
<p><font face="Courier New">as Range </font></p>
<p><font face="Courier New">from temps;</font></p>
<p><font face="Courier New"><b>quit</b>;</font></p>
</blockquote>
<h3>4.3.3 Match-merging</h3>
<p>We already got a math-merging example before. If “all” appears as a dataset in the “Dataset” column, all the previous datasets should be merged first for later processing by the common key specified in “Merge Key” column. If no key assigned, patient ID is used by the system.</p>
<p>CDISC Express also supports two types of join, inner join and outer join (left, right, full) using data steps. The implementation has slightly difference with standard SQL, but the ideas are same.</p>
<p>We add a new column, “Join”, usually beside the “Merge Key” column.</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image008.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image008" border="0" alt="clip_image008" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image008_thumb.jpg" width="442" height="377" /></a></p>
<p>There are two values for “Join”, “O” or “I” while “O” stands for “outer join” and “I”, “inner join”. A join indicator “I” equals a dataset option “in=” in action while “O” means no. Use the above as illustration, the corresponding SAS codes behind look like</p>
<blockquote><p><font face="courier new"><b>data</b> temp;</font></p>
<p><font face="courier new">merge demog(in=a) siteinv(in=b);</font></p>
<p><font face="courier new">by sitecode;</font></p>
<p><font face="courier new">if b;</font></p>
<p><font face="courier new"><b>run</b>;</font></p>
</blockquote>
<p>This is so called “right outer join”. The combination of “I” and “O” in these two datasets can perform all the four types of join, one inner join and three outer join: </p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/in.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="in" border="0" alt="in" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/in_thumb.png" width="499" height="313" /></a>&#160;</p>
<p>As we could see, if no “Join” column specified, CDISC Express will perform inner join by default.</p>
<p>So far CDISC Express cannot support multiply merge keys. For example, the following file is illegal currently: </p>
<p>&#160;</p>
<p align="center">
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="138">
<p><b>Dataset </b></p>
</td>
<td valign="top" width="203">
<p><b>Merge Key</b></p>
</td>
</tr>
<tr>
<td valign="top" width="138">
<p>arm&#160;&#160;&#160; </p>
</td>
<td valign="top" width="203">
<p>siteid, grpno</p>
</td>
</tr>
<tr>
<td valign="top" width="138">
<p>armdescri </p>
</td>
<td valign="top" width="203">
<p>siteid, grpno</p>
</td>
</tr>
</tbody>
</table>
<p>The developer Romain indicated that such enhancements would be raised to the next round of product road map and he also proposed a work around. To use multiple keys for merging, we can create a temporary variable holding such multiple keys as a concatenation then this temporary variable can be used as a single merging key.</p>
<h3>4.3.4 Concatenating</h3>
<p>Above we discussed lots about “merge” operation in CDISC Express. This section dedicated for “set” operation. We already know how to “set” one dataset for referencing, but how to “set” multiple datasets, i.e, “Concatenating”?</p>
<p>Symmetrically, an “all” appears in “Dataset” column indicating merging operation, an “all (stack)” indicates concatenating operation:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image014.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image014" border="0" alt="clip_image014" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image014_thumb.jpg" width="493" height="396" /></a></p>
<p>The above file can be also translated to SAS codes for better understanding:</p>
<p> <span id="more-292"></span><br />
<blockquote>
<p><a name="OLE_LINK2"></a><a name="OLE_LINK1"><b><font face="Courier New">data</font></b></a><font face="Courier New"> height;</font></p>
<p><font face="Courier New">set vtsigns(where=(height ne <b>.</b>));</font></p>
<p><font face="Courier New">VSTESTCD=&quot;HEIGHT&quot;;</font></p>
<p><font face="Courier New">VSTEST =&quot;Height&quot;;</font></p>
<p><font face="Courier New">VSORRES =put(height,best12.);</font></p>
<p><font face="Courier New">VSORRESU=&quot;cm&quot;;</font></p>
<p><font face="Courier New">VSSTRESC=put(height,best12.);</font></p>
<p><font face="Courier New">VSSTRESN=height;</font></p>
<p><font face="Courier New">VSSTRESU=&quot;cm&quot;;</font></p>
<p><font face="Courier New"><b>run</b>;</font></p>
<p><font face="Courier New"><b>data</b> weight;</font></p>
<p><font face="Courier New">set vtsigns(where=(weight ne <b>.</b>));</font></p>
<p><font face="Courier New">VSTESTCD=&quot;WEIGHT&quot;;</font></p>
<p><font face="Courier New">VSTEST =&quot;Weight&quot;;</font></p>
<p><font face="Courier New">VSORRES =put(weight,best12.);</font></p>
<p><font face="Courier New">VSORRESU=&quot;kg&quot;;</font></p>
<p><font face="Courier New">VSSTRESC=put(weight,best12.);</font></p>
<p><font face="Courier New">VSSTRESN=weight;</font></p>
<p><font face="Courier New">VSSTRESU=&quot;cm&quot;;</font></p>
<p><font face="Courier New"><b>run</b>;</font></p>
<p><font face="Courier New"><b>data</b> vs;</font></p>
<p><font face="Courier New">set height weight;</font></p>
<p><font face="Courier New">STUDYID =study;</font></p>
<p><font face="Courier New">DOMAIN =&amp;domain;</font></p>
<p><font face="Courier New">USUBJID =%<b><i>CONCATENATE</i></b>(_variables=study sitecode patid);</font></p>
<p><font face="Courier New">VSSEQ =%<b><i>SEQUENCE</i></b>();</font></p>
<p><font face="Courier New"><b>.</b> <b>.</b> <b>.</b></font></p>
<p><font face="Courier New">run;</font></p>
</blockquote>
<p>4.3.5 Transpose</p>
<p>Clinical SAS programmers do lots of transpose operation to re-sharp the raw data to fit the CDISC standards. Currently there is no explicit guide in CDISC Express on how to transpose, but this is not the end of story.</p>
<p>There are two types of transpose:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image016.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image016" border="0" alt="clip_image016" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image016_thumb.jpg" width="492" height="207" /></a></p>
<blockquote><p>Type I: from a wide dataset (more variables, less observations) to a long dataset (less variables, more observations), e.g. transposing a one-row-per-subject datasets to a multiple-row-per-subject dataset </p>
</blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image018.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image018" border="0" alt="clip_image018" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image018_thumb.jpg" width="514" height="224" /></a></p>
<blockquote><p>Type II: from a long dataset (less variables, more observations) to a wide dataset (more variables, less observations), e.g. transposing a multiple-row-per-subject dataset to a one-row-per-subject datasets</p>
</blockquote>
<p>As good practices, in SAS we always use data steps with “output” statement to perform type I transpose and use PROC TRANSPOSE for type II. Although CDISC Express doesn’t support transpose operation in an explicit way, at least you can perform type I transpose and surprisingly we already saw it before!</p>
<p>Just back to section of concatenating. The example is taken from <b>C:Program FilesCDISC Expressstudiesexample2.</b></p>
<p>We can see the input data vtsigns is typical wide table (more variables, less observations):</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image021.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image021" border="0" alt="clip_image021" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image021_thumb.jpg" width="469" height="405" /></a></p>
<p>And the final domain VS is a typical long table (less variables, more observations):</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image023.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image023" border="0" alt="clip_image023" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image023_thumb.jpg" width="303" height="662" /></a></p>
<p>So obviously, such concatenating operation just did a wonderful type I transpose, from a wide table to a long table! More often, the compact SAS codes for type I transpose look like:</p>
<blockquote><p><font face="Courier New"><b>data</b> vs;</font></p>
<p><font face="Courier New">set vtsigns;</font></p>
<p><font face="Courier New">if height ne <b>.</b> then do;</font></p>
<p><font face="Courier New">VSTESTCD=&quot;HEIGHT&quot;;</font></p>
<p><font face="Courier New">VSTEST =&quot;Height&quot;;</font></p>
<p><font face="Courier New">VSORRES =put(height,best12.);</font></p>
<p><font face="Courier New">VSORRESU=&quot;cm&quot;;</font></p>
<p><font face="Courier New">VSSTRESC=put(height,best12.);</font></p>
<p><font face="Courier New">VSSTRESN=height;</font></p>
<p><font face="Courier New">VSSTRESU=&quot;cm&quot;;</font></p>
<p><font face="Courier New">output;</font></p>
<p><font face="Courier New">end;</font></p>
<p><font face="Courier New">if weight ne <b>.</b> then do;</font></p>
<p><font face="Courier New">VSTESTCD=&quot;WEIGHT&quot;;</font></p>
<p><font face="Courier New">VSTEST =&quot;Weight&quot;;</font></p>
<p><font face="Courier New">VSORRES =put(weight,best12.);</font></p>
<p><font face="Courier New">VSORRESU=&quot;kg&quot;;</font></p>
<p><font face="Courier New">VSSTRESC=put(weight,best12.);</font></p>
<p><font face="Courier New">VSSTRESN=weight;</font></p>
<p><font face="Courier New">VSSTRESU=&quot;cm&quot;;</font></p>
<p><font face="Courier New">output;</font></p>
<p><font face="Courier New">end;</font></p>
<p><font face="Courier New"><b>.</b> <b>.</b> <b>.</b></font></p>
<p><font face="Courier New">run;</font></p>
</blockquote>
<h3>4.3.6 All others: use macro!</h3>
<p>Now we discussed almost all the common data derivation techniques in programmers’ daily life and the corresponding implementation in CDISC Express. At least we have one question unsolved: how to perform type II transpose, i.e. from a long table to a wide table?</p>
<p>It would be an open question for the developers of the application. But we can also solve this problem in current framework: use macro, customized macro. You can use macros in “Expression” and “Dataset” column. Macro used in “Dataset” column returns a dataset, while macro in “Expression” column returns series of string: that’s the basic structure you should consider when customize your own macros. For more, you can reference the macros in <b>C:Program FilesCDISC Expressmacrosfunction_library</b>. For example, <font color="#ff0000">&amp;concatenate</font> used in “Expression” column; <font color="#ff0000">&amp;cpd_importlist</font> in “Dataset” column.</p>
<p>So it would be convenient to create temporary datasets using macros imbedded type II transpose operation in “Dataset” column. Every thing SAS can do, you can also implement it in CDISC Express. Just use macros, in “Expression” and “Dataset” column accordingly.<b></b></p>
<p>The raw data varies according to trial design and clinical data capture system and procedures. It is impossible and impractical to anticipate the CDISC SDTM converter such as CDISC Express to map all the data just clicking a button. The introducing of CDISC Express doesn’t keep programmers away. It just keeps most of the trivial work away from programmers’ daily life and let them more concentrated on creative work and be productive and efficient.</p>
<p>Following would be the close of such pages.</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/TobeContinued2.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="TobeContinued" border="0" alt="TobeContinued" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/TobeContinued_thumb2.jpg" width="240" height="181" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/07/04/dive-into-cdisc-express-4-data-manipulation-techniques-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dive into CDISC Express (3): Navigate mapping file</title>
		<link>http://www.jiangtanghu.com/blog/2011/07/03/dive-into-cdisc-express-3-navigate-mapping-file/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/07/03/dive-into-cdisc-express-3-navigate-mapping-file/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 13:19:18 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[CDISC Express]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/07/03/dive-into-cdisc-express-3-navigate-mapping-file/</guid>
		<description><![CDATA[Dive into CDISC Express (1): Introductory Dive into CDISC Express (2): Create a New Study 4. Step 2 of 6: Generate mapping file Generating template (blank) mapping file only needs pieces of effort by submitting generate_mapping_template.sas. The toughest one is to fill it with mapping rules according to specified study. 4.1 Get the blank template [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><a href="http://www.jiangtanghu.com/blog/2011/06/28/dive-into-cdisc-express-1-introductory/" target="_blank"><em>Dive into CDISC Express (1): Introductory</em></a></p>
<p><a href="http://www.jiangtanghu.com/blog/2011/07/02/dive-into-cdisc-express-2-create-a-new-study/" target="_blank">Dive into CDISC Express (2): Create a New Study</a></p>
</blockquote>
<h2>4. Step 2 of 6: Generate mapping file</h2>
<p>Generating template (blank) mapping file only needs pieces of effort by submitting <i>generate_mapping_template.sas</i>. The toughest one is to fill it with mapping rules according to specified study.</p>
<h3>4.1 Get the blank template mapping file (generate_mapping_template.sas)</h3>
<p>To get the blank template mapping file, just fill the one line of macro call in generate_mapping_template.sas:</p>
<blockquote><p><font face="Courier New">%createmapping(filespec=SDTM_Specs_3_1_1.xls, Dom=CM AE TV, req=YES, perm=YES, exp=YES);</font></p>
</blockquote>
<p>Also, you can specify SDTM implementation version, 3.1.1 or 3.1.2. For domains (&amp;Dom), DM, CO and SUPPQUAL will be created automatically; you should list others accordingly:</p>
<blockquote><p>SDTM 3.1.1: SV CM EX AE DS MH DV EG IE LB PE QS SC VS TV TI XD SU XR XS XE TR (Total: 22)</p>
<p>SDTM 3.1.2: AE CE CM DA DS DV EG EX FA IE LB MB MH MS PC PE PP QS SC SE SU SV TA TE TI TS TV VS (Total: 28)</p>
</blockquote>
<p>You should also choose the “CORE” variable (REQUIRED, PERMISSIBLE and EXPECTED) by triggering &amp;req, &amp;perm, and &amp;exp to “YES” or “NO”. Note that</p>
<blockquote><p>REQUIRED and EXPECTED variables must always be included (req=YES, exp=YES);</p>
<p>PERMISSIBLE variables included if needed (perm=YES or perm=NO)</p>
</blockquote>
<p>Submit <i>generate_mapping_template.sas</i> and you can get a blank template mapping file tmpmapping.xls in <b>C:Program FilesCDISC Expresstemp</b>. </p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image002.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="clip_image002" border="0" alt="clip_image002" align="left" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image002_thumb.jpg" width="478" height="436" /></a></p>
<p>Copy it to <b>C:Program FilesCDISC ExpressstudiesCLINCAPdocMapping file &#8211; working version</b> for example used for study “CLINCAP” and then fill all the blank columns (it NEEDS efforts!). </p>
<p>If this mapping file passes the validation process, a final version named mapping.xls will be copied automatically to <b>C:Program FilesCDISC ExpressstudiesCLINCAPdocMapping file &#8211; validated version</b> for later processing.</p>
<p>Note that if you already have some validated mapping file for other studies, it would serve as a good start rather than using the blank template from the scratch.</p>
<h2>4.2 Navigate mapping file</h2>
<p>Let’s take a look at the “real” worked mapping file for a demo study first, in <b>C:Program FilesCDISC Expressstudiesexample1docMapping file &#8211; working version</b>.</p>
<p>The first sheet is a welcome dashboard:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image004.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image004" border="0" alt="clip_image004" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image004_thumb.jpg" width="498" height="292" /></a></p>
<p>Then StudyMetadata sheet, a XML metadata specification used to generate define.xml. you need only add some information in “Values” column:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image006.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image006" border="0" alt="clip_image006" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image006_thumb.jpg" width="491" height="377" /></a></p>
<p>The FORMAT sheet:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image007.gif"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image007" border="0" alt="clip_image007" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image007_thumb.gif" width="501" height="324" /></a></p>
<p>Such format structure is similar with the one we export the format from a format catalog using</p>
<blockquote><p><font face="Courier New"><b>proc</b> <b>format</b> library=library cntlout=format_out;</font></p>
<p><font face="Courier New"><b>run</b>;</font></p>
</blockquote>
<p>In most production environment, programmers get formats from clinical data management group. If the entire formats are assigned into proper libraries (work or library), you don’t need to export such formats into this spreadsheet. Of course in the format sheet, you can type some customized format.</p>
<p>A typical domain sheet (AT LAST!) that needs efforts and our understanding of the software, DM for example:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image009.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image009" border="0" alt="clip_image009" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/clip_image009_thumb.jpg" width="480" height="439" /></a></p>
<p>From the ‘Dataset’ column, three raw datasets from <b>C:Program FilesCDISC Expressstudiesexample1source</b> needed to map into DM domain, demog, siteinv and eligassess. Note that you can use any data step options such as drop=, rename=, where= for the input datasets.</p>
<p>At the last of ‘Dataset’ column, “all” indicates that all the previous datasets mentioned above should be merged together for final processing. </p>
<p>In the ‘Merge Key’ column, ‘sitecode’ is designed to datasets demog and siteinv which means demog and siteinv should be merged by the common key, ‘sitecode’. </p>
<p>As we mentioned, all the previous datasets should be merged at last. But there is no common key settled in the ‘Merge Key’ column. It is a common rule: if no key specified for merge, USUBJID is used by default.</p>
<p>The third column is ‘CDISC variable’, which list all the needed variables according to implementation version. An important note: you do not need to implement all the variables according to the order as they appear in the blank template mapping file. In the previous blank file, “AGE” in DM domain is ordered in Line 12, but in this working file, “AGE” is calculated in the second last order. The variable order of final DM domain will be as same as the blank one. </p>
<p>It makes sense in practice. For example, the sequential variable, e.g. AESEQ is ordered after USUBJID, but you can only get the sequential number when all other variables well done. So SEQ variables are always computed in the final stage in a working mapping file.</p>
<p>“Expression” column specify the mapping rule from raw datasets to SDTM domains. Assignments, expressions and macro calls (rooted in <b>C:Program FilesCDISC Expressmacrosfunction_library</b>) are allowed in this column and most of them are straightforward. We will discuss more in the following section.</p>
<p>Sum up, we can “translate” this mapping sheet to SAS codes for better understanding of CDISC Express architecture: </p>
<p> <span id="more-266"></span><br />
<blockquote>
<p>data tem1;</p>
<p>&#160;&#160;&#160; set demog;</p>
<p>&#160;&#160;&#160; STUDYID=study;</p>
<p>&#160;&#160;&#160; DOMAIN =&amp;domain;</p>
<p>&#160;&#160;&#160; USUBJID=%CONCATENATE(_variables=study sitecode patid);</p>
<p>&#160;&#160;&#160; SUBJID =patid;</p>
<p>RFSTDTC=%D_RFST(_dataset=trtinf,_date=trtinfdt,_key=patid,_ivrsds=ivrs,_ivrsdt=randdat);</p>
<p>RFENDTC=%SORTLOOKUP(_dataset=disc,_variable=fupdat,_key=patid,_sort_variable=fupdat,_keep=last);</p>
<p>&#160;&#160;&#160; SITEID =sitecode;</p>
<p>&#160;&#160;&#160; INVID =invcode;</p>
<p>&#160;&#160; BRTHDTC=%FORMAT(_variable=brthdat,_format=yymmdd10);</p>
<p>&#160;&#160; SEX =%GENDER(_gender=sex);</p>
<p>&#160;&#160; RACE =%D_RACE();</p>
<p>&#160;&#160; ETHNIC =upcase(ethnic);</p>
<p>&#160;&#160; COUNTRY=&quot;USA&quot;;</p>
<p>&#160;&#160;&#160; DMDTC =%FORMAT(_variable=formdat,_format=yymmdd10);</p>
<p>&#160;&#160; ARMCD =&quot;&quot;;</p>
<p>&#160;&#160;&#160; ARM =&quot;&quot;;</p>
<p>run;</p>
<p>&#160;</p>
<p>data tem2;</p>
<p>&#160;&#160;&#160; merge tem1 siteinv(drop=invcode);</p>
<p>&#160;&#160;&#160; by sitecode;</p>
<p>&#160;&#160;&#160; INVNAM=trim(lname)||&quot;,&quot;||fname;</p>
<p>run;</p>
<p>&#160;</p>
<p>data dm;</p>
<p>&#160;&#160;&#160; merge tem2 eligassess;</p>
<p>&#160;&#160;&#160; by patid;</p>
<p>&#160; AGE =year(infcondt)-year(brthdat)-(month(brthdat)&gt;month(infcondt))-(month(brthdat)=month(infcondt) and day(brthdat)&gt;day(infcondt));</p>
<p>AGEU=%CONVERTIF(<a href="mailto:_if_variable=@AGE,_if_value=.,_then_value">_if_variable=@AGE,_if_value=.,_then_value</a>=, _else_value=YEARS);</p>
<p>run;</p>
</blockquote>
<p>Following will be some explore the data manipulation techniques in CDISC Express, such as merge, transpose.</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/TobeContinued1.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="TobeContinued" border="0" alt="TobeContinued" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/TobeContinued_thumb1.jpg" width="246" height="187" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/07/03/dive-into-cdisc-express-3-navigate-mapping-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dive into CDISC Express (2): Create a New Study</title>
		<link>http://www.jiangtanghu.com/blog/2011/07/02/dive-into-cdisc-express-2-create-a-new-study/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/07/02/dive-into-cdisc-express-2-create-a-new-study/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 13:21:22 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[CDISC Express]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/07/02/dive-into-cdisc-express-2-create-a-new-study/</guid>
		<description><![CDATA[Dive into CDISC Express (1): Introductory 3. Step 1 of 6: Create a new study (create_new_study.sas) Open create_new_study.sas in C:Program FilesCDISC Expressprograms, you can see only one line of a macro call: %addnewstudy(studyname=my new study); Just assign a study name to the macro variable, &#38;studyname, e.g, “CLINCAP”: %addnewstudy(studyname= CLINCAP); Submit the codes, you can find [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><a href="http://www.jiangtanghu.com/blog/2011/06/28/dive-into-cdisc-express-1-introductory/" target="_blank"><em>Dive into CDISC Express (1): Introductory</em></a></p>
</blockquote>
<h4>3. Step 1 of 6: Create a new study (<i>create_new_study.sas</i>)</h4>
<p>Open <i>create_new_study.sas</i> in <b>C:Program FilesCDISC Expressprograms</b>, you can see only one line of a macro call:</p>
<blockquote><p><font face="Courier New">%addnewstudy(studyname=my new study);</font></p>
</blockquote>
<p>Just assign a study name to the macro variable, <font color="#ff0000">&amp;studyname,</font> e.g, “CLINCAP”:</p>
<blockquote><p><font face="Courier New">%addnewstudy(studyname= CLINCAP);</font></p>
</blockquote>
<p>Submit the codes, you can find a folder named “CLINCAP” with the same structure as the two demo studies imbedded in this application(example1 and example2) in <b>C:Program FilesCDISC Expressstudies</b>, <i>see</i>(the left and right panels are folders and files before and after the execution of <i>create_new_study.sas</i>. The following the same): </p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/new.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="new" border="0" alt="new" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/new_thumb.png" width="516" height="347" /></a> </p>
<blockquote><p>Folder ‘<strong>doc</strong>’ is used to hold the mapping files;</p>
<p>Folder ‘<strong>log</strong>’ used to hold log files generated by following macro calls, such as generating SDTM domains;</p>
<p>Folder ‘<strong>results</strong>’ and its subfolder will hold all the outputs, such as define.xml, SAS transport file, validation reports and SDTM datasets;</p>
<p>Folder ‘<strong>source</strong>’ holds all the clinical raw data used as inputs for SDTM domains;</p>
<p>Folder ‘<strong>tempdata</strong>’ holds all the temporary datasets generated by following macro calls.</p>
</blockquote>
<p>Also, a configuration file named <i>CLINCAP_configuration.sas</i> put in <b>C:Program FilesCDISC Expressprogramsstudy configuration</b>. This file is used to set some study level parameters, such as lab and toxicity specifications (details in <b>C:Program FilesCDISC ExpressspecsLab specs</b>). </p>
<p>Two versions of SDTM implementation guides are supported by CDISC Express, CDISC SDTM Implementation Guide Version 3.1.1 and Version 3.1.2. You can find the corresponding specification files in <b>C:Program FilesCDISC ExpressspecsSDTM specs</b>:</p>
<blockquote><p>SDTM_Specs_3_1_1.xls</p>
<p>SDTM_Specs_3_1_2.xls</p>
</blockquote>
<p>The choosing of SDTM implementation version is also coded in the configuration file, in Line 41:</p>
<blockquote><p><font face="Courier New">%LET SDTMSPECFILE=SDTM_Specs_3_1_1.xls;</font></p>
</blockquote>
<p>Version 3.1.1 is used by default. You can also choose Version 3.1.2 if needed:</p>
<blockquote><p><font face="Courier New">%LET SDTMSPECFILE=SDTM_Specs_3_1_2.xls;</font></p>
</blockquote>
<p>Assign a study name and choose a SDTM implementation version. That’s all needed in step 1. Let’s take few minutes to navigate the software. CDISC Express is a set of macros and Excel files. It is important to know the file structure first:</p>
<blockquote><p><b>C:Program FilesCDISC Express</b></p>
<p>├─<strong>documentation</strong> :FAQ, Quick Start, User Guide</p>
<p>├─<strong>macros</strong></p>
<p>│ ├─ClinMap :system level macros</p>
<p>│ └─function_library :study level macros</p>
<p>├─<strong>programs</strong> :&quot;action taken&quot; macros</p>
<p>│ ├─study configuration :study parameters configuration</p>
<p>├─<strong>SDTM Validation</strong> :For validation of SDTM domains</p>
<p>│ └─study1</p>
<p>├─<strong>specs</strong> :specification files</p>
<p>│ ├─Excel engine :ExcelXP tagset file</p>
<p>│ ├─Lab specs :lab and toxicity</p>
<p>│ ├─Mapping validation :validation rules</p>
<p>│ ├─SDTM specs :hold two versions of SDTM implementation</p>
<p>│ └─SDTM Terminology :SDTM codelist(including NCI terminology)</p>
<p>├─<strong>studies</strong></p>
<p>│ ├─example1</p>
<p>└─<strong>temp</strong> :hold temporary data not specified to any studies</p>
</blockquote>
<p>As we already got, all the “action taken” programs such as <i>create_new_study.sas</i> are located in <b>C:Program FilesCDISC Expressprograms</b>. In <i>create_new_study.sas</i>, one macro is called, <i><font color="#ff0000">%addnewstudy</font></i>, which is in <b>C:Program FilesCDISC ExpressmacrosClinMap</b>.</p>
<p>Note that in <b>C:Program FilesCDISC Expressmacros</b>, there are two sets of macros in different folders:</p>
<blockquote><p><b>C:Program FilesCDISC ExpressmacrosClinMap</b>: this folder holds all “system” level macros used by the application only. No modification encouraged.</p>
<p><b>C:Program FilesCDISC Expressmacrosfunction_library</b>: macros used for mapping among studies. You can also create you own macro in this folder. The application imbedded macros also documented in user guide.</p>
</blockquote>
<p>Following will be the most important part, mapping file.</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/TobeContinued.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="TobeContinued" border="0" alt="TobeContinued" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/07/TobeContinued_thumb.jpg" width="240" height="181" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/07/02/dive-into-cdisc-express-2-create-a-new-study/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ADJECTIVE Encounters</title>
		<link>http://www.jiangtanghu.com/blog/2011/07/02/adjective-encounters/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/07/02/adjective-encounters/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 02:51:57 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[adjective]]></category>
		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/07/02/adjective-encounters/</guid>
		<description><![CDATA[Really she is the strangest creature in the world, far from heroic, variable as a weathercock, “bashful, insolent; chaste, lustful; prating, silent; laborious, delicate; ingenious, heavy; melancholic, pleasant; lying, true; knowing, ignorant; liberal, covetous, and prodigal”— in short, so complex, so indefinite, … &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211;Virginia Woolf, The Common Reader, First Series (1925) I don’t know [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p>Really she is the strangest creature in the world, far from heroic, variable as a weathercock, “<strong>bashful, insolent; chaste, lustful; prating, silent; laborious, delicate; ingenious, heavy; melancholic, pleasant; lying, true; knowing, ignorant; liberal, covetous, and prodigal</strong>”— in short, so complex, so indefinite, …</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211;Virginia Woolf, <em>The Common Reader</em>, First Series (1925)</p>
</blockquote>
<p>I don’t know if Ernest Hemingway is still one of the recognized dominant writers in colleges English education. At least once&#160; a time he WAS. In an extreme form, he used only nouns and verbs to construct sentences.</p>
<p>In my personal English education(as Second Language), admittedly that there is also an absence of adjectives. It is just wonderful, nice, great, cool, weird, awesome,&#160; and all in all, everything is OK or not OK, good or not good. In writing, my sentences lack of tone and shades. I write only technical articles in English and people can often well manage the so-called technical borings when acquiring information, knowledge, and opinions. </p>
<p>In reading when I try to just read for the sake of reading itself, I also find it is difficult to dig into pure literature pages where rich adjectives assembled heavily. I only read smoothly technical papers. So when I happened to have a paper book of Woolf and also loaded a corresponding public domain e-book in Kindle, I read the most intensive instances of adjectives ever. It is really totally different experiences. </p>
<p>There would be three types in any languages. For English: </p>
<blockquote><p>in the top, pure literature, Shakespeare-like; </p>
<p>middle, which could be called the universal or international English; it is be the dominate English among nations in business, technology and even academia; most of the popular writers also utilize such sort of English to extent their global reputation;</p>
<p>bottom, the street language, slangs, talk-show. </p>
</blockquote>
<p>I penetrate the English through the middle like almost all of the ESL learners. It is the most convenient and effective way in a very short run. But for a leap in long run, some friends just suggest that I should go down the street or climb up to the top. Ok I am on the way. Virginia Woolf is the first stop and I keep the first notes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/07/02/adjective-encounters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dive into CDISC Express (1): Introductory</title>
		<link>http://www.jiangtanghu.com/blog/2011/06/28/dive-into-cdisc-express-1-introductory/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/06/28/dive-into-cdisc-express-1-introductory/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 13:24:33 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[CDISC Express]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/06/28/dive-into-cdisc-express-1-introductory/</guid>
		<description><![CDATA[Recently I did for my personal project some research on Clinovo’s open source application, CDISC Express, a SAS application based on Excel framework designed to map clinical data to CDISC SDTM domains automatically. Not perfect yet, but it is easily understandable and practically usable after few hours’ of exploration of user guide. And most important, [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I did for my personal project some research on <a href="http://www.clinovo.com" target="_blank">Clinovo</a>’s open source application, <a href="http://www.clinovo.com/cdisc" target="_blank">CDISC Express</a>, a SAS application based on Excel framework designed to map clinical data to CDISC SDTM domains automatically. Not perfect yet, but it is easily understandable and practically usable after few hours’ of exploration of user guide. And most important, it is on the right way: an automatic CDISC converter is the magic weapon in almost every clinical programmer’s dream.</p>
<p>CDISC Express is the first and only practically usable open source CDISC converter I even met. I wrote <a href="http://www.jiangtanghu.com/blog/2011/05/16/cdisc-express-a-glance" target="_blank">a post a month ago</a> when I first tested it with great interests and reported some issues to its <a href="http://cdiscsupport.clinovo.com/" target="_blank">fix system</a>. Then I also had the great opportunity to discuss the software via email with its core developer, Romain Miralles. This post is just my personal notes on how to use and dig into the software, and will be best serve as a working documentation. You can return to me for any questions and comments.</p>
<p>By the way, there is an opportunity for your practicing and you will also have a change to win an iPad2 from Clinovo’s CDISC Express Contest:</p>
<blockquote><p><a href="http://www.clinovo.com/cdisc/game">http://www.clinovo.com/cdisc/game</a></p>
</blockquote>
<p>The due day is July 15<sup>th</sup> and I already submitted my work. That’s fun.</p>
<h1>1. Download and Installation</h1>
<p>You can get CDISC Express for free in</p>
<blockquote><p><a href="http://www.clinovo.com/cdisc/download">http://www.clinovo.com/cdisc/download</a></p>
</blockquote>
<p>It is a window application and will be installed by default in </p>
<blockquote><p><b>C:Program FilesCDISC Express</b></p>
</blockquote>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/06/clip_image0024.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image002[4]" border="0" alt="clip_image002[4]" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/06/clip_image0024_thumb.jpg" width="420" height="333" /></a></p>
<p>After installation, this path will be coded as a macro variable <font color="#ff0000">&amp;CDISCPATH</font> in the following six SAS files which are all located in <b>C:Program FilesCDISC Expressprograms</b>:</p>
<blockquote><p><i>create_new_study.sas</i></p>
<p><i>generate_Definexml.sas</i></p>
<p><i>generate_mapping_template.sas</i></p>
<p><i>generate_SDTM.sas</i></p>
<p><i>Validate_Mapping_File.sas</i></p>
<p><i>Validate_SDTM_Domains.sas</i></p>
</blockquote>
<p>The macro variable reads as</p>
<blockquote><p><font face="Courier New">%LET CDISCPATH = C:Program FilesCDISC Express;</font></p>
</blockquote>
<p>If you change the destination folder at the installation stage, e.g., to <b>D:CDISC Express</b>, the value of the macro variable <font color="#ff0000">&amp;CDISCPATH</font> will be changed accordingly in the six files mentioned before:</p>
<blockquote><p><font face="Courier New">%LET CDISCPATH = D:CDISC Express;</font></p>
</blockquote>
<p>Note that if you want copy the whole folder of files to another destination, you should at least manually change the value of <font color="#ff0000">&amp;CDISCPATH</font> in such six files or add some codes to capture the path accordingly. From this point of view, the path setting of CDISC Express is not completely portable. Recommend that if you have such needs, just re-install the software in any destination you want. It will not write any records into registry and you can have many copies in one machine.</p>
<p>The following discussion assumes the software roots in <b>C:Program FilesCDISC Express.</b></p>
<h1><b>2. </b><b>Working Flow</b></h1>
<p>You can follow all the 6 action steps one by one coded in</p>
<blockquote><p><b>C:Program FilesCDISC Expressprograms</b></p>
</blockquote>
<h5>1) Create a new study (<i>create_new_study.sas</i>)</h5>
<p>Simple and easy. Just assign a new study name in a macro call and run.</p>
<h5>2) Generate mapping file (<i>generate_mapping_template.sas</i>)</h5>
<p>This is the critical and most time consuming part. You should design mapping rules for every domain needed in Excel spreadsheets (the MAPPING FILE). If done, all other tasks, such as generate SDTM datasets, SAS transport files, define.xml and validation, can be well done by just clicking<a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/06/clip_image0034.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image003[4]" border="0" alt="clip_image003[4]" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/06/clip_image0034_thumb.gif" width="37" height="33" /></a> buttons </p>
<p>.</p>
<h5>3) Validate mapping file (<i>Validate_Mapping_File.sas</i>)</h5>
<p>For validating the mapping file, just click the button. As mentioned, the most important work is designing mapping file. It would be back and forth to design mapping file and validate it.</p>
<h5>4) Generate SDTM datasets (<i>generate_SDTM.sas</i>)</h5>
<p>If mapping file is OK, click the button.</p>
<h5>5) Validate SDTM datasets (<i>Validate_SDTM_Domains.sas</i>)</h5>
<p>Click the button.</p>
<h5>6) Generate Define.xml (<i>generate_Definexml.sas</i>)</h5>
<p>Click the button.</p>
<p>Following part will dig into the software step by step.</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/06/TobeContinued.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="TobeContinued" border="0" alt="TobeContinued" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/06/TobeContinued_thumb.jpg" width="240" height="181" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/06/28/dive-into-cdisc-express-1-introductory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS Global Forum 2011: Personal Notes</title>
		<link>http://www.jiangtanghu.com/blog/2011/06/04/sgf2011/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/06/04/sgf2011/#comments</comments>
		<pubDate>Sat, 04 Jun 2011 08:05:46 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Las Vegas]]></category>
		<category><![CDATA[SAS Global Forum]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/06/04/sgf2011/</guid>
		<description><![CDATA[It’s wonderful. It’s awful. It’s wonderfully awful and awfully wonderful. –Frommer’s Las Vegas 2010 June at last! June, July and August (great thanks to French colleagues!) would be the best time to prepare a paper for next year’s SAS Global Forum (SGF, 2012 in Orlando, Florida). SGF2012 will hold at the “real” Walt Disney at [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p>It’s wonderful. It’s awful. It’s wonderfully awful and awfully wonderful. –<em>Frommer’s Las Vegas 2010</em></p>
</blockquote>
<p>June at last! June, July and August (great thanks to <strong>French</strong> colleagues!) would be the best time to prepare a paper for next year’s SAS Global Forum (SGF, <a href="http://support.sas.com/events/sasglobalforum/2012/index.html" target="_blank">2012 in Orlando, Florida</a>). SGF2012 will hold at the “real” Walt Disney at Orlando against Las Vegas, the adults’ Walt Disney for SGF2011. Lots of children will be anticipated to register as guests for this meeting and I may contribute one:).</p>
<p>Before moving to 2012, I need to add some notes on 2011. It was my first time to present at SAS Global Forum, my first time to attend the Forum and even my first time out of China. First of all, I’d like to extend my special thanks to </p>
<p>Nancy Brucken of i3, section chair of Planning and Support who served as my key contact of the conference committee for all the coordination stuff</p>
<p>Duke Owen of Westat, my mentor of this year’s <a href="http://support.sas.com/events/sasglobalforum/2011/mentor.html" target="_blank"><strong>SAS Global Forum Presenter Mentoring Program</strong></a><strong>. </strong>We had intensive communication via email, telephone and WebEx, <em>see</em> </p>
<blockquote><p>01/25/2011 initial call.&#160; review abstract and title      <br />02/01/2011 final abstract submission, no call       <br />02/08/2011 no call &#8211; Chinese New Year celebration continues       <br />02/15/2011 call &#8211; review paper       <br />02/22/2011 call &#8211; finalize paper for submission       <br />02/25/2011 submission of pdf (on or before this date)       <br />03/01/2011 call &#8211; first draft of slides, or at least the outline of your plan       <br />03/08/2011 call &#8211; refine the slides and preview of what your script for presentation       <br />03/15/2011 call &#8211; &quot;live&quot; presentation for Duke.&#160;&#160; This can be done just on our pc&#8217;s or as a WebEx       <br />03/22/2011 call &#8211; WebEx for a wider audience.&#160; We can discuss who to invite and adjust time as needed.       <br />03/29/2011 call &#8211; Finalize slides/script for you to send to Nancy Brucken       <br />04/02/2011 Duke arrives in Las Vegas       <br />04/03/2011 John arrives in Las Vegas (I think)       <br />04/04/2011 Rehearsal room practice and final slides to Nancy       <br />04/05/2011 Show Time:&#160; Tuesday 3:00-3:20 pm&#160;&#160;&#160; ,&#160; drinks on me at the kickback       <br />04/06/2011 It is all in the past       <br />04/08/2011 Duke leaves Las Vegas</p>
</blockquote>
<p>Last but not least, I also want to thank my boss and my company to support and sponsor me the trip. It is not a world-peace speech. Economy is tough worldwide and few SAS programmers in China could get the opportunity to attend the Forum. In my observation, even in US, relative fewer programmers in pharmaceutical company and other industries attended SGF2011 compared former years. </p>
<p>That might be also one of the reasons why in this year, SAS Institute had a stronger presence at Las Vegas. For me, it’ not bad. I had the opportunity to meet and talk with some of my former colleagues at SAS R&amp;D Beijing and Cary (even when we’re all in Beijing, we have few chance to meet together). What’s more, SGF2011 had wonderful <strong>SAS Support and Demo Area</strong> and <strong>Hands-on Workshop </strong>fully<strong> </strong>supported by the Institute. It was definitely great opportunity to learn almost all parts of SAS system by talking with R&amp;D staff directly. Admitted that I spent more time in the demo room instead of the user presentation room (I can read all the user papers after the Forum, but there is only one chance I can talk with R&amp;D staff about the software itself!)</p>
<p>My personal presence at Las Vegas:</p>
<p>1.&#160; Monday, April 4, attended the pre-conference training, <strong><em>Data Simulation for Evaluation Statistical Methods in SAS</em></strong> by <a href="http://blogs.sas.com/iml/" target="_blank">Rick Wicklin</a>. Rick is a famous blog writer on IML(<em><a href="http://blogs.sas.com/iml/" target="_blank">The DO Loop</a></em>), SAS’s matrix language. His blog is just as popular as Chris Hemedinger’s <em><a href="http://blogs.sas.com/sasdummy/" target="_blank">The SAS Dummy</a></em>, a blog on SAS Enterprise Guide. It’s wonderful to talk with these two bloggers face to face!</p>
<p>2. Tuesday, April 5, I was invited to a panel discussion on <strong>SAS Business Visualization and Mobile Computing</strong> in a SAS BI Product Development Focus Group, hosted by 3 SAS directors, developer Justin Choy, product manager Pyan Schmidt and marketing Jo Fisher. Visualization and mobile computing (in iPad, iPhone, …) are two of most hottest topics in Las Vegas. This Focus Group also wanted to gather feedbacks from end users.</p>
<p>3. Tuesday, April 5, my presentation, <em><a href="http://support.sas.com/resources/papers/proceedings11/211-2011.pdf" target="_blank">Work Smarter Rather than Harder- Tools for Growing up A SAS® Programmer</a></em>.</p>
<p>4. Wednesday, April 6, <strong>one or two seconds</strong> personal show up in Gregory Nelson and Neil Howard’s featured presentation in lunch, <strong><em>Revenge of the Semicolon People: Business Analytics at Work</em></strong>.&#160; !!!!! </p>
<p>That time Duke and me were in the same table and Greg and Neil were just showing they slides. Suddenly I found a picture of Duke, Shane and me was in the presentation for SGF2011 after some historical pictures for 2010. It just flashed past but it was enough to excite around the table!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/06/04/sgf2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CDISC Express: A Glance</title>
		<link>http://www.jiangtanghu.com/blog/2011/05/16/cdisc-express-a-glance/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/05/16/cdisc-express-a-glance/#comments</comments>
		<pubDate>Sun, 15 May 2011 16:48:31 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/05/16/cdisc-express-a-glance/</guid>
		<description><![CDATA[This weekend I tested an application that can automatically transform clinical data to CDISC SDTM compliant datasets(3.1.1 and 3.1.2), CDISC Express of Clinovo. According to its license statements, you can download it for free and for personal use only. The core of CDISC Express is an Excel configuration file called Mapping File which defines all [...]]]></description>
				<content:encoded><![CDATA[<p>This weekend I tested an application that can automatically transform clinical data to CDISC SDTM compliant datasets(3.1.1 and 3.1.2), <a href="http://www.clinovo.com/cdisc" target="_blank">CDISC Express</a> of <a href="http://www.clinovo.com/" target="_blank">Clinovo</a>. According to its license statements, you can download it for free and for personal use only.</p>
<p>The core of CDISC Express is an Excel configuration file called Mapping File which defines all the metadata and mapping rules required by CDISC SDTM standard. Then a set of SAS macros is used to</p>
<ul>
<li>validate the SDTM mapping file </li>
<li>generate SDTM datasets </li>
<li>generate define.xml file </li>
<li>validate the SDTM datasets </li>
</ul>
<p>I found its architecture is simple, concise and powerful. When mentioned “simple”, I mean it is easy to understand and implement. It is still in its version 1.0, I wish following enhancements in the future according my personal user experiences: </p>
<ul>
<li>More web browsers supports for define.xml file and documentation </li>
<li><strong>More merge or set types</strong> </li>
<li>Debug mechanism enhancement </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/05/16/cdisc-express-a-glance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sail for Las Vegas!</title>
		<link>http://www.jiangtanghu.com/blog/2011/03/19/sas-web2-0/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/03/19/sas-web2-0/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 13:53:48 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[SGF]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/03/19/sas-web2-0/</guid>
		<description><![CDATA[look to the master, follow the master, walk with the master, see through the master, become the master. The SAS Global Forum 2011 (Apr 4-7, Las Vegas) papers are now available on line: http://support.sas.com/resources/papers/proceedings11/TOC.html There are lots of Web 2.0 elements in this year’s SGF, including a Twitter hashtag #SASGF11, a Facebook account, a blog, [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p>look to the master,<br />
follow the master,<br />
walk with the master,<br />
see through the master,<br />
become the master.</p></blockquote>
<p>The SAS Global Forum 2011 (Apr 4-7, Las Vegas) papers are now available on line:</p>
<p><a href="http://support.sas.com/resources/papers/proceedings11/TOC.html">http://support.sas.com/resources/papers/proceedings11/TOC.html</a></p>
<p>There are lots of Web 2.0 elements in this year’s SGF, including a Twitter hashtag <a href="http://twitter.com/SASGlobalForum" target="_blank">#SASGF11</a>, <a href="www.facebook.com/SASGlobalForum" target="_blank">a Facebook account</a>, <a href="blogs.sas.com/sgf" target="_blank">a blog</a>, <a href="http://www.linkedin.com/groups/SAS-Global-Forum-2011-2993852" target="_blank">a LinkedIn group</a>, and of course, <a href="sasCommunity.org" target="_blank">sasCommunity.org</a>. I will give a talk at this conference (<a href="http://sgf2011.confnav.com/sgf2011/web/sessions/detail.html?id=20101023091009653775000000" target="_blank">Tuesday, April 5, 05:30- 05:50 PM, Promenade Level, Neopolitan IV</a>) to discuss how to get informed with little efforts from such multiple channels for SAS programmers using Gmail and Good Reader to create a personal information portal. That is part of my first SAS paper, <em><a href="http://support.sas.com/resources/papers/proceedings11/211-2011.pdf" target="_blank">Work Smarter Rather than Harder- Tools for Growing up A SAS® Programmer</a>.</em></p>
<p>It will also be my first presence in SGF. Just can’t wait to walk with SAS masters there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/03/19/sas-web2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Too Big to Be Accurate(1): Which is the Most Powerful Calculator in the World?</title>
		<link>http://www.jiangtanghu.com/blog/2011/01/22/big-numbers/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/01/22/big-numbers/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 09:05:17 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Approximation]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[factorial]]></category>
		<category><![CDATA[Google Calculator]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[recursion]]></category>
		<category><![CDATA[Windows Calculator]]></category>
		<category><![CDATA[WolframAlpha]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/01/22/big-numbers/</guid>
		<description><![CDATA[Calculate the factorial of 171 (171!)? Just TRY! It is equal to 171*170*169*….2*1. 1. Google calculator As Google fanatics, I first try to search the answer via Google: Whoops, nothing interested returned! Type “170!” and get the output: Why kinda things happened in this calculator? 171! is just equal to 171*170!. 2. Excel Switch to [...]]]></description>
				<content:encoded><![CDATA[<p>Calculate the factorial of 171 (171!)? Just TRY! It is equal to 171*170*169*….2*1.</p>
<h3>1. Google calculator</h3>
<p>As Google fanatics, I first try to search the answer via Google:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/Google171.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Google171" border="0" alt="Google171" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/Google171_thumb.png" width="336" height="116" /></a> </p>
<p>Whoops, nothing interested returned! Type “170!” and get the output:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/Google170.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Google170" border="0" alt="Google170" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/Google170_thumb.png" width="244" height="110" /></a> Why kinda things happened in this calculator? 171! is just equal to 171*170!.</p>
<h3>2. Excel</h3>
<p>Switch to Excel spreadsheet. Function fact(*) used:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/Excel170.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Excel170" border="0" alt="Excel170" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/Excel170_thumb.png" width="228" height="66" /></a> <a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/Excel171.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Excel171" border="0" alt="Excel171" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/Excel171_thumb.png" width="244" height="64" /></a> Oo, interesting. The same. </p>
<h3>3. SAS</h3>
<p>Google and Excel may be the niche players in calculators’ family. Why not try to use some programming languages?</p>
<p> <span id="more-216"></span>
<p>As a SAS programmer, my handy tool is SAS of course.</p>
<p>First, I use <strong>SAS data step</strong> with its build-in function fact(*):</p>
<blockquote><p><font face="Courier New">data _null_;        <br />&#160;&#160;&#160; x=fact(170);         <br />&#160;&#160;&#160; y=fact(171);         <br />&#160;&#160;&#160; put x= y=;         <br />run;</font></p>
</blockquote>
<p>and I get</p>
<blockquote><p>NOTE: Invalid argument to function FACT at line 49 column 7.      <br /><font color="#ff0000">x=7.257416E306 y=.</font>       <br /><font color="#ff0000">x=7.257416E306 y=. _ERROR_=1 _N_=1</font>       <br />NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to missing values.</p>
</blockquote>
<p>Expected or unexpected? I don’t know how this fact(*) function is defined, and&#160; try to define a function to calculate the factorials by myself. In SAS 9.2, you can use <strong>PROC FCMP</strong>(also available at 9.1.3 as a experimental procedure):</p>
<blockquote><p><font face="Courier New">proc fcmp outlib = work.funcs.math ;        <br />&#160;&#160;&#160; function factorial(k) ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if k = 0 then return(1) ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; z = k ; *preserve k ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; x = factorial(k-1) ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; k = z ; *recover k ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; k = k * x ;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return(k) ;         <br />&#160;&#160;&#160; endsub ;         <br />quit ; </font></p>
<p><font face="Courier New">options cmplib=work.funcs ; </font></p>
</blockquote>
<p>Use this self-defined function to get 170!</p>
<blockquote><p><font face="Courier New">proc fcmp ;        <br />&#160;&#160;&#160; x = factorial (170) ;         <br />&#160;&#160;&#160; put x = ;         <br />run ; </font></p>
</blockquote>
<p>The FCMP procedure returns</p>
<blockquote><p>x=7.257416E306</p>
</blockquote>
<p>Try to calculate 171! ?</p>
<blockquote><p><font face="Courier New">proc fcmp ;        <br />&#160;&#160;&#160; y = factorial (171) ;         <br />&#160;&#160;&#160; put y = ;         <br />run ;</font></p>
</blockquote>
<p>Just get the overflow error. The interaction stops at 170!:</p>
<blockquote><p>ERROR: An overflow occurred during execution in function &#8216;factorial&#8217; in statement number 7 at&#160;&#160; line 10 column 1.      <br />&#160;&#160;&#160;&#160;&#160;&#160; The statement was:       <br />&#160;&#160;&#160; 1&#160;&#160;&#160;&#160;&#160; (10:1)&#160;&#160;&#160; k = (k=171) * (<font color="#ff0000">x=7.257416E306</font>)</p>
</blockquote>
<p>The above function definitions use recursion. Recursion may have some limitation on efficiency. We could try the loop without recursion. <strong>SAS/IML</strong> doesn’t support recursion. Let SAS/IML to the court:</p>
<blockquote><p><font face="Courier New">proc iml;        <br />&#160;&#160;&#160; start factorial (n);         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; fact=1;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; do i=1 to n;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; fact=fact*i;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; end;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return (fact);         <br />&#160;&#160;&#160; finish factorial;</font></p>
<p><font face="Courier New">&#160;&#160;&#160; x= factorial (170);        <br />&#160;&#160;&#160; print x;</font></p>
<p><font face="Courier New">&#160;&#160;&#160; y= factorial (171);        <br />&#160;&#160;&#160; print y;         <br />quit;</font></p>
</blockquote>
<p>Again, I get 170!</p>
<blockquote><p>&#160;&#160;&#160; x      <br />7.257E306</p>
</blockquote>
<p>and a overflow error for 171!</p>
<blockquote><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; y= factorial (171);      <br />ERROR: Overflow error in *.</p>
</blockquote>
<p>Turing, Von Neumann and Tony, what happened?</p>
<h3>4. R</h3>
<p>When SAS failed, lots of voices pop up: use R! OK, Rction!</p>
<blockquote><p><font color="#ff0000">&gt; x=factorial(170);x</font>       <br />[1] 7.257416e+306       <br /><font color="#ff0000">&gt; y=factorial(171);y</font>       <br />Warning message:       <br />In factorial(171) : value out of range in &#8216;gammafn&#8217;       <br />[1] Inf</p>
</blockquote>
<h3>5. C++</h3>
<p>I don’t want to lose my patience. Think C++(use both recursive and non-recursive methods):</p>
<blockquote><p><font face="Courier New">#include &lt;iostream&gt;        <br />using namespace std; </font></p>
<p><font face="Courier New">double factRecursive(double num);        <br />double factNonRecursive(double num); </font></p>
<p><font face="Courier New">int main()        <br />{         <br />&#160;&#160;&#160; cout&lt;&lt;endl;&#160;&#160;&#160; <br />&#160;&#160;&#160; cout&lt;&lt;&quot;Recursive: the factorial of 170 is &quot;&lt;&lt;factRecursive(170)&lt;&lt;endl;         <br />&#160;&#160;&#160; cout&lt;&lt;&quot;Recursive: the factorial of 171 is &quot;&lt;&lt;factRecursive(171)&lt;&lt;endl;         <br />&#160;&#160;&#160; cout&lt;&lt;endl;&#160;&#160; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; cout&lt;&lt;&quot;NonRecursive: the factorial of 170 is &quot;&lt;&lt;factNonRecursive(170)&lt;&lt;endl;        <br />&#160;&#160;&#160; cout&lt;&lt;&quot;NonRecursive: the factorial of 171 is &quot;&lt;&lt;factNonRecursive(171)&lt;&lt;endl;         <br />&#160;&#160;&#160; cout&lt;&lt;endl;&#160;&#160;&#160; </font></p>
<p><font face="Courier New">return 0;        <br />} </font></p>
<p><font face="Courier New">double factRecursive (double num)        <br />{         <br />&#160;&#160;&#160; if (num==0)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return 1;         <br />&#160;&#160;&#160; else         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return num*factRecursive(num-1);         <br />} </font></p>
<p><font face="Courier New">double factNonRecursive (double num)        <br />{         <br />&#160;&#160;&#160; double fact=1;         <br />&#160;&#160;&#160; for (double i=2;i&lt;=num;i++) fact *=i;         <br />&#160;&#160;&#160; return fact;         <br />}</font></p>
</blockquote>
<p>Unfortunately, same story once more:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/Cpp.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Cpp" border="0" alt="Cpp" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/Cpp_thumb.png" width="449" height="121" /></a></p>
<p>Well. The story&#8217;s played out like this. It may be not the limitable of the language but the machine. I check which is the largest numbers my computer supports:</p>
<blockquote><p><font face="Courier New">#include &lt;iostream&gt;        <br />#include &lt;cfloat&gt; </font></p>
<p><font face="Courier New">using namespace std; </font></p>
<p><font face="Courier New">int main()        <br />{         <br />&#160; cout&lt;&lt;&quot;maxinum double value of machine: &quot;&lt;&lt;DBL_MAX&lt;&lt;endl;         <br />&#160; return 0; </font><font face="Courier New">}</font></p>
</blockquote>
<blockquote><pre>maxinum double value of machine: <font color="#ff0000">1.79769e+308</font></pre>
</blockquote>
<p>Now everything’s in the open. The factorial of 170 is about 7.257416e+306. 171! is too big to be supported by my PC. </p>
<p>(Note: I put these codes in <a href="http://codepad.org">http://codepad.org</a>, a online complier. if you don’t have any C++ complier in your machine, you can see the codes and outputs in:<a href="http://codepad.org/xnneavsw">http://codepad.org/xnneavsw</a>&#160; and <a href="http://codepad.org/3FeEC9t2">http://codepad.org/3FeEC9t2</a>)</p>
<h3>6. <a href="http://www.wolframalpha.com/" target="_blank">WolframAlpha</a></h3>
<p>Struggled for hours, I turn to <a href="http://www.wolframalpha.com" target="_blank">WolframAlpha</a> computing platform. It returns <a href="http://www.wolframalpha.com/input/?i=171!" target="_blank">the factorial of 171</a> AT LAST:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/WA171.gif"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="WA171" border="0" alt="WA171" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/WA171_thumb.gif" width="454" height="128" /></a>&#160;<a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/WA171_s.gif"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="WA171_s" border="0" alt="WA171_s" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/WA171_s_thumb.gif" width="477" height="52" /></a>&#160; AT LAST we know the factorial of 171 has 310 digits. </p>
</p>
<h3>7. Windows Calculator</h3>
<p>I try to use Windows build-in calculator. Amazing, it is powerful:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/winCalc.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="winCalc" border="0" alt="winCalc" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/winCalc_thumb.png" width="323" height="250" /></a></p>
<h3>8. Python</h3>
<p>Return to programming language.&#160; First, I defined a function(recursive version) in Python and then use its MATH library:</p>
<blockquote>
<p><font face="Courier New">&gt;&gt;&gt; def factorial(n):<br />
      <br />&#160;&#160;&#160; if n==0: </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return 1 </p>
<p>&#160;&#160;&#160; else: </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return n*factorial(n-1) </font></p>
<p><font face="Courier New"><font color="#ff0000">&gt;&gt;&gt; factorial(170)</font> </p>
<p>7257415615307998967396728211129263114716991681296451376 </p>
<p>5435777989005618434017061578523507492426174595114909912 </p>
<p>3783852077666602256544275302532890077320751090240043028 </p>
<p>0058295603966612599658257104398558294257568966313439612 </p>
<p>2625710949468067112055688804571933402126614528000000000 </p>
<p>00000000000000000000000000000000L </p>
<p><font color="#ff0000">&gt;&gt;&gt; factorial(171)</font> </p>
<p>1241018070217667823424840524103103992616605577501693185 </p>
<p>3889518036119960752216917529927519781204875855764649595 </p>
<p>0167038705280988985869071076733124203221848436431047357 </p>
<p>7889968548278290754541561964852153468318044293239598173 </p>
<p>6968996572359039476161522785581800611763651084288000000 </p>
<p>00000000000000000000000000000000000L</font></p>
</blockquote>
<blockquote>
<p>&gt;&gt;&gt; import math<br />
    <br /><font color="#ff0000">&gt;&gt;&gt; math.factorial(171)</font> </p>
<p>1241018070217667823424840524103103992616605577501693185 </p>
<p>3889518036119960752216917529927519781204875855764649595 </p>
<p>0167038705280988985869071076733124203221848436431047357 </p>
<p>7889968548278290754541561964852153468318044293239598173 </p>
<p>6968996572359039476161522785581800611763651084288000000 </p>
<p>00000000000000000000000000000000000L</p>
</blockquote>
<p>Amazing, Python beats up C++! </p>
<p><em>(to be continued :</em></p>
<p><em>Too Big to Be Accurate(2): <font color="#ff0000">Approximation</font> </em></p>
<p><em>)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/01/22/big-numbers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Feature Selection: Collections for Self Study</title>
		<link>http://www.jiangtanghu.com/blog/2011/01/15/feature-selection-collections-for-self-study/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/01/15/feature-selection-collections-for-self-study/#comments</comments>
		<pubDate>Sat, 15 Jan 2011 02:58:44 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[data mining]]></category>
		<category><![CDATA[feature selection]]></category>
		<category><![CDATA[fselector]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/01/15/feature-selection-collections-for-self-study/</guid>
		<description><![CDATA[Recently I start to learn the algorithms and applications of feature selection. The term  “Feature”, wildly used in machine learning and data mining literatures,  simply means “Variable”. In some practices, for example, a neural network model uses a decision tree as input; the tree performs the function of variables selection. The Arizona State University is [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I start to learn the algorithms and applications of <a href="http://en.wikipedia.org/wiki/Feature_selection" target="_blank">feature selection</a>. The term  “Feature”, wildly used in machine learning and data mining literatures,  simply means “Variable”. In some practices, for example, a neural network model uses a decision tree as input; the tree performs the function of variables selection.</p>
<p>The Arizona State University is maintaining a repository of feature selection, including original documentations, Matlab packages and user guide for the following popular algorithms so far:</p>
<blockquote><p>BLogReg<br />
CFS<br />
Chi Square<br />
FCBF<br />
Fisher Score<br />
Gini Index<br />
Information Gain<br />
Kruskal-Wallis<br />
mRMR<br />
Relief-F<br />
SBMLR<br />
T-test<br />
SPEC<br />
<em><span style="color: #ff0000;">see</span></em> <a href="http://featureselection.asu.edu/software.php" target="_blank">http://featureselection.asu.edu/software.php</a></p></blockquote>
<p>A R package, <a href="http://cran.r-project.org/web/packages/FSelector/index.html" target="_blank">FSelector</a>, is also useful for step-by-step studying. This package covers:</p>
<blockquote><p><strong>Filters:<br />
</strong>*cfs<br />
*chi-squared<br />
*consistency<br />
*correlation<br />
&#8211;linear.correlation<br />
&#8211;rank.correlation<br />
*entropy.based<br />
&#8211;information.gain<br />
&#8211;gain.ratio<br />
&#8211;symmetrical.uncertainty<br />
*OneR<br />
*random.forest.importance<br />
*relif-F</p>
<p><strong>Wrappers:</strong><br />
*best.first.search<br />
*exhaustive.search<br />
*greedy.search<br />
&#8211;backward.search<br />
&#8211;forward.search<br />
*hill.climbing.search</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/01/15/feature-selection-collections-for-self-study/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decision Trees in SAS Enterprise Miner and SPSS Clementine</title>
		<link>http://www.jiangtanghu.com/blog/2011/01/04/decision-trees-in-sas-enterprise-miner-and-spss-clementine/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/01/04/decision-trees-in-sas-enterprise-miner-and-spss-clementine/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 12:44:50 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[data mining]]></category>
		<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[C5.0]]></category>
		<category><![CDATA[CART]]></category>
		<category><![CDATA[CHAID]]></category>
		<category><![CDATA[decision tree]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[QUEST]]></category>
		<category><![CDATA[SPSS]]></category>
		<category><![CDATA[SPSS Clementine]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/01/04/decision-trees-in-sas-enterprise-miner-and-spss-clementine/</guid>
		<description><![CDATA[Decision trees are included in SAS Enterprise Miner(EM). The counterpart is SPSS Clementine, which should be called IBM SPSS Modeler for precision after IBM’s acquisition of SPSS. Recently I read a paper on the comparisons of SAS EM, SPSS Clementine and IBM Intelligent Miner on their decision tree and cluster technology: Decision Tree Induction &#38; [...]]]></description>
				<content:encoded><![CDATA[<p>Decision trees are included in SAS Enterprise Miner(EM). The counterpart is SPSS Clementine, which should be called IBM SPSS Modeler for precision after IBM’s acquisition of SPSS.</p>
<p>Recently I read a paper on the comparisons of SAS EM, SPSS Clementine and IBM Intelligent Miner on their decision tree and cluster technology:</p>
<blockquote><p><em><a href="http://www.gimi.us/CLUTE_INSTITUTE/ORLANDO_2010/Article%2520452.pdf" target="_blank">Decision Tree Induction &amp; Clustering Techniques in SAS Enterprise Miner, SPSS Clementine, and IBM Intelligent Miner – A Comparative Analysis</a></em> by Abdullah M. Al Ghoson, Virginia Commonwealth University </p>
</blockquote>
<p>The output is not that surprising. SAS EM plays better in performance, functionality and auxiliary task support but worse in usability.</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/SAS_VS_SPSS.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="SAS_VS_SPSS" border="0" alt="SAS_VS_SPSS" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/SAS_VS_SPSS_thumb.png" width="503" height="476" /></a> </p>
<p>Here are few comments on decision trees implementations in SAS EM and SPSS Clementine based on my own experiences. Some advises for beginners are also supplied.</p>
<p>There are four nodes in SPSS Clementine to supports four trees algorithms respectively: <font color="#ff0000">C5.0</font>, Classification And Regression Trees (<font color="#ff0000">CART</font>),&#160; Quick, Unbiased, Efficient Statistical Tree(<font color="#ff0000">QUEST</font>) and Chi-squared Automatic Interaction Detector(<font color="#ff0000">CHAID</font>),&#160; which are most famous and popular in decision trees family.</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/SPSS_4_trees.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="SPSS_4_trees" border="0" alt="SPSS_4_trees" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/SPSS_4_trees_thumb.png" width="412" height="105" /></a> Note that CART(R) is a registered trademark of California Statistical Software, Inc., and is licensed exclusively to Salford Systems, San Diego, California. So SPSS Clementine uses C&amp;R Tree as name.</p>
<p>In SAS EM, there is only one decision tree node:</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/SAS_tree.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="SAS_tree" border="0" alt="SAS_tree" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2011/01/SAS_tree_thumb.png" width="155" height="74" /></a> The algorithms behind this node is called SAS tree algorithms, which incorporate and extend the four mentioned before. Just change the settings in decision tree node, you can get the trees you want. </p>
<p>Obviously, SAS tree algorithms is superior than the separated ones in SPSS Clementine for expansibility and flexibility. But at the other hand, the complexities increase. For a newbie user of SAS EM, he/she may wonder which trees he/she is training. A SPSS Clementine users just picks up a node and says: OK, I am now training a CART or CHAID.—he/she would communicate with others more smoothly.</p>
<p>Regardless of the industry application, I think this is the educational benefit of SPSS Clementine. Since almost every data mining book introduces decision trees by separated algorithms(such as ID3/C4.5/C5.0, CART, QUEST, CHAID, . . .), the beginners using SPSS Clementine as instructional tool may get the clear ideas about the algorithms one by one. Once he/she get the full understanding of the differences among tree algorithms, he/she would train trees in SAS EM more comfortable.</p>
<p>What’s more, SPSS Clementine supplies rich supporting documentations for beginners and self learners , such as Tutorial, User Guide, Algorithms Guide, Node Reference. The official documentations of SAS EM 5.x and 6.x are relatively poor. Yes there is a good SAS Help and Documentation for SAS EM 4.3 including <em>Getting Started with Enterprise Miner</em>. EM4.3 is a traditional AF application but EM5.x and above are Java client incorporated in SAS analysis platform(they are totally different!). For EM5.x and above, only installation guides and a plain reference are available.</p>
<p>SAS Institute may have its own marketing strategies. No rich references available, the Institute DOES offer <a href="https://support.sas.com/edu/prodcourses.html?code=MINER&amp;ctry=US" target="_blank">rich training programs</a> in data mining and Enterprise Miner application. Wooo, the big-budget purchasers of SAS EM can also afford the trainings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/01/04/decision-trees-in-sas-enterprise-miner-and-spss-clementine/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>SAS Data Step&#8217;s Built-in Loop: An illustrated Example</title>
		<link>http://www.jiangtanghu.com/blog/2011/01/03/sas-data-steps-built-in-loop-an-illustrated-example/</link>
		<comments>http://www.jiangtanghu.com/blog/2011/01/03/sas-data-steps-built-in-loop-an-illustrated-example/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 09:29:40 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[implicit built-in loop]]></category>
		<category><![CDATA[Loop]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2011/01/03/sas-data-steps-built-in-loop-an-illustrated-example/</guid>
		<description><![CDATA[Some newbie SAS programmers take SAS as their first programming language even learned. Sometimes they are confused by the concept of “data step’s built-in loop” even after reading the well-written The Little SAS Book: A Primer: DATA steps also have an underlying structure, an implicit, built-in loop. You don’t tell SAS to execute this loop: [...]]]></description>
				<content:encoded><![CDATA[<p>Some newbie SAS programmers take SAS as their first programming language even learned. Sometimes they are confused by the concept of “data step’s built-in loop” even after reading the well-written <em>The Little SAS Book: A Primer</em>:</p>
<blockquote><p>DATA steps also have an underlying structure, an implicit, built-in loop. You don’t tell SAS to execute this loop: SAS does it automatically. Memorize this:</p>
<p><strong>DATA steps execute line by line and observation by observation.</strong></p></blockquote>
<p>Programmers could memorize the statement above and apply it well in their programming practices, but still find it hard to get the vivid idea about the so called <strong>implicit</strong> built-in loop. –This post would make it easy.</p>
<p>The following will show an <strong>explicit</strong> loop example in C++. Note that you do not need to know any about C++ to get the idea. Suppose that a data file <em>data.dat</em> in D driver holds three numbers</p>
<blockquote><p>1<br />
2<br />
3</p></blockquote>
<p>The question is how to (read and) print out these numbers and their sums.  Following is the C++ approach (<strong>just read the bold session</strong>):</p>
<blockquote><p><span style="font-family: 'Courier New';">#include &lt;iostream&gt;<br />
#include &lt;fstream&gt;<br />
using namespace std;<br />
int main()<br />
{<br />
int x;<br />
int sum=0;<br />
ifstream inFile;<br />
inFile.open(&#8220;d:data.dat&#8221;);<br />
inFile &gt;&gt; x; </span></p>
<p><span style="font-family: 'Courier New';"><strong> while (<span style="color: #ff0000;">!inFile.eof( )</span>)<br />
{<br />
cout&lt;&lt;x&lt;&lt;endl;<br />
sum = sum + x;<br />
inFile &gt;&gt; x;<br />
}</strong> </span></p>
<p><span style="font-family: 'Courier New';"> inFile.close( );<br />
cout &lt;&lt; &#8220;Sum = &#8221; &lt;&lt; sum &lt;&lt; endl;<br />
return 0;<br />
}</span></p></blockquote>
<p>There is an <strong>explicit</strong> loop in these C++ codes: while (<span style="color: #ff0000;">!inFile.eof( )</span>) .  While it is not at the end of infile, the codes above will keep print out the numbers and do the accumulation. The final output is</p>
<blockquote><p>1<br />
2<br />
3<br />
sum=6</p></blockquote>
<p>The following SAS codes produce the exactly same output:</p>
<blockquote><p><span style="font-family: 'Courier New';">data _null_;<br />
infile &#8220;d:data.dat&#8221; end=eof;<br />
input x;<br />
sum+x;<br />
put x;<br />
if eof then put sum=;<br />
run;</span></p></blockquote>
<p>Note that SAS codes do not need an <strong>explicit</strong> loop to reach to the end of file. There is a so called <strong>implicit</strong> built-in loop.&lt;the end&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2011/01/03/sas-data-steps-built-in-loop-an-illustrated-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SGF: Caesars Palace in Las Vegas again</title>
		<link>http://www.jiangtanghu.com/blog/2010/12/30/sgf-caesars-palace-in-las-vegas-again/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/12/30/sgf-caesars-palace-in-las-vegas-again/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 10:13:08 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/12/30/sgf-caesars-palace-in-las-vegas-again/</guid>
		<description><![CDATA[The mechanic, who wishes to do his work well, must first sharpen his tools. --Confucian Analects. BOOK XV.WEI LING KUNG.CHAP.IX. My paper Work Smarter than Harder-tools for growing up a SAS programmer was accepted by SAS Global Forum 2011. It would be my first time to attend SAS user group conference worldwide. The draft version [...]]]></description>
				<content:encoded><![CDATA[<blockquote><pre>The mechanic, who wishes to do his work well, must first </pre>
<pre>sharpen his tools.</pre>
<pre> --<i>Confucian Analects</i>. BOOK XV.WEI LING KUNG.CHAP.IX.</pre>
</blockquote>
<p>My paper <em><a href="http://sgf2011.confnav.com/sgf2011/web/sessions/detail.html?id=20101023091009653775000000" target="_blank">Work Smarter than Harder-tools for growing up a SAS programmer</a></em> was accepted by <a href="http://support.sas.com/events/sasglobalforum/2011/" target="_blank">SAS Global Forum 2011.</a> It would be my first time to attend SAS user group conference worldwide. The draft version is available at</p>
<p><a title="http://jiangtanghu.com/docs/en/SGF2011_JiangtangHU(draft).pdf" href="http://jiangtanghu.com/docs/en/SGF2011_JiangtangHU(draft).pdf">http://jiangtanghu.com/docs/en/SGF2011_JiangtangHU(draft).pdf</a></p>
<p>Welcome for any comments.</p>
<p>The SGF2011 will be held at Caesars Palace in Las Vegas, Nevada. The interesting thing is that, as far as I know, Caesars Palace in Las Vegas was also the host for SUGI 1978(Jan 30-Feb 1, 1978). looking forward to seeing my SAS gurus in Caesars Palace next year, a place of history.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/12/30/sgf-caesars-palace-in-las-vegas-again/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A SAS Programmer&#8217;s End Year Haiku</title>
		<link>http://www.jiangtanghu.com/blog/2010/12/30/a-sas-programmers-end-year-haiku/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/12/30/a-sas-programmers-end-year-haiku/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 08:18:20 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[haiku]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/12/30/a-sas-programmers-end-year-haiku/</guid>
		<description><![CDATA[End year Haiku again! Yesterday I finished my project, wrote a Haiku to colleagues worldwide to say happy new year, then closed my desktop, said goodbye to colleagues still in office: In December my baby born my project deliveries followed on Now my computers shutdown do until(6 Jan 2011) I will be OOO Please take [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/2008/12/10/haiku-from-sas-rd-staff-2/" target="_blank">End year Haiku</a> again!</p>
<p>Yesterday I finished my project, wrote a Haiku to colleagues worldwide to say happy new year, then closed my desktop, said goodbye to colleagues still in office:</p>
<blockquote><p>In December my baby born</p>
<p>my project deliveries followed on</p>
<p>Now my computers shutdown</p>
<p>do until(6 Jan 2011) I will be OOO</p>
<p>Please take blessings from John</p>
</blockquote>
<p>Happy New Year!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/12/30/a-sas-programmers-end-year-haiku/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Blogging SAS</title>
		<link>http://www.jiangtanghu.com/blog/2010/11/30/sas-blog/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/11/30/sas-blog/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 13:16:52 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/11/30/sas-blog/</guid>
		<description><![CDATA[Almost at the same time, there are two SAS blogs aggregators popping up to the web for SAS programmers worldwide, one in Chinese, the other, English: http://saslist.com/&#160; in Chinese, maintained by sxlion, also the owner of a SAS information site,&#160; http://saslist.net/ http://sas-x.com/&#160;&#160; in English, maintained by Tal Galili, also the owner of R blogs aggregator, [...]]]></description>
				<content:encoded><![CDATA[<p>Almost at the same time, there are two SAS blogs aggregators popping up to the web for SAS programmers worldwide, one in Chinese, the other, English:</p>
<blockquote><p><a href="http://saslist.com/">http://saslist.com/</a>&#160; in Chinese, maintained by <a href="http://saslist.com/sxlion/">sxlion</a>, also the owner of a SAS information site,&#160; <a href="http://saslist.net/">http://saslist.net/</a></p>
<p><a href="http://sas-x.com/">http://sas-x.com/</a>&#160;&#160; in English, maintained by <a href="http://www.r-statistics.com/">Tal Galili</a>, also the owner of R blogs aggregator, <a href="http://r-bloggers.com/">http://r-bloggers.com/</a></p>
</blockquote>
<p>I try to express in a very symmetrical way. What’s more (and interesting), these two aggregators share a same WordPress template. My blogs, <a href="http://jiangtanghu.com/cn">in Chinese</a> and <a href="http://www.jiangtanghu.com/blog">in English</a>, are also the members of these aggregators respectively. </p>
<p>I view this is the first wave for SAS programmers to embrace the Web2.0 world. If interested, you could also add your SAS blogs in </p>
<blockquote><p><a href="http://sas-x.com/add-your-blog/">http://sas-x.com/add-your-blog/</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/11/30/sas-blog/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Recursion: Biblical Evidences</title>
		<link>http://www.jiangtanghu.com/blog/2010/11/06/recursion-bible/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/11/06/recursion-bible/#comments</comments>
		<pubDate>Sat, 06 Nov 2010 01:58:56 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Logic]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[recursion]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/11/06/recursion-bible/</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; To Iterate is Human, to Recurse, Divine.&#160; &#160;&#160;&#160;&#160;&#160; &#8211;by L. Peter Deutsch, creator of Ghostscript. (I also love his saying “The best thing about a Boolean is even if you are wrong, you are only off by a bit”) I learned this quote from Tony Barr, designer and developer of SAS (the Statistical [...]]]></description>
				<content:encoded><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p>
<blockquote><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong> To Iterate is Human, to Recurse, Divine.</strong>&#160; </p>
<p>&#160;&#160;&#160;&#160;&#160; &#8211;by <a href="http://en.wikipedia.org/wiki/L._Peter_Deutsch">L. Peter Deutsch</a>, creator of Ghostscript. (I also love his saying “<em>The best thing about a Boolean is even if you are wrong, you are only off by a bit</em>”)</p>
</blockquote>
<p>I learned this quote from <a href="http://en.wikipedia.org/wiki/Anthony_James_Barr">Tony Barr</a>, designer and developer of <a href="http://en.wikipedia.org/wiki/SAS_(software)">SAS</a> (the Statistical Analysis System).&#160; He also used the <a href="http://en.wikipedia.org/wiki/Recursive_descent_parser">Recursive Descent</a> method to develop SAS complier. Now Tony is working for AMOR (A Model of Reality). AMOR is the <strong>self-defining</strong> system for modeling ideas and concepts (or human knowledge).—Recurse again: in AMOR, the type is defined by the type of type, and, the type of type is also defined by the type of type of type . . .</p>
<p>To help to understand the DIVINE part of recursion, Tony gave two examples from the <em>Bible:</em></p>
<p>1. The Golden Rule is recursive.</p>
<blockquote><p>Do unto others as you would have them do unto you. (<em>see</em> <a href="http://en.wikisource.org/wiki/Bible_(King_James)/Matthew#7:12">Matthew 7:12</a>, or <a href="http://en.wikisource.org/wiki/Bible_(King_James)/Luke#6:31">Luke 6:31</a>)</p>
</blockquote>
<p>2. God indentify himself in a recursive way.</p>
<blockquote><p>Moses asked God for his name. Then God said to Moses, “I AM THAT I AM.” (<em>see</em> <a href="http://www.sacred-texts.com/bib/kjv/exo003.htm">Exodus 3.14</a>)</p>
</blockquote>
<p>I’d like add two items (from a programmer’s perspective <strong>rather than</strong> Biblical Theology):</p>
<p>3. Recursion at the very start</p>
<blockquote><p>In the beginning was the Word, and the Word was with God, and the Word was God. (<em>see</em> <a href="http://bible.cc/john/1-1.htm">John 1.1</a>; also <em>see</em> <a href="http://www.wired.com/wired/archive/10.12/holytech_pr.html">here</a>)</p>
</blockquote>
<p>4. The Trinity recursive way</p>
<blockquote><p>First, there is only one God in Christian doctrine. God the Son duplicates the nature of God the Father in every way exactly, and so God the Spirit. And what’s about God the Father? <em>see </em>above.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/11/06/recursion-bible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Power of Logic Operators: a trick</title>
		<link>http://www.jiangtanghu.com/blog/2010/11/04/power-of-logic-operators-a-trick/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/11/04/power-of-logic-operators-a-trick/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 23:09:12 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Logic]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[logic operator]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/?p=146</guid>
		<description><![CDATA[Suppose you should group people based on their ages as follows: ID Age agegrp 001 1 1 002 4 2 003 5 2 004 5 2 005 2 1 006 4 2 007 5 2 008 2 1 009 9 3 010 8 3 and the rules: age&#60;4,           group 1 4&#60;=age&#60;6,     group 2 6&#60;=age&#60;10,  group [...]]]></description>
				<content:encoded><![CDATA[<p>Suppose you should group people based on their ages as follows:</p>
<blockquote>
<div>
<table border="0" cellspacing="0" cellpadding="2" width="155" align="center">
<tbody>
<tr>
<td width="51" valign="top">ID</td>
<td width="57" valign="top">Age</td>
<td width="45" valign="top">agegrp</td>
</tr>
<tr>
<td width="51" valign="top">001</td>
<td width="57" valign="top">1</td>
<td width="45" valign="top">1</td>
</tr>
<tr>
<td width="51" valign="top">002</td>
<td width="57" valign="top">4</td>
<td width="45" valign="top">2</td>
</tr>
<tr>
<td width="51" valign="top">003</td>
<td width="57" valign="top">5</td>
<td width="45" valign="top">2</td>
</tr>
<tr>
<td width="51" valign="top">004</td>
<td width="57" valign="top">5</td>
<td width="45" valign="top">2</td>
</tr>
<tr>
<td width="51" valign="top">005</td>
<td width="57" valign="top">2</td>
<td width="45" valign="top">1</td>
</tr>
<tr>
<td width="51" valign="top">006</td>
<td width="57" valign="top">4</td>
<td width="45" valign="top">2</td>
</tr>
<tr>
<td width="51" valign="top">007</td>
<td width="57" valign="top">5</td>
<td width="45" valign="top">2</td>
</tr>
<tr>
<td width="51" valign="top">008</td>
<td width="57" valign="top">2</td>
<td width="45" valign="top">1</td>
</tr>
<tr>
<td width="51" valign="top">009</td>
<td width="57" valign="top">9</td>
<td width="45" valign="top">3</td>
</tr>
<tr>
<td width="51" valign="top">010</td>
<td width="60" valign="top">8</td>
<td width="56" valign="top">3</td>
</tr>
</tbody>
</table>
</div>
</blockquote>
<p>and the rules:</p>
<blockquote><p>age&lt;4,           group 1</p>
<p>4&lt;=age&lt;6,     group 2</p>
<p>6&lt;=age&lt;10,  group 3</p></blockquote>
<p>It is a very simple question and you could use the <strong>if/else </strong>statement without thinking:</p>
<blockquote><p><span style="font-family: 'Courier New';">data age;<br />
input ID $  age;<br />
datalines;<br />
001 1<br />
002 4<br />
003 5<br />
004 5<br />
005 2<br />
006 4<br />
007 5<br />
008 2<br />
009 9<br />
010 8<br />
; </span></p>
<p><span style="font-family: 'Courier New';">data age1;<br />
set age;<br />
<span style="color: #ff0000;">if </span>age&lt;4   then agegrp=1;<br />
<span style="color: #ff0000;">else if</span> age&lt;6   then agegrp=2;<br />
else agegrp=3;<br />
run;<br />
proc  print;run;</span></p></blockquote>
<p>or, you could use <strong>proc format</strong> to map data:</p>
<blockquote><p><span style="font-family: 'Courier New';">proc <span style="color: #ff0000;">format</span>;<br />
value agegrp<br />
low-&lt;4=&#8221;1&#8243;<br />
4-&lt;7  =&#8221;2&#8243;<br />
7-&lt;10  =&#8221;3&#8243;<br />
other =&#8221;"<br />
;<br />
run; </span></p>
<p><span style="font-family: 'Courier New';">data age2;<br />
set age;<br />
<span style="color: #ff0000;"> agegrp2=put(age,agegrp1.);</span><br />
run;<br />
proc  print;run;</span></p></blockquote>
<p>And try to use logic operators. It is a <strong>ONE-LINE-OF-CODE</strong> approach:</p>
<blockquote><p><span style="font-family: 'Courier New';">data age3;<br />
set age;<br />
<span style="color: #ff0000;"> agegrp3=1+(age&gt;3)+(age&gt;5);</span><br />
run;<br />
proc  print;run;</span></p></blockquote>
<p>In SAS, a logic express returns to 1 or 0 according the true of false of the express. The logic behind the above statement is:</p>
<ul>
<li>age group is set to 1 at the beginning;</li>
<li>if age&gt;3, age group adds 1;</li>
<li>if age&gt;5, add 1.</li>
</ul>
<p>This easy-to-follow logic can apply to other scenarios(flags, for example):</p>
<p><span style="font-size: 13.1944px;"> flag=value&gt;50;</span></p>
<p><span style="font-size: 13.1944px;"> select value&gt;50 as flag    <em>(in proc sql)</em></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/11/04/power-of-logic-operators-a-trick/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Recursive Referencing and Binomial Proportion Interval</title>
		<link>http://www.jiangtanghu.com/blog/2010/11/03/recursive-referencing/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/11/03/recursive-referencing/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 12:47:44 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Logic]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[Binomial proportion inverval]]></category>
		<category><![CDATA[Inception]]></category>
		<category><![CDATA[Newcombe]]></category>
		<category><![CDATA[recursion]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/11/03/recursive-referencing/</guid>
		<description><![CDATA[To understand recursion, one of the most important concepts in programming languages, you could watch the movie, Chris Nolan’s Inception: it is about a dream within a dream within a dream, …and, read two statistical papers by Professor Robert Newcombe, one of the most prolific statisticians: Two-sided confidence intervals for the single proportion: comparison of [...]]]></description>
				<content:encoded><![CDATA[<p>To understand <a href="http://en.wikipedia.org/wiki/Recursion">recursion</a>, one of the most important concepts in programming languages, you could watch the movie, Chris Nolan’s <em><a href="www.inceptionmovie.com">Inception</a></em>: it is about a dream within a dream within a dream, …and, read two statistical papers by Professor <a href="http://medicine.cf.ac.uk/en/person/prof-robert-gordon-newcombe/">Robert Newcombe</a>, one of the most <a href="http://medicine.cf.ac.uk/en/person/prof-robert-gordon-newcombe/publications/">prolific statisticians</a>:</p>
<ul>
<li><cite><a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=pubmed&amp;dopt=Abstract&amp;list_uids=9595616&amp;query_hl=1"><strong>Two-sided confidence intervals for the single proportion: comparison of seven methods.</strong></a> </cite>      <br />Newcombe RG, <font color="#ff0000"><cite>Stat Med</cite> , Volume 17 , 8 (April 1998) pp.857-<strong>872</strong></font><strong> </strong></li>
<li><cite><a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=pubmed&amp;dopt=Abstract&amp;list_uids=9595617&amp;query_hl=1"><strong>Interval estimation for the difference between independent proportions: comparison of eleven methods.</strong></a> </cite>      <br />Newcombe RG, <font color="#ff0000"><cite>Stat Med</cite> , Volume 17 , 8 (April 1998) pp.<strong>873</strong>-890</font> </li>
</ul>
<p>These two widely cited papers evaluate 7 and 11 methods to calculate single proportion (paper <font color="#ff0000">A</font>) and the difference between proportions (paper <font color="#ff0000">B</font>), respectively. Further more, they were in the same issue of <a href="http://onlinelibrary.wiley.com/journal/10.1002/(ISSN)1097-0258"><em>Statistics in Medicine</em></a>(Volume 17, 1998), and, they were also cross referenced! So here is a live story about recursive referencing(thanks to Prof. Newcombe):</p>
<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2010/11/megamonalisa_recursion.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="megamonalisa_recursion" border="0" alt="megamonalisa_recursion" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2010/11/megamonalisa_recursion_thumb.jpg" width="245" height="371" /></a></p>
<ul>
<ul>
<li>An author writes two papers, A and B;</li>
<li>Paper B is in the&#160; bibliographic reference session of paper A;</li>
<li>Paper A is also in the&#160; bibliographic reference session of paper B;</li>
<li>Paper A and paper B are in the same issue of a journal.</li>
</ul>
</ul>
<p><font color="#ff0000">Note</font> that for Prof. Newcombe’s two linked papers, it is common and acceptable in publication practices. Recently I used these two wonderful papers to learn CI calculation and this post just want to lead to the concept of “recursion”&#160; (reference in reference in reference).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/11/03/recursive-referencing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Play Matrix within SAS(1): basic files processing</title>
		<link>http://www.jiangtanghu.com/blog/2010/10/29/sas-iml-basic/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/10/29/sas-iml-basic/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 13:02:31 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[IML]]></category>
		<category><![CDATA[Matrix]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/10/29/sas-iml-basic/</guid>
		<description><![CDATA[Recently I read Rick Wicklin’s IML blog with great interests(and anticipation for his fore-coming IML book,&#160; Statistical Programming with SAS/IML Software). SAS programmers have the following programming tools to facilitate their daily work: SAS data step: the basic SAS; a generation IV programming language, similar with other procedural languages such as C. SAS Proc SQL: [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I read Rick Wicklin’s <a href="http://blogs.sas.com/iml/index.php">IML blog</a> with great interests(and anticipation for his fore-coming IML book,&#160; <em><a href="http://support.sas.com/publishing/authors/wicklin.html">Statistical Programming with SAS/IML Software</a></em>). SAS programmers have the following programming tools to facilitate their daily work:</p>
<ul>
<li>SAS data step: the basic SAS; a generation IV programming language, similar with other procedural languages such as C. </li>
<li>SAS Proc SQL: SAS’s implementation of standard SQL(<a href="http://en.wikipedia.org/wiki/SQL-92">SQL-92</a>). </li>
<li>SAS IML(Interactive Matrix Language): SAS’s matrix manipulation language(like R and Matlab).&#160; SAS IML Studio also supply IMLPlus programming language(IML+), an enhanced version of IML. </li>
<li>SAS SCL(SAS Component Language): build in SAS/AF software, an object oriented programming(OOP) language for applications development. </li>
</ul>
<p>I am a heavy user of data steps and SQL and want to invest some bit on matrix manipulation. Although other wonderful languages available(such as R and Matlab), I found IML is a good choice for SAS programmers like me. It is well integrated within SAS system, and very important, almost all of the SAS Base functions and call routines are also supported by IML. Here some notes of IML 101(codes are self explanatory from a SAS Base point of view):</p>
<h1><strong>1. IML style of ‘hello world’</strong> </h1>
<blockquote><p><font face="Courier New"><font color="#ff0000">proc iml</font>;         <br />&#160;&#160;&#160; text=&quot;Hello World!&quot;;         <br />&#160;&#160;&#160; <font color="#ff0000">print</font> &quot;IML saying&quot; text;         <br /><font color="#ff0000">quit</font>;</font></p>
</blockquote>
<p>and you got in output window:</p>
<blockquote><p>IML saying Hello World!</p>
</blockquote>
<p>Like Proc SQL, IML begins with “<font face="Courier New"><font color="#ff0000">proc iml</font></font>” , end with ”<font color="#ff0000">quit</font>”, and every statements end with a semicolon. The key word “<font color="#ff0000">print</font>” (an IML statement), just like “put” statement in data steps.</p>
<p>An enhanced version of Hello World: </p>
<blockquote><p><font face="Courier New"><font color="#ff0000">options </font>nocenter nodate nonumber; </font></p>
<p><font face="Courier New">proc iml;        <br />&#160;&#160;&#160; <font color="#ff0000">reset</font> printall; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; text=&quot;Hello World!&quot;;        <br />&#160;&#160;&#160; print &quot;in &amp;sysdate. IML saying&quot; text;         <br />quit;</font></p>
</blockquote>
<p>Some SAS global options added(“<font face="Courier New">nocenter nodate nonumber</font>”). The IML statement “<font color="#ff0000">reset</font>&quot;, works like “<font face="Courier New"><font color="#ff0000">options</font></font>” statement to set some processing options within the IML(and you can guess the meaning of the options “printall”, just print all. . . it is your turn to check the output window).</p>
<p>A SAS system macro variable “&amp;sysdate” is presented to encourage you to add any programming elements in SAS Base to IML. </p>
<h1><strong>2. How to create a matrix manually</strong></h1>
<p>Actually, we have already create a matrix named “text” in the previous hello-world codes. It is a character <font color="#ff0000">scalar</font>(matrix with only one element). If we want to avoid the SAS data steps’ style of assignment,&#160; we can use <font color="#ff0000"><em>{}</em></font> to enclose matrix elements:</p>
<blockquote><p>a={“a”};&#160; /*a _char_ scalar */      <br />b={1};&#160;&#160;&#160;&#160; /*a _num_ scalar*/</p>
</blockquote>
<p>and a 2*3 matrix:</p>
<blockquote><p>c={1 2 3<font color="#ff0000">,        <br /></font>&#160;&#160;&#160;&#160;&#160; 2 3 4}; /*2 rows, 3 cols*/</p>
</blockquote>
<p>Commas(<font color="#ff0000">,</font>) are used to separate rows.</p>
<h1>3. How to create a matrix by functions</h1>
<p>Some matrix reshaping functions:</p>
<blockquote><p><font face="Courier New">a=<font color="#ff0000">I</font>(3);&#160;&#160;&#160;&#160; /*creates a 3*3 identity matrix*/         <br />b=<font color="#ff0000">J</font>(2,3,5); /*creates a 2*3 matrix of identical values*/         <br />e=<font color="#ff0000">do</font>(1,9,2); /*produces series, from 1 to 9, by increment 2*/         <br />c=<font color="#ff0000">block</font>(a,b);/*forms a block-diagonal matrice*/         <br />d=<font color="#ff0000">diag</font>(a);&#160;&#160; /*creates a diagonal matrix*/         <br />m=<font color="#ff0000">repeat</font>(a,4,3); /*create a (3*4)*(3*3) matrix by repeating*/         <br />n=<font color="#ff0000">T</font>(b);&#160;&#160; /*transpose*/</font></p>
</blockquote>
<h1>4. How to create a matrix by reading a SAS data set</h1>
<blockquote><p><font face="Courier New">proc iml;        <br />&#160;&#160;&#160; <font color="#ff0000">use</font> sashelp.class;         <br />&#160;&#160;&#160; <font color="#ff0000">read</font> all var <font color="#ff0000">_char_</font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">into</font> class_char;         <br />&#160;&#160;&#160; read all var <font color="#ff0000">_num_</font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; into class_num;         <br />&#160;&#160;&#160; read all var <font color="#ff0000">{&quot;Age&quot; &quot;Height&quot; &quot;Weight&quot;}</font> into class_num2;         <br />&#160;&#160;&#160; <font color="#ff0000">close</font> sashelp.class; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; print class_char class_num class_num2;        <br />quit;</font></p>
</blockquote>
<p>Note that it is a good habit to close the data file after reading or using it(<em>see</em> Rick Wicklin’s <em><a href="http://blogs.sas.com/iml/index.php?/archives/8-Five-Reasons-to-CLOSE-Your-Data-Sets.html">Five Reasons to CLOSE Your Data Sets</a></em>).</p>
<h1>5. How to output a matrix to SAS dataset</h1>
<blockquote><p><font face="Courier New">proc iml;        <br />&#160;&#160;&#160; use sashelp.class;         <br />&#160;&#160;&#160; read all var _num_ into class_num;         <br />&#160;&#160;&#160; close sashelp.class; </font></p>
<p><font face="Courier New">&#160;&#160;&#160; <font color="#ff0000">create</font> work.class_num <font color="#ff0000">from</font> class_num;        <br />&#160;&#160;&#160; <font color="#ff0000">append</font> <font color="#ff0000">from</font> class_num;        <br />&#160;&#160;&#160; <font color="#ff0000">show datasets</font>;        <br />quit;</font></p>
</blockquote>
<h1>&#160;</h1>
<h1>6. How to format a matrix</h1>
<p>/*version I: use matrix options*/</p>
<blockquote><p><font face="Courier New">proc iml;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; use sashelp.class;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; col={&quot;Age&quot; &quot;Height&quot; &quot;Weight&quot;};        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; read all var col into class;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; read all var{name} into row;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; close sashelp.class; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; print class[<font color="#ff0000">rowname</font>=row         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">colname</font>=col         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">format</font>=5.2         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">label</font>=&quot;test, label&quot;];        <br />quit;</font> </p>
</blockquote>
<p>/*version II: use mattib statement*/</p>
<blockquote><p><font face="Courier New">proc iml;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; use sashelp.class;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; col={&quot;Age&quot; &quot;Height&quot; &quot;Weight&quot;};        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; read all var col into class;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; read all var{name} into row;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; close sashelp.class; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">mattrib</font> class rowname=row        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colname=col        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; label=&quot;test, label&quot;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; format=5.2;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; print class;        <br />quit;</font> </p>
</blockquote>
<p>/*version III: avoid hardcoding—use IML function and operations*/</p>
<blockquote><p><font face="Courier New">proc iml;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; use sashelp.class;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff0000">col=T(contents(sashelp,class)[3:5]);</font>        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; read all var col into class;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; read all var{name} into row;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; close sashelp.class; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; mattrib class rowname=row       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colname=col        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; label=&quot;test, label&quot;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; format=5.2;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; print class;        <br />quit;</font></p>
</blockquote>
<p><font face="Courier New"><em><strong>(IML matrix operations: to be continued)</strong></em></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/10/29/sas-iml-basic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SAS Algorithmically(1): Newton-Raphson method</title>
		<link>http://www.jiangtanghu.com/blog/2010/10/21/sas-algorithmically1-newton-raphson-method/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/10/21/sas-algorithmically1-newton-raphson-method/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 13:39:42 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[Newthon-Raphson]]></category>
		<category><![CDATA[numeric precision]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/10/21/sas-algorithmically1-newton-raphson-method/</guid>
		<description><![CDATA[A good reference for the basic algorithms of Newton-Raphson method to calculate the square root of a number, see http://mathforum.org/library/drmath/view/52644.html And the SAS codes(self-explanatory): data root; &#160;&#160;&#160;&#160;&#160;&#160;&#160; /*question: find the square root of 4*/ &#160;&#160;&#160;&#160;&#160;&#160;&#160; x=4;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; /*first choose a rough approximation of sqrt(4); &#160;&#160;&#160;&#160;&#160;&#160;&#160; actually, you can start with any numbers*/ &#160;&#160;&#160;&#160;&#160;&#160;&#160; y0=1;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; [...]]]></description>
				<content:encoded><![CDATA[<p>A good reference for the basic algorithms of Newton-Raphson method to calculate the square root of a number, <em>see</em></p>
<blockquote><p><a href="http://mathforum.org/library/drmath/view/52644.html">http://mathforum.org/library/drmath/view/52644.html</a></p>
</blockquote>
<p>And the SAS codes(self-explanatory):</p>
<blockquote><p><font face="Courier New">data root;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; /*question: find the square root of 4*/         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; x=4;&#160; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; /*first choose a rough approximation of sqrt(4);        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; actually, you can start with any numbers*/         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; y0=1;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; count=0;/*init count number*/ </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; do until (w&lt;1e-8); /*set a small tolerance error*/        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; count=count+1;&#160;&#160; /*accumulate count number*/         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; y=(y0+x/y0)/2;&#160;&#160; /*Newton&#8217;s formula*/         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; w=abs(y-y0); /*if close, exit;*/         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; y0=y;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /* otherwise, keep the new one*/         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; end; </font></p>
<p><font face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; output;        <br />run;</font></p>
</blockquote>
<p>The outputs:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p>
<blockquote><p>x&#160;&#160;&#160; y0&#160;&#160;&#160; count&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; w&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; y </p>
<p>4&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160; 6&#160;&#160;&#160;&#160;&#160; 2.2204E-15&#160;&#160;&#160; 2 </p>
</blockquote>
<p>After 6 iterations, Newton-Raphson(also called <strong>divide-and-average</strong>) gets an approximated square root. See what happed during each iteration compared the output generated by SAS function,sqrt():</p>
<blockquote><p><font face="Courier New">data root;        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; x=4;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; y0=1;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; count=0;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; do until (w&lt;1e-8);&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; count=count+1;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; y=(y0+x/y0)/2;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; w=abs(y-y0);         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; y0=y;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if y =sqrt(x) then is_eq_sqrt=&quot;YES&quot;;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else is_eq_sqrt=&quot;NO&quot;;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; output;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; end;         <br />run;</font></p>
</blockquote>
<p>Outputs:</p>
<blockquote><p>x&#160;&#160;&#160;&#160;&#160;&#160; y0&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; count&#160;&#160;&#160;&#160;&#160;&#160;&#160; w&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; y&#160;&#160;&#160;&#160; is_eq_sqrt </p>
<p>4&#160;&#160;&#160; 2.50000&#160;&#160;&#160;&#160;&#160; 1&#160;&#160;&#160;&#160;&#160; 1.50000&#160;&#160;&#160; 2.50000&#160;&#160;&#160;&#160; NO      <br />4&#160;&#160;&#160; 2.05000&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160; 0.45000&#160;&#160;&#160; 2.05000&#160;&#160;&#160;&#160; NO       <br />4&#160;&#160;&#160; 2.00061&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160; 0.04939&#160;&#160;&#160; 2.00061&#160;&#160;&#160;&#160; NO       <br />4&#160;&#160;&#160; 2.00000&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160; 0.00061&#160;&#160;&#160; 2.00000&#160;&#160;&#160;&#160; NO       <br />4&#160;&#160;&#160; 2.00000&#160;&#160;&#160;&#160;&#160; 5&#160;&#160;&#160;&#160;&#160; 0.00000&#160;&#160;&#160; <font color="#ff0000">2.00000&#160;&#160;&#160;&#160; NO</font>       <br />4&#160;&#160;&#160; 2.00000&#160;&#160;&#160;&#160;&#160; 6&#160;&#160;&#160;&#160;&#160; 0.00000&#160;&#160; <font color="#ff0000">2.00000</font>&#160;&#160;&#160;&#160; <font color="#ff0000">YES </font>&#160;&#160;&#160;&#160; </p>
</blockquote>
<p>What’s the difference between count 5 and 6 since their y values look the same? We reset the tolerance value to 1e-3 rather than 1e-8, and get the outputs:</p>
<blockquote><p>x&#160;&#160;&#160;&#160;&#160;&#160; y0&#160;&#160;&#160;&#160;&#160; count&#160;&#160;&#160;&#160;&#160;&#160; w&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; y&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; is_eq_sqrt </p>
<p>4&#160;&#160;&#160; 2.50000&#160;&#160;&#160;&#160;&#160; 1&#160;&#160;&#160;&#160;&#160; 1.50000&#160;&#160;&#160; 2.50000&#160;&#160;&#160;&#160;&#160; NO     <br />4&#160;&#160;&#160; 2.05000&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160; 0.45000&#160;&#160;&#160; 2.05000&#160;&#160;&#160;&#160;&#160; NO      <br />4&#160;&#160;&#160; 2.00061&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160; 0.04939&#160;&#160;&#160; 2.00061&#160;&#160;&#160;&#160;&#160; NO      <br />4&#160;&#160;&#160; 2.00000&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160; 0.00061&#160;&#160;&#160; 2.00000&#160;&#160;&#160;&#160;&#160; NO&#160;&#160;&#160;&#160;&#160;&#160; </p>
</blockquote>
<p>The system get a faster convergence at an higher error rate, with an approximated&#160; value little away from sqrt(4). </p>
<p>We should have a deep understanding of how SAS stores numeric values, which deserves a full session to discuss, to unearth the mystery. Some basic references:</p>
<ul>
<li><em><a href="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/a000695157.htm">Numeric Precision in SAS Software</a></em></li>
<li><em><a href="http://support.sas.com/techsup/technote/ts654.pdf">Numeric Precision 101</a></em></li>
<li><em><a href="http://support.sas.com/techsup/technote/ts230.html">Dealing with Numeric Representation Error in SAS Applications</a></em></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/10/21/sas-algorithmically1-newton-raphson-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy SAS Graphing!</title>
		<link>http://www.jiangtanghu.com/blog/2010/10/17/happy-sas-graphing/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/10/17/happy-sas-graphing/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 12:02:33 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Graph]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/10/17/happy-sas-graphing/</guid>
		<description><![CDATA[I’m not a R user. Instead, I’m an observer. For example, I love the R Graph Gallery: http://addictedtor.free.fr/graphiques/thumbs.php As a SAS programmer, I also love Robert Allison&#8216;s SAS/Graph Examples and Michael Friendly&#8216;s SAS Graphic Programs and Macros (the only two SAS graph galleries available on website maintained by users): http://robslink.com/SAS/Home.htm http://www.datavis.ca/sasmac/ I used to be a [...]]]></description>
				<content:encoded><![CDATA[<p>I’m not a <a href="http://www.r-project.org/">R</a> user. Instead, I’m an observer. For example, I love the R Graph Gallery:</p>
<blockquote><p><a href="http://addictedtor.free.fr/graphiques/thumbs.php">http://addictedtor.free.fr/graphiques/thumbs.php</a></p></blockquote>
<p>As a SAS programmer, I also love <a href="http://robslink.com/">Robert Allison</a>&#8216;s SAS/Graph Examples and <a href="http://www.datavis.ca">Michael Friendly</a>&#8216;s SAS Graphic Programs and Macros (the only two SAS graph galleries available on website maintained by users):</p>
<blockquote><p><a href="http://robslink.com/SAS/Home.htm">http://robslink.com/SAS/Home.htm</a></p>
<p><a href="http://www.datavis.ca/sasmac/">http://www.datavis.ca/sasmac/</a></p></blockquote>
<p>I used to be a casual user of SAS Graph. I’d like to add Graph into my toolbox in the following month: half of it due to the encouragement of the two SAS graph gurus, the other half SAS 9.2’s exciting enhancement on graphics.</p>
<p>p.s: the official SAS graph  gallery:</p>
<p><a href="http://support.sas.com/sassamples/graphgallery/index.html">http://support.sas.com/sassamples/graphgallery/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/10/17/happy-sas-graphing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logics in mathematics and in daily life: a statistical programming example</title>
		<link>http://www.jiangtanghu.com/blog/2010/10/08/logics-in-mathematics-and-in-daily-life-a-statistical-programming-example/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/10/08/logics-in-mathematics-and-in-daily-life-a-statistical-programming-example/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 14:47:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Logic]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/10/08/logics-in-mathematics-and-in-daily-life-a-statistical-programming-example/</guid>
		<description><![CDATA[Refresh some basic logical propositions (or statements): implication:&#160;&#160;&#160;&#160;&#160;&#160; if&#160;&#160;&#160;&#160;&#160;&#160; P then&#160;&#160;&#160;&#160;&#160;&#160; Q (P—&#62;Q) inverse:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if not P then not Q (-P—&#62;-Q) converse:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if&#160;&#160;&#160;&#160;&#160;&#160; Q then&#160;&#160;&#160;&#160;&#160;&#160; P (Q—&#62;P) contrapositive: if not Q then not P (-Q—&#62;-P) contradition:&#160;&#160;&#160; if&#160;&#160;&#160;&#160;&#160;&#160; P then not Q (P—&#62;-Q) Mathematically or logically speaking, if the implication statement holds, then the contrapositive holds, [...]]]></description>
				<content:encoded><![CDATA[<p>Refresh some <a href="http://en.wikipedia.org/wiki/Contraposition">basic logical propositions</a> (or statements):</p>
<blockquote><p><font color="#ff0000">implication</font>:&#160;&#160;&#160;&#160;&#160;&#160; if&#160;&#160;&#160;&#160;&#160;&#160; P then&#160;&#160;&#160;&#160;&#160;&#160; Q (P<strong>—</strong>&gt;Q)</p>
<p><font color="#ff0000">inverse</font>:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if not P then not Q (-P<strong>—</strong>&gt;-Q)</p>
<p>converse:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if&#160;&#160;&#160;&#160;&#160;&#160; Q then&#160;&#160;&#160;&#160;&#160;&#160; P (Q<strong>—</strong>&gt;P)</p>
<p><font color="#ff0000">contrapositive</font>: if not Q then not P (-Q<strong>—</strong>&gt;-P)</p>
<p>contradition:&#160;&#160;&#160; if&#160;&#160;&#160;&#160;&#160;&#160; P then not Q (P<strong>—</strong>&gt;-Q)</p>
</blockquote>
<p>Mathematically or logically speaking, if the <font color="#ff0000">implication</font> statement holds, then the <font color="#ff0000">contrapositive</font> holds, but the <font color="#ff0000">inverse</font> does not hold, i.e., <em>if P then Q</em>, then we can get <em>if not Q then not P</em>, but we can not get <em>if not P then not Q</em>.</p>
<p>That’s all logics needed here and Let’s turn to the ambiguous English in daily life. <a href="http://en.wikipedia.org/wiki/James_Munkres">James R. Munkres</a> of MIT gave an example in <em><a href="http://www.amazon.com/Topology-2nd-James-Munkres/dp/0131816292/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1286432430&amp;sr=1-1">Topology</a></em> (2nd edition, 2000, P.7):</p>
<blockquote><p>Mr. Jones, if&#160; you get a grade below&#160; 70 on&#160; the final, you are going to flunk&#160; this course.</p>
</blockquote>
<p>We adapt it in a logical <font color="#ff0000">implication</font> form:</p>
<blockquote><p>Mr. Jones, if <font color="#ff0000">P </font>then <font color="#ff0000">Q</font>, where</p>
<p><font color="#ff0000">P</font>: you get a grade below&#160; 70 on&#160; the final</p>
<p><font color="#ff0000">Q</font>: you are going to flunk&#160; this course</p>
</blockquote>
<p>Considering the context, we can also get that the <font color="#ff0000">inverse</font> holds: if you get a grade above er or equal to 70, then you are going to pass this course(if not P then not Q ).</p>
<p>Question: when do statistical programming, what types of logics you use? </p>
<p>Answer: Not all mathematically. <em>see</em></p>
<blockquote><p>if score&lt;70 then grade=&quot;flunk&quot;;&#160; *<strong><em>if <font color="#ff0000">P</font> then <font color="#ff0000">Q</font></em></strong>;       <br />else&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; grade=&quot;pass&quot;;&#160; *<strong><em>if not P then not Q</em></strong>;</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/10/08/logics-in-mathematics-and-in-daily-life-a-statistical-programming-example/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XML and SAS</title>
		<link>http://www.jiangtanghu.com/blog/2010/10/07/xml-sas/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/10/07/xml-sas/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 03:44:38 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[CDISC]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Perl Regular Expression]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/10/07/xml-sas/</guid>
		<description><![CDATA[Last month, I gave a talk, XML: the SAS Approach, in CDISC Interchange China 2010(at the Medical School of Fudan University, Shanghai, 2010-09-15). FDA favors CDISC and HL7, the two XML based standards, and SAS programmers in biopharmaceutical industry&#160; need incorporate the XML technology into their toolboxes. Fortunately, you don’t need to be an XML [...]]]></description>
				<content:encoded><![CDATA[<p>Last month, I gave a talk, <em>XML: the SAS Approach</em>, in <a href="http://www.cdisc.org/interchange-china#2329">CDISC Interchange China 2010</a>(at the Medical School of Fudan University, Shanghai, 2010-09-15). <a href="http://www.fda.gov/">FDA</a> favors <a href="http://www.cdisc.org/">CDISC</a> and <a href="http://www.hl7.org/">HL7</a>, the two XML based standards, and SAS programmers in biopharmaceutical industry&#160; need incorporate the XML technology into their toolboxes. Fortunately, you don’t need to be an XML expert then to play XML in your daily work, and, SAS system DOES offer multiple tools and applications to handle XML files, i.e. import and export XML data:</p>
<ul>
<li>SAS data steps approach:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; import and export </li>
<li><a href="http://support.sas.com/rnd/base/xmlengine/sxle913/index.html">SAS XML Libname engine</a>:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; import and export </li>
<li><a href="http://support.sas.com/rnd/base/ods/odsmarkup/odsxml/">SAS ODS XML statement</a>(ODS MARKUP):&#160;&#160; export </li>
<li><a href="http://support.sas.com/rnd/base/cdisc/proccdisc/index.html">PROC CDISC</a>:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; import and export </li>
<li><a href="http://www.sas.com/apps/demosdownloads/92_SDL_sysdep.jsp;jsessionid=75E543A04B4ED91EFE8B8D16B73954A1.tc4j3apps1?packageID=000513&amp;jmpflag=N">SAS XML Mapper</a>:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; import </li>
<li><a href="http://www.sas.com/apps/demosdownloads/cdiscviewer_PROD__sysdep.jsp;jsessionid=75E543A04B4ED91EFE8B8D16B73954A1.tc4j3apps1?packageID=000343&amp;jmpflag=N">SAS CDISC Viewer</a>:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <em>as if</em>&#160; import </li>
</ul>
<p>The <a href="http://www.sas.com/apps/demosdownloads/cdiscviewer_PROD__sysdep.jsp;jsessionid=75E543A04B4ED91EFE8B8D16B73954A1.tc4j3apps1?packageID=000343&amp;jmpflag=N">SAS CDISC Viewer</a> and <a href="http://support.sas.com/rnd/base/cdisc/proccdisc/index.html">PROC CDISC</a> procedure are some bit toys, and the rest really work. The Perl Regular Expression(PRX) approach is also presented to export and import XML data. </p>
<p>A simple demo. First, use FILE and PUT statements to generate an XML file:</p>
<blockquote><p>data _null_;      <br />&#160;&#160;&#160; file &quot;export.xml&quot;;       <br />&#160;&#160;&#160; put &#8216;&lt;?xml version=&quot;1.0&quot; encoding=&quot;windows-1252&quot; ?&gt;&#8217;;       <br />&#160;&#160;&#160; put &#8216;&lt;ROWSET&gt;&#8217;;       <br />&#160;&#160;&#160; put &#8216;&lt;ROW&gt;&#8217;;       <br />&#160;&#160;&#160; put &#8216;&lt;text&gt; <font color="#ff0000">Welcome to CDISC Interchange 2010 China</font> &lt;/text&gt;&#8217;;       <br />&#160;&#160;&#160; put &#8216;&lt;/ROW&gt;&#8217;;       <br />&#160;&#160;&#160; put &#8216;&lt;ROW&gt;&#8217;;       <br />&#160;&#160;&#160; put &#8216;&lt;text&gt; <font color="#ff0000">We are in Shanghai!</font> &lt;/text&gt;&#8217;;       <br />&#160;&#160;&#160; put &#8216;&lt;/ROW&gt;&#8217;;       <br />&#160;&#160;&#160; put &#8216;&lt;/ROWSET&gt;&#8217;;&#160; <br />run;</p>
</blockquote>
<p>Then read the whole XML file to SAS dataset:</p>
<blockquote><p>data import0 ;      <br />&#160;&#160;&#160; infile &quot;export.xml&quot; dsd missover truncover lrecl = 1024;       <br />&#160;&#160;&#160; input line $1024.;       <br />&#160;&#160;&#160; if line = &#8221; then delete;       <br />run;</p>
</blockquote>
<p>Third step, extract the information you want(the text between &lt;text&gt; and &lt;/text&gt; tags) using&#160; Perl Regular Expression:</p>
<blockquote><p>data import (keep = line );      <br />&#160;&#160;&#160;&#160; retain queName ;       <br />&#160;&#160;&#160;&#160; retain line ;       <br />&#160;&#160;&#160;&#160; set import0;&#160;&#160;&#160;&#160;&#160; </p>
<p>&#160;&#160;&#160;&#160; /*use PRX to capture the structure of XML data;*/      <br />&#160;&#160;&#160;&#160; If _n_=1 then do;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; queName=prxparse(&#8216;/^&lt;text&gt; /&#8217;);       <br />&#160;&#160;&#160;&#160; end;       <br />&#160;&#160;&#160;&#160; queNameN=prxmatch(queName,line); </p>
<p>&#160;&#160;&#160; /*use PRX to remove the XXML tags;*/      <br />&#160;&#160;&#160;&#160; if queNameN&gt;0 then do;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rx1=prxparse(&quot;s/&lt;.*?&gt;//&quot;);       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; call prxchange(rx1,99,line);       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; output;       <br />&#160;&#160;&#160;&#160; end;&#160;&#160;&#160;&#160;&#160; <br />run;</p>
</blockquote>
<p> The logic of PRX approach to process XML data is very simple and can be easily modified according to your needs:</p>
<ul>
<li>complicate and utilize the PRX codes to capture the hierarchical structure of XML data. </li>
<li>remove XML tags and output the information to SAS dataset.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/10/07/xml-sas/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>On three statistical realms</title>
		<link>http://www.jiangtanghu.com/blog/2010/10/06/on-three-statistical-realms/</link>
		<comments>http://www.jiangtanghu.com/blog/2010/10/06/on-three-statistical-realms/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 03:37:51 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2010/10/06/on-three-statistical-realms/</guid>
		<description><![CDATA[Peter Petocz and Anna Reid(2010) grouped three levels of students’ conceptions of statistics: Level I:&#160;&#160; focus on techniques Level II:&#160; focus on using data Level III: focus on meaning I found the three conceptions could be easily interpreted as the three kinds of state of learning and using statistics based on my personal experience: State [...]]]></description>
				<content:encoded><![CDATA[<p>Peter Petocz and Anna Reid(2010) grouped three levels of students’ conceptions of statistics:</p>
<ul>
<li>Level I:&#160;&#160; focus on <strong>techniques</strong> </li>
<li>Level II:&#160; focus on <strong>using data</strong> </li>
<li>Level III: focus on <strong>meaning</strong> </li>
</ul>
<p>I found the three conceptions could be easily interpreted as the three kinds of state of learning and using statistics based on my personal experience:</p>
<ul>
<li>State I: focus on <strong>techniques</strong>—As a student of Economics and (then) Software Engineering, I needed some statistics techniques to support my study on data mining and machine learning. So I invested a lot on some fancy skills such as logistic regression, decision tree,&#160; neural network and even support vector machine in graduate school and SAS R&amp;D(as an intern). In most time, I just thrown data to the models and checked their functionality and feasibility(<em>Wula-IT-WORKS! </em>or <em>Oops-crash-again</em>). When looking back, I’d just have to say these techniques were toys played in labs. </li>
<li>State II:&#160; focus on <strong>using data—</strong>Now I worked as a SAS programmer(also titled as statistical analyst) in pharma. All data are not just the rows and columns in the tables. They are SUBJECTS! Statistical techniques are used carefully to display and interpret the story of real world. Why the denominator is 999 while 1000 subjects were recruited in this trial? Because subject 001-127, male, 23 months of age,&#160; discontinued due to his father’s wish and opinion! </li>
<li>State III: focus on <strong>meaning</strong>—Peter Petocz and Anna Reid concluded that, regarding the MEANING conception of statistics, “statistics is an inclusive tool used to make sense of the world and develop personal meanings.” The last state of any realms ideal, is always sounded like philosophy or religion. That may be a life in a statistical way or style(If got it, I would change my blog’s title as <em>From a Statistical Point of View^</em>). </li>
</ul>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;-some notes on non-statistics&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>1. three kinds of state of Chan</p>
<ul>
<li>just mountain</li>
<li>isn’t mountain</li>
<li>still mountain</li>
</ul>
<p>2. three realm ideal of Wang Guowei</p>
<ul>
<li>heaven is integrated with man:</li>
</ul>
<blockquote><p>Last night the west wind shriveled the green-clad trees,</p>
<p>Alone I climb the high tower</p>
<p>To gaze my fill along the road to the horizon.</p>
</blockquote>
<ul>
<li>knowledge is integrated with practice</li>
</ul>
<blockquote><p>My clothes grow daily more loose, yet care I not.</p>
<p>For you am I thus wasting away in sorrow and pain.</p>
</blockquote>
<ul>
<li>feeling is integrated with scenery</li>
</ul>
<blockquote><p>I sought her in the crowd a hundred, a thousand times.</p>
<p>Suddenly with a turn of the head [I saw her],</p>
<p>That one there where the lamplight was fading.</p>
</blockquote>
<p><strong>Reference:</strong></p>
<p>Peter Petocz and Anna Reid. <em>On Becoming a Statistician—A Qualitative View</em>. International Statistical Review(2010), 78,2,271</p>
<p>WANG Guowei. <a href="http://www.en84.com/article-3828-1.html">Ren jian ci hua</a><i>. translated by </i>Adele Austin Rickett.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2010/10/06/on-three-statistical-realms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>From A Logical Point of View</title>
		<link>http://www.jiangtanghu.com/blog/2009/12/21/from-a-logical-point-of-view/</link>
		<comments>http://www.jiangtanghu.com/blog/2009/12/21/from-a-logical-point-of-view/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 15:53:47 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[from a logical point of view]]></category>
		<category><![CDATA[quine]]></category>
		<category><![CDATA[robert mitchum]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2009/12/21/from-a-logical-point-of-view/</guid>
		<description><![CDATA[This blog, “From A Logical Point of View”, is not supposed to be owned by a logician. Actually, the book, From A Logical Point of View, is a collection of logical and philosophical essays by W.V.Quine(1908-2000), an American philosopher and mathematician. A story about this book. From A Logical Point of View, was a calypso [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.jiangtanghu.com/blog/wp-content/uploads/2009/12/QUIFRO.jpg"><img style="display: inline; border-width: 0px;" title="QUIFRO" src="http://www.jiangtanghu.com/blog/wp-content/uploads/2009/12/QUIFRO_thumb.jpg" border="0" alt="QUIFRO" width="158" height="244" /></a></p>
<p><span style="font-size: small;">This blog, “<a href="http://www.jiangtanghu.com/blog/">From A Logical Point of View</a>”, is not supposed to be owned by a logician. Actually, the book, <em><a href="http://www.amazon.com/Logical-Point-View-Logico-Philosophical-Revised/dp/0674323513">From A Logical Point of View</a></em>, is a collection of logical and philosophical essays by <a href="http://www.wvquine.org/">W.V.Quine</a>(1908-2000), an American philosopher and mathematician. </span></p>
<p><span style="font-size: small;">A story about this book. <em><a href="http://www.gugalyrics.com/ROBERT-MITCHUM-FROM-A-LOGICAL-POINT-OF-VIEW-LYRICS/411924/">From A Logical Point of View</a></em>, was a calypso song by <a href="http://en.wikipedia.org/wiki/Robert_Mitchum">Robert Mitchum</a>, an US actor, composer and singer. Quine enjoyed this music and used it as his new book, which is Quine’s best seller. Now I love this book and give the name to my blog from a logical point of view^.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2009/12/21/from-a-logical-point-of-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Work With Oracle: A Quick Sheet for SAS Programmers</title>
		<link>http://www.jiangtanghu.com/blog/2009/12/04/work-with-oracle-a-quick-sheet-for-sas-programmers-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2009/12/04/work-with-oracle-a-quick-sheet-for-sas-programmers-2/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 01:33:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Database 10g Express Edition]]></category>
		<category><![CDATA[SAS SQL Pass-Through Facility]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2009/12/04/work-with-oracle-a-quick-sheet-for-sas-programmers-2/</guid>
		<description><![CDATA[(Note: All the followings are tested on Windows XP environment.) 0. Install Oracle Database 10g Express Edition Fast (and free) to download, easy to deploy and simple to admin&#8211;for learning and testing purpose, Oracle Database 10g Express Edition (Oracle Database XE, a mini version of Oracle Database 10g Release 2) are strongly recommended: 0.1 Download [...]]]></description>
				<content:encoded><![CDATA[<p>(Note: All the followings are tested on Windows XP environment.)</p>
<p><strong>0. Install Oracle Database 10g Express Edition</strong></p>
<p>Fast (and free) to download, easy to deploy and simple to admin&#8211;for learning and testing purpose, Oracle Database 10g Express Edition (Oracle Database XE, a mini version of Oracle Database 10<em>g</em> Release 2) are strongly recommended:</p>
<p>0.1  Download it at <a href="http://www.oracle.com/technology/software/products/database/xe/index.html">its homepage</a>(206MB);</p>
<p>0.2 Install it following default settings;</p>
<p>0.3 Unlock accounts for HR and SCOTT. In a windows DOS prompt, using  the following scripts: </p>
<blockquote><pre>sqlplus sys/<span style="color:#ff0000;"><em>YourSysPassword</em> </span>as sysdba</pre>
<pre>alter user HR account unlock</pre>
<pre>alter user HR identified by <em><span style="color:#ff0000;">YourHRPassword</span></em></pre>
<pre>alter user SCOTT account unlock</pre>
<pre>alter user SCOTT identified by TIGER</pre>
</blockquote>
<pre>Or you can accomplish these tasks within the Oracle web application:</pre>
<blockquote><pre><a title="http://localhost:8081/apex" href="http://localhost:8081/apex">http://localhost:8081/apex</a></pre>
</blockquote>
<p><strong>1. Connect Oracle using SAS libname engine</strong></p>
<blockquote><p><em>libname SCOTT oracle user=&#8221;SCOTT&#8221; password=&#8221;TIGER&#8221; path=&#8217;xe&#8217; ;</em></p>
</blockquote>
<pre>Note: <em>xe</em> is the default path for Oracle Database XE.</pre>
<p><strong>2. Connect Oracle using SQL Procedure Pass-Through Facility</strong></p>
<blockquote><p><em>proc sql   ;<br />    connect to oracle as orcl  <br />    (user=&#8221;SCOTT&#8221;  password=&#8221;TIGER&#8221; path=&#8217;xe&#8217;);</em></p>
<p><em>    select * <br />    from connection to orcl  </em></p>
<p><span style="color:#ff0000;"><em>       (</em></span></p>
<p><span style="color:#ff0000;"><em>   <strong>SELECT …</strong></em></span></p>
<p><span style="color:#ff0000;"><em><strong><span class="Apple-style-span" style="font-weight: normal; ">    ) ;</span></strong></em></span></p>
<p><em>    disconnect from orcl;</p>
<p>quit;</em></p>
</blockquote>
<p>Note: 1) In this approach, Oracle, instead of SAS, processes the SQL statement (i.e., you use the more powerful and flexible Oracle SQL syntax instead of SAS Proc SQL procedure for querying. For more, se<em>e <a href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a001044413.htm">SAS Doc</a></em>)<em>.</em></p>
<p><em>          </em>  2) Your Oracle SQL codes should be placed in the <span style="color:#ff0000;">RED</span> blocks, and end without a semicolon(;):</p>
<blockquote><p><em>select *</p>
<p>from  emp</em></p>
</blockquote>
<p>           3) Only basic Oracle SQL statements (<em>select, create table</em>, . . .)can pass through this facility.</p>
<p><strong>3. Load SAS datasets to Oracle database</strong></p>
<blockquote><p>proc copy in=sashelp<br />           out=scott;<br />    select class;<br />run;</p>
</blockquote>
<p><strong>4. Misc: Some differences between Oracle SQL and SAS Proc SQL</strong></p>
<p><strong>4.1  Table aliases</strong></p>
<p>Oracle: <em>from employees a;</em></p>
<p>SAS:<em> from employees a;</em> or</p>
<blockquote><p>    <em>from employees <span style="color:#ff0000;">as</span> a;</em></p>
</blockquote>
<p><strong>4.2 Column aliases</strong></p>
<p>Oracle: don’t use single quotation marks(‘’).</p>
<blockquote><p><em>select  job_id <span style="color:#ff0000;">as job</span>, job_id <span style="color:#ff0000;">job</span>, job_id <span style="color:#ff0000;">as &#8220;job&#8221; <span style="color:#000000;">,</span> <strike>job_id <span style="color:#ff0000;">as ‘job’</span></strike></span></em></p>
</blockquote>
<p>SAS:</p>
<blockquote><p><em>select  job_id <span style="color:#ff0000;">as job</span>,  job_id <span style="color:#ff0000;">&#8220;job&#8221;</span> ,  job_id  <span style="color:#ff0000;">&#8216;job&#8217;</span>,  <strike><span style="color:#ff0000;">job_id  job</span></strike></em></p>
</blockquote>
<p><strong>4.3  Literal Character Strings</strong></p>
<p>Oracle: Date and character literal values must be enclosed within single quotation marks(‘’).</p>
<p>SAS: Use both single and double quotation marks.</p>
<p><strong>4.4  Order the null value</strong></p>
<p>Oracle: Null values are displayed last for ascending sequences and first for descending sequences.</p>
<p>SAS: Null values are displayed first for ascending sequences and last for descending sequences.</p>
<p><strong>4.5  Nesting Group Functions</strong></p>
<blockquote><p><em>select   max(avg(salary))<br />from     employees<br />group by department_id</em></p>
</blockquote>
<p>SAS log:</p>
<blockquote><p>ERROR: Summary functions nested in this way are not supported.</p>
</blockquote>
<p>Optional approach for SAS:<br />
<blockquote>
<p><em>select max(avg) as max<br />from(<br />    select   avg(salary) as avg<br />    from     employees<br />    group by department_id )</em></p>
</blockquote>
<p><strong>4.6   row number(_n_)</strong></p>
<p>Oracle:</p>
<blockquote><p>select   <span style="color:#ff0000;">rownum</span><br />from     employees</p>
</blockquote>
<p>SAS:</p>
<blockquote><p>select   <span style="color:#ff0000;">monotonic()</span><br />from     employees</p>
</blockquote>
<p>Note: <span style="color:#ff0000;">monotonic()</span> is an undocumented function of SAS, <em>see<span class="Apple-style-span" style="font-style: normal; "><a href="http://www2.sas.com/proceedings/sugi29/040-29.pdf">http://www2.sas.com/proceedings/sugi29/040-29.pdf</a></span></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2009/12/04/work-with-oracle-a-quick-sheet-for-sas-programmers-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run data mining codes following William Potts</title>
		<link>http://www.jiangtanghu.com/blog/2009/03/20/run-data-mining-codes-following-william-potts-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2009/03/20/run-data-mining-codes-following-william-potts-2/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 03:41:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[data mining]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[SAS Enterprise Miner]]></category>
		<category><![CDATA[William Potts]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2009/03/20/run-data-mining-codes-following-william-potts-2/</guid>
		<description><![CDATA[FYI: SAS Enterprise Miner and SAS Text Miner Procedures: Reference for SAS 9.1.3, see: &#160; http://support.sas.com/documentation/onlinedoc/miner/emtmsas913/listing.html &#160; This entry DOES exist in the SAS Support website, but it can&#8217;t be found by any search engine or documentation tree view. You&#8217;re recommended to download these files immediately due to SAS&#8217;s easy-dead hyperlinks.^-^ &#160; ps.SAS Institute provides [...]]]></description>
				<content:encoded><![CDATA[<div><font face=Arial>FYI: <em>SAS Enterprise Miner and SAS Text Miner  Procedures: Reference for SAS 9.1.3</em>, see:</font></div>
<div><font face=Arial></font>&nbsp;</div>
<div><font face=Arial><a  href="http://support.sas.com/documentation/onlinedoc/miner/emtmsas913/listing.html">http://support.sas.com/documentation/onlinedoc/miner/emtmsas913/listing.html</a></font></div>
<div><font face=Arial></font>&nbsp;</div>
<div><font face=Arial>This entry DOES exist in the SAS Support website, but it  can&#8217;t be found by any search engine or documentation tree view. </font><font  face=Arial>You&#8217;re recommended to download these files immediately due to SAS&#8217;s  easy-dead hyperlinks.^-^ </font></div>
<div><font face=Arial></font>&nbsp;</div>
<div><font face=Arial>ps.SAS Institute provides no support for the use of  Enterprise Miner and Text Miner Procedures when they are invoked directly,  outside of the Enterprise Miner graphical user  interface.</font></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2009/03/20/run-data-mining-codes-following-william-potts-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Machine Learning Courses (Stanford) in YouTube</title>
		<link>http://www.jiangtanghu.com/blog/2009/03/02/free-machine-learning-courses-stanford-in-youtube-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2009/03/02/free-machine-learning-courses-stanford-in-youtube-2/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 02:28:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[data mining]]></category>
		<category><![CDATA[machine learning]]></category>
		<category><![CDATA[stanford]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2009/03/02/free-machine-learning-courses-stanford-in-youtube-2/</guid>
		<description><![CDATA[FYI: &#160; http://www.youtube.com/view_play_list?p=A89DCFA6ADACE599]]></description>
				<content:encoded><![CDATA[<div><font face=Arial>FYI:</font></div>
<div><font face=Arial></font>&nbsp;</div>
<div><font face=Arial><a  href="http://www.youtube.com/view_play_list?p=A89DCFA6ADACE599">http://www.youtube.com/view_play_list?p=A89DCFA6ADACE599</a></font></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2009/03/02/free-machine-learning-courses-stanford-in-youtube-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAS User Books and Data Mining Software Comparision: Quick Links</title>
		<link>http://www.jiangtanghu.com/blog/2009/02/17/sas-user-books-and-data-mining-software-comparision-quick-links-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2009/02/17/sas-user-books-and-data-mining-software-comparision-quick-links-2/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 06:55:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[data mining]]></category>
		<category><![CDATA[SAS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2009/02/17/sas-user-books-and-data-mining-software-comparision-quick-links-2/</guid>
		<description><![CDATA[SAS Books Catalog(Jan, 2009) Data Mining Software 2009: Succesul Analyses at Affordable Prices(Nov. 2008, by mayato)]]></description>
				<content:encoded><![CDATA[<ol>
<li><span style="font-family: Arial; font-size: x-small;"><a href="http://support.sas.com/publishing/pdfs/jan09.pdf">SAS Books Catalog(Jan,    2009)</a></span></li>
<li><span style="font-family: Arial; font-size: x-small;"><em><a href="http://www.mayato.com/index.php?option=com_content&amp;task=view&amp;id=105&amp;Itemid=96&amp;lang=en">Data    Mining Software 2009: Succesul Analyses at Affordable Prices</a></em>(Nov.    2008, by mayato)</span></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2009/02/17/sas-user-books-and-data-mining-software-comparision-quick-links-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basel II on Incremental Risk Charge(IRC): Quick Links</title>
		<link>http://www.jiangtanghu.com/blog/2009/02/12/basel-ii-on-incremental-risk-chargeirc-quick-links-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2009/02/12/basel-ii-on-incremental-risk-chargeirc-quick-links-2/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 01:37:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Quantitative finance]]></category>
		<category><![CDATA[basel II]]></category>
		<category><![CDATA[Incremental Risk Charge]]></category>
		<category><![CDATA[IRC]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2009/02/12/basel-ii-on-incremental-risk-chargeirc-quick-links-2/</guid>
		<description><![CDATA[Basel Committee on Banking Supervision(Jan, 2009). Guidelines for computing capital for incremental default risk in the trading book. Consultative document. January. IRC Comments by RiskMetrics]]></description>
				<content:encoded><![CDATA[<ol>
<li><span style="font-family: Arial; font-size: x-small;"><a href="http://www.bis.org/publ/bcbs149.pdf">Basel Committee on Banking    Supervision(Jan, 2009). Guidelines for computing capital for incremental    default risk in the trading book. Consultative document.    January.</a></span></li>
<li><span style="font-family: Arial; font-size: x-small;"><a href="http://www.riskmetrics.com/sites/default/files/Research20090200.pdf">IRC    Comments</a> by RiskMetrics</span></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2009/02/12/basel-ii-on-incremental-risk-chargeirc-quick-links-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FYI: Dashboard using SAS/Graph</title>
		<link>http://www.jiangtanghu.com/blog/2009/01/13/fyi-dashboard-using-sasgraph-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2009/01/13/fyi-dashboard-using-sasgraph-2/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 07:01:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Dashboard]]></category>
		<category><![CDATA[Graph]]></category>
		<category><![CDATA[SASk]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2009/01/13/fyi-dashboard-using-sasgraph-2/</guid>
		<description><![CDATA[see, http://support.sas.com/kb/26/134.html Slider chart indicator: SAS program version stored process version portlet version Slider chart dashboard: SAS program version stored process version portlet version Bullet graph indicator: SAS program version stored process version portlet version Bullet graph dashboard: SAS program version stored process version portlet version Dial meter indicator: SAS program version stored process version [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://1.bp.blogspot.com/_qlX7zyUQhog/SWw8f0hrkmI/AAAAAAAABFs/kciTZXVbaTU/s1600-h/dashboard.gif" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5290670179627012706" style="cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_qlX7zyUQhog/SWw8f0hrkmI/AAAAAAAABFs/kciTZXVbaTU/s320/dashboard.gif" border="0" alt="" /></a></p>
<p><span style="font-style: italic;">see</span>,<a href="http://support.sas.com/kb/26/134.html"> http://support.sas.com/kb/26/134.html</a></p>
<ul>
<li>Slider chart indicator:
<ul>
<li><a href="http://support.sas.com/kb/26104.html">SAS program version</a></li>
<li><a href="http://support.sas.com/kb/26114.html">stored process version</a></li>
<li><a href="http://support.sas.com/kb/26124.html">portlet version</a></li>
</ul>
</li>
<li>Slider chart dashboard:
<ul>
<li><a href="http://support.sas.com/kb/26105.html">SAS program version</a></li>
<li><a href="http://support.sas.com/kb/26115.html">stored process version</a></li>
<li><a href="http://support.sas.com/kb/26125.html">portlet version</a></li>
</ul>
</li>
<li>Bullet graph indicator:
<ul>
<li><a href="http://support.sas.com/kb/26106.html">SAS program version</a></li>
<li><a href="http://support.sas.com/kb/26116.html">stored process version</a></li>
<li><a href="http://support.sas.com/kb/26126.html">portlet version</a></li>
</ul>
</li>
<li>Bullet graph dashboard:
<ul>
<li><a href="http://support.sas.com/kb/26107.html">SAS program version</a></li>
<li><a href="http://support.sas.com/kb/26117.html">stored process version</a></li>
<li><a href="http://support.sas.com/kb/26127.html">portlet version</a></li>
</ul>
</li>
<li>Dial meter indicator:
<ul>
<li><a href="http://support.sas.com/kb/26108.html">SAS program version</a></li>
<li><a href="http://support.sas.com/kb/26118.html">stored process version</a></li>
<li><a href="http://support.sas.com/kb/26128.html">portlet version</a></li>
</ul>
</li>
<li>Dial meter dashboard:
<ul>
<li><a href="http://support.sas.com/kb/26109.html">SAS program version</a></li>
<li><a href="http://support.sas.com/kb/26119.html">stored process version</a></li>
<li><a href="http://support.sas.com/kb/26129.html">portlet version</a></li>
</ul>
</li>
<li>Bar chart indicator:
<ul>
<li><a href="http://support.sas.com/kb/26110.html">SAS program version</a></li>
<li><a href="http://support.sas.com/kb/26120.html">stored process version</a></li>
<li><a href="http://support.sas.com/kb/26130.html">portlet version</a></li>
</ul>
</li>
<li>Bar chart dashboard:
<ul>
<li><a href="http://support.sas.com/kb/26111.html">SAS program version</a></li>
<li><a href="http://support.sas.com/kb/26121.html">stored process version</a></li>
<li><a href="http://support.sas.com/kb/26131.html">portlet version</a></li>
</ul>
</li>
<li>Telesales dashboard:
<ul>
<li><a href="http://support.sas.com/kb/26112.html">SAS program version</a></li>
<li><a href="http://support.sas.com/kb/26122.html">stored process version</a></li>
<li><a href="http://support.sas.com/kb/26132.html">portlet version</a></li>
</ul>
</li>
<li>Web marketing analysis dashboard:
<ul>
<li><a href="http://support.sas.com/kb/26113.html">SAS program version</a></li>
<li><a href="http://support.sas.com/kb/26123.html">stored process version</a></li>
<li><a href="http://support.sas.com/kb/26133.html">portlet version</a></li>
</ul>
</li>
</ul>
<p>You would also like, <span style="font-style: italic;">Santa&#8217;s Dashboard</span>:<br />
<a href="http://jiangtanghu.blogspot.com/2008/12/santa-and-sas-again-santa-dashboard.html">http://jiangtanghu.blogspot.com/2008/12/santa-and-sas-again-santa-dashboard.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2009/01/13/fyi-dashboard-using-sasgraph-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>R or SAS: Quick Links to the Recent Debates</title>
		<link>http://www.jiangtanghu.com/blog/2009/01/13/r-or-sas-quick-links-to-the-recent-debates-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2009/01/13/r-or-sas-quick-links-to-the-recent-debates-2/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 02:37:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[New York Times]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[SAS-L]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2009/01/13/r-or-sas-quick-links-to-the-recent-debates-2/</guid>
		<description><![CDATA[Original post, 7 Jan, 2009 New York Times, Data Analysts Captivated by R&#8217;s Power byAshlee Vance. Key Point The popularity of R at universities could threaten SAS Institute. A Controversial Review by Anee Milley from SAS We have customers who build engines for aircraft. I am happy they are not using freeware when I get [...]]]></description>
				<content:encoded><![CDATA[<p><span style="font-family: Arial;"> </span></p>
<div><strong><br />
Original post, 7 Jan, 2009</strong></div>
<div><strong> </strong></div>
<div>New York Times, <a href="http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html" target="_blank"><em><span style="color: #669966;">Data Analysts Captivated by R&#8217;s  Power</span></em></a> by<a href="http://topics.nytimes.com/top/reference/timestopics/people/v/ashlee_vance/index.html?inline=nyt-per" target="_blank"><span style="color: #669966;">Ashlee Vance</span></a>.</div>
<div></div>
<div><strong><br />
Key Point</strong></div>
<div></div>
<div>The popularity of R at universities could threaten SAS Institute.</div>
<div></div>
<div><strong><br />
A Controversial Review by Anee Milley from SAS</strong></div>
<div><strong> </strong></div>
<div>We have customers who build engines for aircraft. I am happy they are not  using freeware when I get on a jet.</div>
<div></div>
<div><strong><br />
7 Jan, 2009, </strong><a href="http://www.listserv.uga.edu/cgi-bin/wa?A1=ind0901b&amp;L=sas-l#44" target="_blank"><span style="color: #669966;"><strong>SAS-L</strong></span></a></div>
<div></div>
<div>Discussion in <a href="http://www.listserv.uga.edu/cgi-bin/wa?A1=ind0901b&amp;L=sas-l#44" target="_blank"><span style="color: #669966;">SAS-L</span></a>, the most popular SAS mailing  list. Most voices call for the incorporate both R and SAS.</div>
<div></div>
<div><strong><br />
7 Jan, 2009, </strong><a href="http://groups.google.com/group/r-help-archive/browse_thread/thread/5502fdc60d063833/352fc11a5b833f12" target="_blank"><span style="color: #669966;"><strong>R-help</strong></span></a></div>
<div></div>
<div>Cheer for the victory of R.</div>
<div></div>
<div><strong><br />
8 Jan, 2009, </strong><a href="http://topics.nytimes.com/top/reference/timestopics/people/v/ashlee_vance/index.html?inline=nyt-per" target="_blank"><span style="color: #669966;"><strong>Ashlee  Vance</strong></span></a><strong>&#8216;s blog</strong></div>
<div></div>
<div><a href="http://bits.blogs.nytimes.com/2009/01/08/r-you-ready-for-r/" target="_blank"><em><span style="color: #669966;">R You Ready for R</span></em></a>, with  lots of comments</div>
<div></div>
<div><strong><br />
9 Jan, 2009, </strong><a href="http://groups.google.com/group/sasconsulting/topics" target="_blank"><span style="color: #669966;"><strong>SAS Consulting</strong></span></a></div>
<div></div>
<div><strong><br />
9 Jan, 2009, Anee Milley</strong></div>
<div><a href="http://blogs.sas.com/sascom/index.php?/archives/434-This-post-is-rated-R.html" target="_blank"><em><span style="color: #669966;">This Post Is Rated R</span></em></a>,  stating the viewpoints from SAS about open source software: support  and participant.</div>
<div></div>
<div>For more, see <a href="http://blogsearch.google.com/blogsearch?hl=en&amp;ie=UTF-8&amp;q=R+SAS&amp;btnG=Search+Blogs" target="_blank"><span style="color: #669966;">Google Blog  Search</span></a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2009/01/13/r-or-sas-quick-links-to-the-recent-debates-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Options Pricing Using SAS</title>
		<link>http://www.jiangtanghu.com/blog/2009/01/06/options-pricing-using-sas-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2009/01/06/options-pricing-using-sas-2/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 08:20:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Black]]></category>
		<category><![CDATA[Black-Scholes]]></category>
		<category><![CDATA[Call]]></category>
		<category><![CDATA[Currency Option]]></category>
		<category><![CDATA[Exchange Option]]></category>
		<category><![CDATA[Financial Engineering]]></category>
		<category><![CDATA[Financial Functions]]></category>
		<category><![CDATA[Futures Option]]></category>
		<category><![CDATA[Garman-Kohlhagen]]></category>
		<category><![CDATA[Margrabe]]></category>
		<category><![CDATA[Options]]></category>
		<category><![CDATA[Put]]></category>
		<category><![CDATA[SAS9.2]]></category>
		<category><![CDATA[Stock Option]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2009/01/06/options-pricing-using-sas-2/</guid>
		<description><![CDATA[There are some new financial functions in SAS9.2 Base, including 8 options pricing functions(formerly in SAS Risk Dimension). These functions can compute the price of both call and put options on different underlying assets (stock, futures, currency, and exchange asset), using the following models respectively: Black-Scholes model，the traditional stock options pricing model, see Fischer Black [...]]]></description>
				<content:encoded><![CDATA[<p>There are some new financial functions in SAS9.2 Base, including 8 options pricing  functions(formerly in SAS Risk Dimension). These functions can compute the price of both call and put  options on different underlying assets (stock, futures, currency, and exchange  asset), using the following models respectively:</p>
<blockquote>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Black-Scholes" target="_blank"><span style="color: #669966;">Black-Scholes model</span></a>，the traditional stock options    pricing model, <em>see</em> <a href="http://riem.swufe.edu.cn/new/techupload/course/200742423245359181.pdf" target="_blank"><span style="color: #669966;">Fischer Black and Myron Scholes    (1973)</span></a> ;</li>
</ul>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Black_model" target="_blank"><span style="color: #669966;">Black model</span></a>，extension of    Black-Scholes model on futures option (also called Black-76 model)，<em>see </em><a href="http://math.ucalgary.ca/%7Eware/jc/black76_slides.pdf" target="_blank"><span style="color: #669966;">Fischer Black(1976)</span></a>;</li>
</ul>
<ul>
<li><a href="http://www.riskglossary.com/link/garman_kohlhagen_1983.htm" target="_blank"><span style="color: #669966;">Garman-Kohlhagen model</span></a>，pricing    model on foreign currency options，<em>see </em><a href="http://ideas.repec.org/a/eee/jimfin/v2y1983i3p231-237.html" target="_blank"><span style="color: #669966;">Mark Garman and Steven    Kohlhagen(1983)</span></a> ;</li>
</ul>
<ul>
<li><a href="http://www.sitmo.com/eq/671" target="_blank"><span style="color: #669966;">Margrabe model</span></a>，on exchange    options，<em>see </em><a href="http://www.er.ethz.ch/teaching/Margrabe_Option.pdf" target="_blank"><span style="color: #669966;">William Margrabe(1978)</span></a>.</li>
</ul>
</blockquote>
<table border="0" cellspacing="0" cellpadding="2" width="473">
<tbody>
<tr>
<td width="137" valign="top">Model</td>
<td width="103" valign="top">Underlying</td>
<td width="119" valign="top">Call</td>
<td width="112" valign="top">Put</td>
</tr>
<tr>
<td width="134" valign="top">Black model</td>
<td width="104" valign="top">Futures</td>
<td width="120" valign="top">BLACK<span style="color: #ff0000;">CL</span>PRC</td>
<td width="112" valign="top">BLACK<span style="color: #ff0000;">PT</span>PRC</td>
</tr>
<tr>
<td width="133" valign="top">Black-Scholes model</td>
<td width="105" valign="top">Stock</td>
<td width="121" valign="top">BLKSH<span style="color: #ff0000;">CL</span>PRC</td>
<td width="112" valign="top">BLKSH<span style="color: #ff0000;">PT</span>PRC</td>
</tr>
<tr>
<td width="132" valign="top">Garman-Kohlhagen model</td>
<td width="105" valign="top">Currency</td>
<td width="122" valign="top">GARKH<span style="color: #ff0000;">CL</span>PRC</td>
<td width="112" valign="top">GARKH<span style="color: #ff0000;">PT</span>PRC</td>
</tr>
<tr>
<td width="133" valign="top">Margrabe model</td>
<td width="105" valign="top">Exchange</td>
<td width="122" valign="top">MARGR<span style="color: #ff0000;">CL</span>PRC</td>
<td width="112" valign="top">MARGR<span style="color: #ff0000;">PT</span>PRC</td>
</tr>
</tbody>
</table>
<ul>
<li>BLACKCLPRC: calculates the call price for European options on futures, based on the Black model.</li>
</ul>
<ul>
<li>BLACKPTPRC: calculates the put price for European options on futures, based on the Black model.</li>
</ul>
<ul>
<li>BLKSHCLPRT: calculates the call price for European options, based on the Black-Scholes model.</li>
</ul>
<ul>
<li>BLKSHPTPRT: calculates the put price for European options, based on the Black-Scholes model.</li>
</ul>
<ul>
<li>GARKHCLPRC: calculates the call price for European options on currencies, based on the Garman-Kohlhagen model.</li>
</ul>
<ul>
<li>GARKHPTPRC: calculates the put price for European options on currencies, based on the Garman-Kohlhagen model.</li>
</ul>
<ul>
<li>MARGRCLPRC: calculates the call price for European options on exchange assets, based on the Margrabe model.</li>
</ul>
<ul>
<li>MARGRPTPRC: calculates the put price for European options on exchange assets, based on the Margrabe model.</li>
</ul>
<p>For more，see SAS9.2 online help，<em>Functions and CALL Routines by Category:  Financial</em>：<br />
<a href="http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000245860.htm"><span style="color: #669966;">http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000245860.htm</span></a></p>
<p>Note: A good web site for options pricing with different models, <a title="http://www.montegodata.co.uk/" href="http://www.montegodata.co.uk/"><span style="color: #669966;">http://www.montegodata.co.uk/</span></a></p>
<p><span style="color: #669966;"> </span></p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a25c1b69-c356-4773-9162-c96f6558b8e8" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; display: inline;">del.icio.us  Tags: <a rel="tag" href="http://del.icio.us/popular/SAS"><span style="color: #669966;">SAS</span></a>,<a rel="tag" href="http://del.icio.us/popular/Base"><span style="color: #669966;">Base</span></a>,<a rel="tag" href="http://del.icio.us/popular/ETS"><span style="color: #669966;">ETS</span></a>,<a rel="tag" href="http://del.icio.us/popular/SAS9.2"><span style="color: #669966;">SAS9.2</span></a>,<a rel="tag" href="http://del.icio.us/popular/Financial%20Functions"><span style="color: #669966;">Financial Functions</span></a>,<a rel="tag" href="http://del.icio.us/popular/Options"><span style="color: #669966;">Options</span></a>,<a rel="tag" href="http://del.icio.us/popular/Call"><span style="color: #669966;">Call</span></a>,<a rel="tag" href="http://del.icio.us/popular/Put"><span style="color: #669966;">Put</span></a>,<a rel="tag" href="http://del.icio.us/popular/Pricing"><span style="color: #669966;">Pricing</span></a>,<a rel="tag" href="http://del.icio.us/popular/Black-Scholes%20model"><span style="color: #669966;">Black-Scholes model</span></a>,<a rel="tag" href="http://del.icio.us/popular/Black%20model"><span style="color: #669966;">Black model</span></a>,<a rel="tag" href="http://del.icio.us/popular/Black-76"><span style="color: #669966;">Black-76</span></a>,<a rel="tag" href="http://del.icio.us/popular/Garman-Kohlhagen%20model"><span style="color: #669966;">Garman-Kohlhagen model</span></a>,<a rel="tag" href="http://del.icio.us/popular/Margrabe%20model"><span style="color: #669966;">Margrabe model</span></a>,<a rel="tag" href="http://del.icio.us/popular/Futures%20Option"><span style="color: #669966;">Futures Option</span></a>,<a rel="tag" href="http://del.icio.us/popular/Stock%20Option"><span style="color: #669966;">Stock Option</span></a>,<a rel="tag" href="http://del.icio.us/popular/Currency%20Option"><span style="color: #669966;">Currency Option</span></a>,<a rel="tag" href="http://del.icio.us/popular/Exchange%20Option"><span style="color: #669966;">Exchange Option</span></a>,<a rel="tag" href="http://del.icio.us/popular/Financial%20Engineering"><span style="color: #669966;">Financial Engineering</span></a></div>
<p><span style="font-family: Arial; font-size: 85%;"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2009/01/06/options-pricing-using-sas-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy New Year</title>
		<link>http://www.jiangtanghu.com/blog/2009/01/01/happy-new-year-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2009/01/01/happy-new-year-2/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 15:45:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[Happy New Year]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2009/01/01/happy-new-year-2/</guid>
		<description><![CDATA[新年快乐 ( Xin Nian Kuai Le), Guten Rutsch ins neue Jahr, Bonne Année, Nav varsh ki shubh kamnayey, Felice Anno Nuovo, Feliz Año Nuevo, Feliz Ano Novo, 明けましておめでとうございます (Akemashite Omedetô), Gelukkig Nieuwjaar, Szczęśliwego Nowego Roku, Καλή Χρονιά (Kalí Chroniá), Seh Heh Bok Mani Bat Uh Seyo, חג חנוכה שמח (Hag Hanukkah Sameah), Cчастливого Нового Года, [...]]]></description>
				<content:encoded><![CDATA[<div class="gmail_quote">新年快乐 ( Xin Nian Kuai Le),</p>
<div class="gmail_quote">
<div>Guten  Rutsch ins neue Jahr,<br />
Bonne Année,<br />
Nav varsh ki shubh kamnayey,<br />
Felice Anno Nuovo,<br />
Feliz Año Nuevo,<br />
Feliz Ano Novo,<br />
明けましておめでとうございます (Akemashite Omedetô),<br />
Gelukkig Nieuwjaar,<br />
Szczęśliwego Nowego Roku,<br />
Καλή Χρονιά (Kalí Chroniá),<br />
Seh Heh Bok  Mani Bat Uh Seyo,<br />
חג חנוכה שמח (Hag Hanukkah Sameah),<br />
Cчастливого Нового  Года,</div>
<p>Happy New Year,</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2009/01/01/happy-new-year-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Links: Risk Intelligence Vendors Review: 2008</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/25/links-risk-intelligence-vendors-review-2008-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/25/links-risk-intelligence-vendors-review-2008-2/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 08:26:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[Celnet]]></category>
		<category><![CDATA[FinTech100]]></category>
		<category><![CDATA[Risk]]></category>
		<category><![CDATA[Risk Intelligence]]></category>
		<category><![CDATA[Risk Vendors]]></category>
		<category><![CDATA[RiskTech100]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/25/links-risk-intelligence-vendors-review-2008-2/</guid>
		<description><![CDATA[You can get the big picture viewing different sources(REMEMBER: A vendor&#8217;s research methodology is as important as its rating): Chartis RiskTech 100 (October 2008) http://www.chartisresearch.com/showreport.asp?id=46 FinTech100(2008) http://www.americanbanker.com/article.html?id=20081112EGE9065B FinTech100(2008): Top 25 Enterprise Companies http://www.americanbanker.com/article.html?id=200811125HE027YZ FinTech100(2008): Banking Top 10 http://www.americanbanker.com/article.html?id=20081112UMI813RM FinTech100(2008): Capital Market Top 10 http://www.americanbanker.com/article.html?id=20081112N00MER4M FinTech100(2008): Insurance Top 10 http://www.americanbanker.com/article.html?id=200811125LHKU4ZO Celnet Credit Risk/Basel II Vendors(2008): http://www.celent.com/PressReleases/200804143/FinCreditRiskVendors.asp]]></description>
				<content:encoded><![CDATA[<div><span style="font-family: Arial;">You can get the big picture viewing different  sources(REMEMBER: A vendor&#8217;s research methodology is as important as its  rating):</p>
<p></span></div>
<div></div>
<div><span style="font-family: Arial;">Chartis RiskTech 100 (October 2008)</span></div>
<div><span style="font-family: Arial;"><a href="http://www.chartisresearch.com/showreport.asp?id=46">http://www.chartisresearch.com/showreport.asp?id=46</a></p>
<p><a href="http://2.bp.blogspot.com/_qlX7zyUQhog/SVNELKlQf2I/AAAAAAAABBk/O9jIagazNHU/s1600-h/RiskTech100-2008.PNG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5283641746445598562" style="cursor: pointer; width: 320px; height: 290px;" src="http://2.bp.blogspot.com/_qlX7zyUQhog/SVNELKlQf2I/AAAAAAAABBk/O9jIagazNHU/s320/RiskTech100-2008.PNG" border="0" alt="" /></a></p>
<p></span></div>
<div><span style="font-family: Arial; font-size: 85%;"> </span></div>
<div><img src="cid:01d201c9666a$7afda6e0$22121bac@apac.sas.com" border="0" alt="" hspace="0" align="baseline" /></div>
<div><span style="font-family: Arial;"> </span></div>
<div><span style="font-family: Arial;"><br />
FinTech100(2008)</span></div>
<div><span style="font-family: Arial;"><a href="http://www.americanbanker.com/article.html?id=20081112EGE9065B">http://www.americanbanker.com/article.html?id=20081112EGE9065B</a></p>
<p></span></div>
<div><span style="font-family: Arial;"> </span></div>
<div><span style="font-family: Arial;">FinTech100(2008): Top 25 Enterprise Companies</span></div>
<div><span style="font-family: Arial;"><a href="http://www.americanbanker.com/article.html?id=200811125HE027YZ">http://www.americanbanker.com/article.html?id=200811125HE027YZ</a></p>
<p></span></div>
<div><span style="font-family: Arial;"> </span></div>
<div><span style="font-family: Arial;">FinTech100(2008): Banking Top 10</span></div>
<div><span style="font-family: Arial;"><a href="http://www.americanbanker.com/article.html?id=20081112UMI813RM">http://www.americanbanker.com/article.html?id=20081112UMI813RM</a></p>
<p></span></div>
<div><span style="font-family: Arial;"> </span></div>
<div><span style="font-family: Arial;">FinTech100(2008): Capital Market Top 10</span></div>
<div><span style="font-family: Arial;"><a href="http://www.americanbanker.com/article.html?id=20081112N00MER4M">http://www.americanbanker.com/article.html?id=20081112N00MER4M</a></p>
<p></span></div>
<div><span style="font-family: Arial;"> </span></div>
<div><span style="font-family: Arial;">FinTech100(2008): Insurance Top 10</span></div>
<div><span style="font-family: Arial;"><a href="http://www.americanbanker.com/article.html?id=200811125LHKU4ZO">http://www.americanbanker.com/article.html?id=200811125LHKU4ZO</a></p>
<p></span></div>
<div><span style="font-family: Arial;"> </span></div>
<div><span style="font-family: Arial;">Celnet Credit Risk/Basel II Vendors(2008):</span></div>
<div><span style="font-family: Arial;"><a href="http://www.celent.com/PressReleases/200804143/FinCreditRiskVendors.asp">http://www.celent.com/PressReleases/200804143/FinCreditRiskVendors.asp</a><br />
</span><a href="http://2.bp.blogspot.com/_qlX7zyUQhog/SVNEYBQ4f9I/AAAAAAAABBs/3LU_2yt0-Ac/s1600-h/Celent10.PNG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5283641967282520018" style="cursor: pointer; width: 320px; height: 238px;" src="http://2.bp.blogspot.com/_qlX7zyUQhog/SVNEYBQ4f9I/AAAAAAAABBs/3LU_2yt0-Ac/s320/Celent10.PNG" border="0" alt="" /></a></div>
<div><img src="cid:01d301c9666a$7afda6e0$22121bac@apac.sas.com" border="0" alt="" hspace="0" align="baseline" /></div>
<div><span style="font-family: Arial;"> </span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/25/links-risk-intelligence-vendors-review-2008-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Links&#8211;BI Industry 2008: Review and Prospect</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/24/links-bi-industry-2008-review-and-prospect-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/24/links-bi-industry-2008-review-and-prospect-2/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 09:42:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Data Warehouse]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[SPSS]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/24/links-bi-industry-2008-review-and-prospect-2/</guid>
		<description><![CDATA[/*Thanks the hints supplied by: A look back at 2008 and some crystal ball predictions&#8230;, byTammi Kay Geroge, from SASBlog*/ Major Data Warehousing Events of 2008 (and Predictions for 2009), by Michael Schiff, from TDWI, Major Data Warehousing Events of 2008: Everyone had an appliance story Industry consolidations continued The recessionary environment encourage further BI [...]]]></description>
				<content:encoded><![CDATA[<div><span style="font-family: Arial; font-size: 100%;"> </span><span style="font-family: Arial; font-size: 100%;">/*Thanks the hints supplied by: </span></p>
<p><span style="font-family: Arial; font-size: 100%;"> </span></p>
<p><span style="font-family: Arial; font-size: 100%;"><a href="http://blogs.sas.com/bipie/index.php?/archives/43-A-look-back-at-2008-and-some-crystal-ball-predictions....html"><span style="color: #669966;"><em>A look back at 2008 and some crystal ball predictions&#8230;,</em> </span></a>byTammi Kay Geroge, from <a href="http://blogs.sas.com/"><span style="color: #669966;">SASBlog</span></a>*/ </span></p>
<p><span style="font-family: Arial; font-size: 100%;"> </span></p>
<p><span style="font-family: Arial; font-size: 100%;"><a href="http://www.tdwi.org/News/display.aspx?ID=9261"><span style="color: #669966;">Major Data Warehousing Events of 2008 (and Predictions for 2009), </span></a>by Michael Schiff, from <a href="http://www.tdwi.org/"><span style="color: #669966;">TDWI</span></a>, </span></p>
<p><span style="font-family: Arial; font-size: 100%;"> </span></p>
<blockquote><p><span style="font-family: Arial; font-size: 100%;"> </span><span style="font-family: Arial; font-size: 100%;">Major Data Warehousing Events of 2008: </span></p>
<p><span style="font-family: Arial; font-size: 100%;"> </span></p>
<ul><span style="font-family: Arial; font-size: 100%;"></p>
<li>Everyone had an appliance story</li>
<li>Industry consolidations continued</li>
<li>The recessionary environment encourage further BI developments</li>
<li>Open source grew</li>
<p></span></ul>
</blockquote>
<p><span style="font-family: Arial; font-size: 100%;"> </span></p>
<blockquote><p><span style="font-family: Arial; font-size: 100%;"> </span><span style="font-family: Arial; font-size: 100%;">Predictions for 2009: </span></p>
<p><span style="font-family: Arial; font-size: 100%;"> </span></p>
<ul><span style="font-family: Arial; font-size: 100%;"></p>
<li>Further industry consolidation(Informatica by HP, SPSS by SAP)</li>
<li>Cloud computing will come down to earth</li>
<li>Open source growth will accelerate</li>
<li>The IT world will become greener</li>
<li>Major emphasis on solutions rather than tools and technology</li>
<p></span></ul>
</blockquote>
<p><span style="font-family: Arial; font-size: 100%;"> </span></p>
<p><span style="font-family: Arial; font-size: 100%;"><em><a href="http://www.b-eye-network.com/view/9298"><span style="color: #669966;">BusinessIntelligence Tools: Year in Review</span></a></em>，by  Cindi Howson, from<a href="http://www.b-eye-network.com/"><span style="color: #669966;"> BeyeNetwork</span></a></span></p>
<p><span style="font-family: Arial; font-size: 100%;"> </span></p>
<p><span style="font-family: Arial; font-size: 100%;"><em><a href="http://news.zdnet.com/2424-9595_22-255255.html"><span style="color: #669966;">Top Virtualization Trends for 2009</span></a></em>, by John Suit,  from <a href="http://www.zdnet.com/"><span style="color: #669966;">ZDNet</span></a></span></p>
<p><span style="font-family: Arial; font-size: 100%;"> </span></p>
<p><span style="font-family: Arial; font-size: 100%;"><a href="http://www.intelligententerprise.com/blog/archives/2008/12/a_prediction_fo.html"><span style="color: #669966;"><em>Surround the Warehouse: Prediction for 2009</em> </span></a>,  by Neil Raden, from <a href="http://www.intelligententerprise.com/"><span style="color: #669966;">IntelligentEnterprise</span></a></span></p>
<p><span style="font-family: Arial; font-size: 100%;"> </span></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/24/links-bi-industry-2008-review-and-prospect-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Industry Review: SAS and Teradata Partnership</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/19/industry-review-sas-and-teradata-partnership-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/19/industry-review-sas-and-teradata-partnership-2/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 02:44:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[data mining]]></category>
		<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[Anti-Money Laundering]]></category>
		<category><![CDATA[Business Analytics]]></category>
		<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[Credit Risk]]></category>
		<category><![CDATA[Data Warehouse]]></category>
		<category><![CDATA[Enterprise Intelligence and Optimization Services]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Teradata]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/19/industry-review-sas-and-teradata-partnership-2/</guid>
		<description><![CDATA[SAS and Teradata Partnership: Press Leading Companies See Value in SAS and Teradata Partnership SAS and Teradata Unveil Advantage Program to Bring Powerful In-Database Solutions and Services to Customers SAS and Teradata Enter into Strategic Partnership In BI industry, the pure players such as SAS, Teradata and Microstrategy, need to demonstrate their indispensable values against [...]]]></description>
				<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: Arial; font-size: 100%;">SAS and Teradata  Partnership: Press</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: Arial; font-size: 100%;"> </span></p>
<ol>
<li><span style="font-family: Arial; font-size: 100%;"><a href="http://www.sas.com/news/preleases/SASandTeradataAdvantageProgram.html">Leading Companies See Value in SAS and Teradata  Partnership</a></span></li>
<li><span style="font-family: Arial; font-size: 100%;"><a href="http://www.sas.com/news/preleases/TeradataAdvantageProgram.html">SAS and Teradata Unveil Advantage Program to Bring Powerful In-Database  Solutions and Services to Customers</a></span></li>
<li><span style="font-family: Arial; font-size: 100%;"><a href="http://www.teradata.com/t/page/173874/index.html">SAS and  Teradata Enter into Strategic Partnership</a></span><span style="font-size: 100%;"><span style="font-family: Arial; font-size: 10;"><br />
</span></span></li>
</ol>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: Arial; font-size: 100%;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 100%;"><span style="font-family: Arial; font-size: 10;"><br />
</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 100%;"><span style="font-family: Arial; font-size: 10;">In BI industry, the pure players  such as SAS, Teradata and Microstrategy, need to demonstrate their indispensable  values against the megavendors, IBM (acquired Cognos), SAP (acquired Business  Object), Oracle (acquired Hyperion) and Microsoft. Teradata is solely focused on  enterprise data warehouse. SAS, dominating in business analytics (e.g. advanced  statistics and data mining), will check and balance the BI industry due to the  private-hold structure. SAS and Teradata Advantage Program partnership, includes  wide business lines, such as Analytics, AML (Anti-Money Laundering), Credit  Risk, Enterprise Intelligence and Optimization Services. I think It&#8217;s a  effective way to learn from each other in mutual emulation and</span><span style="font-family: Times New Roman;"> </span><span style="font-family: Arial; font-size: 10;">counterbalance the </span><span class="wbtrmn"><span style="font-family: Times New Roman;">concentration</span></span><span style="font-family: Arial; font-size: 10;"> market.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/19/industry-review-sas-and-teradata-partnership-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Santa and SAS Again: Santa&#8217;s Dashboard</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/18/santa-and-sas-again-santas-dashboard-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/18/santa-and-sas-again-santas-dashboard-2/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 01:34:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Christmas]]></category>
		<category><![CDATA[Dashboard]]></category>
		<category><![CDATA[Graph]]></category>
		<category><![CDATA[Robert Allison]]></category>
		<category><![CDATA[Santa]]></category>
		<category><![CDATA[Visualization]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/18/santa-and-sas-again-santas-dashboard-2/</guid>
		<description><![CDATA[(santaDashBoard.png, With permission by Mr. Robert Allison) Merry Christmas again. SAS marketing staff started up an interesting Christmas campaign on how Santa operates his workshop. Here is another wonderful work about Santa&#8217;s Dashboard, created by SAS senior R&#38;D staff, Robert Allison. Robert is a master of graphics and visualization. You can view his SAS/Graph examples [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://lh4.ggpht.com/_qlX7zyUQhog/SUmosq74IVI/AAAAAAAABAA/x8sNnZxdwlM/s1600-h/santaDashBoard%5B6%5D.png"><img style="border-width: 0px;" src="http://lh3.ggpht.com/_qlX7zyUQhog/SUmotX9AsmI/AAAAAAAABAE/60L97qotFbI/santaDashBoard_thumb%5B4%5D.png?imgmax=800" border="0" alt="santaDashBoard" width="358" height="358" align="left" /></a></p>
<p><em>(santaDashBoard.png, With permission by Mr. Robert Allison)</em></p>
<p>Merry Christmas again. SAS marketing staff started up an interesting Christmas campaign on <a href="http://jiangtanghu.blogspot.com/2008/12/delivers-right-toys-and-goodies-to.html" target="_blank">how Santa operates his workshop</a>. Here is another wonderful work about <a href="http://www.youtube.com/watch?v=g2oGdKzX8pg">Santa&#8217;s Dashboard</a>, created by SAS senior R&amp;D staff, <a href="http://robslink.com/" target="_blank">Robert Allison</a>.</p>
<p>Robert is a master of graphics and visualization. You can view his SAS/Graph examples in the following link:</p>
<p><a title="http://robslink.com/SAS/Home.htm" href="http://robslink.com/SAS/Home.htm">http://robslink.com/SAS/Home.htm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/18/santa-and-sas-again-santas-dashboard-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Making of an Analyst: A Supplement to What Makes a Good Business Analyst</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/17/the-making-of-an-analyst-a-supplement-to-what-makes-a-good-business-analyst-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/17/the-making-of-an-analyst-a-supplement-to-what-makes-a-good-business-analyst-2/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:40:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[Analyst]]></category>
		<category><![CDATA[Rajan Chandras]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[SASCOM]]></category>
		<category><![CDATA[Ted Cuzzillo]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/17/the-making-of-an-analyst-a-supplement-to-what-makes-a-good-business-analyst-2/</guid>
		<description><![CDATA[I once commented the entry, What Makes a Good Business Analyst by Rajan Chandras, with an easy tone, If You Can Make it Here, You Can Make it Anywhere. The standards of a good analyst conclude by Rajan, in my opinion, are somewhat of very high bars. In the recent SASCOM Magazine, Ted Cuzzillo published [...]]]></description>
				<content:encoded><![CDATA[<div><span style="font-family: Arial;">I once commented the entry,  <a href="http://www.intelligententerprise.com/blog/archives/2008/12/what_makes_a_go.html"><em><span class="HeadGiantblack">What Makes a Good Business Analyst</span></em></a> by  Rajan Chandras, with an easy tone, <em><a href="http://jiangtanghu.blogspot.com/2008/12/if-you-can-make-it-here-you-can-make-it.html">If  You Can Make it Here, You Can Make it Anywhere</a></em>. The standards of a good  analyst conclude by Rajan, in my opinion, are somewhat of very high  bars.</p>
<p></span></div>
<div><span style="font-family: Arial;"> </span></div>
<div><span style="font-family: Arial;">In the recent SASCOM Magazine, Ted Cuzzillo published a  relatively moderate enty, say, <em><a href="http://www.sas.com/news/sascom/2008q4/feature_analyst.html">The Making of  An Analyst</a></em>. This paper is considered the fresh graduates to be an  analysts in their first job hunting. </span><span style="font-family: Arial;">Yes, there two  posts are more compatible than oppositive. Rajan&#8217;s targets are those veteran  analysts with years of experience.</span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/17/the-making-of-an-analyst-a-supplement-to-what-makes-a-good-business-analyst-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn Time Series Analysis: Free Materials for SAS Users</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/16/learn-time-series-analysis-free-materials-for-sas-users-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/16/learn-time-series-analysis-free-materials-for-sas-users-2/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 08:07:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[ARCH]]></category>
		<category><![CDATA[ETS]]></category>
		<category><![CDATA[forecast]]></category>
		<category><![CDATA[GARCH]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[time series]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/16/learn-time-series-analysis-free-materials-for-sas-users-2/</guid>
		<description><![CDATA[0. A gentle Introduction to Time Series Analysis, may serve as fast learning materials: http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc4.htm 1. An open source book(with data and code), A First Course on Time Series Analysis: examples with SAS, by Prof. Michael Falk, is available in: http://statistik.mathematik.uni-wuerzburg.de/timeseries/ 2. A SAS User book, Forecasting Examples for Business and Economics Using SAS by [...]]]></description>
				<content:encoded><![CDATA[<div><span style="font-family: Arial; font-size: 100%;">0. A gentle <em><a href="http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc4.htm">Introduction  to Time Series Analysis</a></em>, may serve as fast  learning materials:</span><span style="font-size: 100%;"><br />
</span></div>
<div><span style="font-family: Arial; font-size: 100%;"><a href="http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc4.htm"></p>
<blockquote><p>http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc4.htm</p></blockquote>
<p></a></p>
<p></span></div>
<div><span style="font-family: Arial; font-size: 100%;">1. An open source book(with data and code), <a href="http://statistik.mathematik.uni-wuerzburg.de/timeseries/index.php?id=preamble"><em>A  First Course on Time Series Analysis: examples with SAS</em>, by Prof. Michael  Falk</a>, is available in:</span><span style="font-size: 100%;"><br />
</span></div>
<div><span style="font-family: Arial; font-size: 100%;"><a href="http://statistik.mathematik.uni-wuerzburg.de/timeseries/"></p>
<blockquote><p>http://statistik.mathematik.uni-wuerzburg.de/timeseries/</p></blockquote>
<p></a></p>
<p></span></div>
<div><span style="font-family: Arial; font-size: 100%;">2. A SAS User book, <a href="http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&amp;pc=55512"><em>Forecasting  Examples for Business and Economics Using SAS </em>by B.  Cohen</a> (another popular SAS User book for time series is <a href="http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&amp;pc=57275"><em>SAS  for Forecasting Time Series</em> by John Brocklebank and David Dickey</a>), is  example-driven approach. You can review and submit the codes to learn SAS for  time series analysis in a comprehensive way&#8211;there are 30 examples  available:</span><span style="font-size: 100%;"><br />
</span></div>
<div><span style="font-family: Arial; font-size: 100%;"></p>
<blockquote><p>1. Forecasting an Autoregressive  Progress<br />
2. Forecasting a Moving Average  Process<br />
3. Forecasting a Seasonal  Process<br />
4. Seasonal Adjustment and  Forecasting<br />
5. Forecasting with Transfer Function  Models<br />
6. Forecasting with Intervention  Models<br />
7. Forecasting Multivariate Time  Series<br />
8. Preparing Time Series Data for  Forecasting<br />
9. Using Macros for Forecasting  Tasks<br />
10. Fitting and Forecasting a Linear Model by  OLS<br />
11. Testing Forecasting Models for Break Points with Chow  Tests<br />
12.  Fitting and Forecasting Linear Models with Linear  Restrictions<br />
13. Fitting and  Forecasting a Linear Model with an AR Error Correction<br />
14. Fitting Linear Models with Heteroscedastic Error  Terms<br />
15. Fitting Linear Models with ARCH-GARCH Error  Terms<br />
16. Assessing Forecast  Accuracy<br />
17. Forecasting Using a Lagged Dependent Variable  Model<br />
18. Static and Dynamic Forecasting Using a Lagged Dependent Variable Model<br />
19. Fitting and Forecasting Polynomial Distributed Lag  Models<br />
20. Fitting and Forecasting Restricted Polynomial Distributed Lag  Models<br />
21. Fitting and Forecasting a Linear System by SUR and  ITSUR<br />
22. Testing and Restricting Parameter Estimates in a Linear System  Forecast<br />
23. Producing Goodness-of-Fit Statistics for Forecasts of a Linear  System o<br />
24. Fitting a Linear System by Instrumental  Methods<br />
25. Linear System Diagnostics and Autoregressive Error  Correction<br />
26.  Creating Forecast confidence Limits with Monte Carlo  Simulation<br />
27. Fitting and  Forecasting a Nonlinear  Model<br />
28. Restricting and Testing Parameters of a Nonlinear Forecasting  Model<br />
29. Producing Forecasts Automatically Using the Time  Series Forecasting Sys<br />
30. Developing Forecasting Models Using the Time  Series Forecasting System</p></blockquote>
<p></span></div>
<div><span style="font-family: Arial; font-size: 100%;">You can get the code with data and proc steps in  SAS website:</span><span style="font-size: 100%;"><br />
</span></div>
<div><span style="font-family: Arial; font-size: 100%;"><a href="http://ftp.sas.com/samples/A55512"></p>
<blockquote><p>http://ftp.sas.com/samples/A55512</p></blockquote>
<p></a></p>
<p></span></div>
<div><span style="font-family: Arial; font-size: 100%;">3. SAS/ETS User&#8217;s Guide and Procedure  Guide in <a href="http://support.sas.com/documentation/index.html">SAS  Product Documentation</a>:</span><span style="font-size: 100%;"><br />
</span></div>
<div><span style="font-family: Arial; font-size: 100%;"><a href="http://support.sas.com/documentation/onlinedoc/ets/index.html"></p>
<blockquote><p>http://support.sas.com/documentation/onlinedoc/ets/index.html</p></blockquote>
<p></a></p>
<p></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/16/learn-time-series-analysis-free-materials-for-sas-users-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Links of 2008-12-16: Financial Engineering, Ponzi Scheme, SAS PC Game</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/16/links-of-2008-12-16-financial-engineering-ponzi-scheme-sas-pc-game-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/16/links-of-2008-12-16-financial-engineering-ponzi-scheme-sas-pc-game-2/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 01:34:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Quantitative finance]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[Financial Engineering]]></category>
		<category><![CDATA[Madoff]]></category>
		<category><![CDATA[PC Game]]></category>
		<category><![CDATA[Ponzi Scheme]]></category>
		<category><![CDATA[SEC]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/16/links-of-2008-12-16-financial-engineering-ponzi-scheme-sas-pc-game-2/</guid>
		<description><![CDATA[The State of Financial Engineering Ponzi Scheme Returns: SEC Charges Bernard L. Madoff for Multi-Billion Dollar Ponzi Scheme WolfenSAS: A PC Game written by SAS Code]]></description>
				<content:encoded><![CDATA[<ol>
<li><span style="font-family: Arial; font-size: 100%;"><a href="http://creditspectrum.blogspot.com/2008/12/state-of-financial-engineering.html">The  State of Financial Engineering</a></span></li>
<li><span style="font-family: Arial; font-size: 100%;"><a href="http://en.wikipedia.org/wiki/Ponzi_scheme">Ponzi Scheme</a> Returns: <a href="http://www.sec.gov/news/press/2008/2008-293.htm">SEC Charges Bernard L.  Madoff for Multi-Billion Dollar Ponzi Scheme</a></span></li>
<li><span style="font-family: Arial; font-size: 100%;"><a href="http://wolfensas.subshock.net/">WolfenSAS:  A PC Game written by SAS Code</a></span></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/16/links-of-2008-12-16-financial-engineering-ponzi-scheme-sas-pc-game-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delivers the Right Toys and Goodies to the Right Boys and Girls: Story of Santa and SAS</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/14/delivers-the-right-toys-and-goodies-to-the-right-boys-and-girls-story-of-santa-and-sas-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/14/delivers-the-right-toys-and-goodies-to-the-right-boys-and-girls-story-of-santa-and-sas-2/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 11:57:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[SAS]]></category>
		<category><![CDATA[Business Analytics]]></category>
		<category><![CDATA[Christmas]]></category>
		<category><![CDATA[Santa]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/14/delivers-the-right-toys-and-goodies-to-the-right-boys-and-girls-story-of-santa-and-sas-2/</guid>
		<description><![CDATA[How to know the boys and girls&#8217; real demands around the world? and how to predict their demands in next Christmas? How to purchase toys and goodies with a balance of costs and profits? and how to deliver them more efficiently? There are lots of questions in the list of Santa, CEO of Santa&#8217;s Workshop. [...]]]></description>
				<content:encoded><![CDATA[<p>How to know the boys and girls&#8217; real demands around the world? and how to predict their demands in next Christmas?</p>
<p>How to purchase toys and goodies with a balance of costs and profits? and how to deliver them more efficiently?</p>
<p>There are lots of questions in the list of Santa, CEO of Santa&#8217;s Workshop. SAS&#8217;s marketing staff held a very creative champion for the coming Christmas. You can watch the<a href="http://www.youtube.com/watch?v=eBtE7XOGZV4&amp;eurl=&amp;feature=player_embedded"> interview with Santa in youtube.com</a>, or read the success story about Santa, <a href="http://www.sas.com/success/santa.html"><em>Santa&#8217;s Secret: Magic? No. It&#8217;s SAS(R) Business Analytics</em></a>.</p>
<p>Merry Christmas.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/14/delivers-the-right-toys-and-goodies-to-the-right-boys-and-girls-story-of-santa-and-sas-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If You Can Make it Here, You Can Make it Anywhere: On What Makes a Good Business Analyst by Rajan Chandras</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/14/if-you-can-make-it-here-you-can-make-it-anywhere-on-what-makes-a-good-business-analyst-by-rajan-chandras-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/14/if-you-can-make-it-here-you-can-make-it-anywhere-on-what-makes-a-good-business-analyst-by-rajan-chandras-2/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 16:24:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[Industry Review]]></category>
		<category><![CDATA[Assessment]]></category>
		<category><![CDATA[business analyst]]></category>
		<category><![CDATA[Forrester]]></category>
		<category><![CDATA[skills]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/14/if-you-can-make-it-here-you-can-make-it-anywhere-on-what-makes-a-good-business-analyst-by-rajan-chandras-2/</guid>
		<description><![CDATA[In the latest post, What Makes a Good Business Analyst?, Rajan Chandras cites some soft items from Forrester&#8217;s Business Analyst Assessment Workbook: Ability to think abstractly, identify patterns, and generate ideas and solutions Understanding of when and how to escalate issues or needs Understanding of and ability to delivery the appropriate level of detail needed [...]]]></description>
				<content:encoded><![CDATA[<p>In the latest post, <a href="http://www.intelligententerprise.com/blog/archives/2008/12/what_makes_a_go.html"><em><span class="HeadGiantblack">What Makes a Good Business Analyst?</span></em></a>, Rajan Chandras cites some soft items from <span class="hpTopStoryBlurb"> <em>Forrester&#8217;s Business Analyst Assessment Workbook</em>:<br />
</span><span class="hpTopStoryBlurb"> </span></p>
<ul>
<li>Ability to think abstractly, identify patterns, and generate ideas and solutions</li>
<li>Understanding of when and how to escalate issues or needs</li>
<li>Understanding of and ability to delivery the appropriate level of detail needed for each task</li>
<li>Interest in exploring and understanding new concepts and topic areas</li>
<li>Emotionally invested in the work</li>
<li>Ability to learn by shadowing stakeholders</li>
<li>Ability to clearly articulate technology in terms stakeholders can understand</li>
<li>Understanding of the organizational culture and its impact on processes and projects (this one seems obvious, but the latter phrase is more profound than might seem at first glance)</li>
<li>Ability to drive a decision analysis and selection process</li>
<li>Ability to recognize patterns in requirements and categorize them appropriately</li>
</ul>
<p>What&#8217;s more, there are some suggestions by Rajan Chandras himself:<span class="hpTopStoryBlurb"> </span></p>
<ul>
<li>Know the organization&#8217;s external environment: its competitive position, current state of the industry, geographical &amp; social factors, etc.</li>
<li>Know the organization&#8217;s internal environment: its financial position, organization culture, IT maturity, etc.</li>
<li>Adapt to the needs (your language, dress etc.), but be yourself. Imperfect, yet genuine, is fine; falsity comes through easily, and will destroy your credibility in no time.</li>
</ul>
<p><span class="hpTopStoryBlurb">No doubt, no boss can reject such a perfect analyst. But I&#8217;m afraid these standards are suitable for every professionals.</span><span class="hpTopStoryBlurb"> That is to say, they create a model to explain everything. It is too universal to be served as a good filter to select the most proper analysts. She or he may more marketable in any other business line.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/14/if-you-can-make-it-here-you-can-make-it-anywhere-on-what-makes-a-good-business-analyst-by-rajan-chandras-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Data Mining in Stock Market</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/13/data-mining-in-stock-market-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/13/data-mining-in-stock-market-2/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 15:55:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[data mining]]></category>
		<category><![CDATA[Quantitative finance]]></category>
		<category><![CDATA[decision tree]]></category>
		<category><![CDATA[parameter tuning]]></category>
		<category><![CDATA[predictive models]]></category>
		<category><![CDATA[stock market]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/13/data-mining-in-stock-market-2/</guid>
		<description><![CDATA[Data Mining in Stock Market? Is it crazy? or is it just a hopeless try? Every mentor in mathematics and finance educates us that the stock market is too chaotic and sentimental to use mathematical models. Most of all gift rock scientists are concentrated in the study of interest of rates and fixed income securities. [...]]]></description>
				<content:encoded><![CDATA[<p>Data Mining in Stock Market? Is it crazy? or is it just a hopeless try? Every mentor in mathematics and finance educates us that the stock market is too chaotic and <strong>sentimental</strong> to use mathematical models. Most of all gift rock scientists are concentrated in the study of interest of rates and fixed income securities. It sounds profitable to use mathematical and statistical models to predict the price of stock, but there are little successfull stories.</p>
<p>I know I might hold some academic doctrines, so I have interest to monitor any effort to try to forecast stock prices using data mining techniques. Some links from a popular data mining blog , <a href="http://dataminingresearch.blogspot.com/"><em>Data Mining Research</em></a>, are listed as follows:</p>
<ul>
<li><a href="http://dataminingresearch.blogspot.com/2008/09/stock-prediction-using-decision-tree.html">Stock Prediction using Decision Tree</a></li>
<li><a href="http://dataminingresearch.blogspot.com/2008/12/stock-picking-using-data-mining_12.html">Stock Picking using Data Mining: Parameter Tuning</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/13/data-mining-in-stock-market-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Haiku from SAS R&amp;D staff</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/10/haiku-from-sas-rd-staff-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/10/haiku-from-sas-rd-staff-2/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 03:37:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[haiku]]></category>
		<category><![CDATA[Matsuo Basho]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/10/haiku-from-sas-rd-staff-2/</guid>
		<description><![CDATA[First prompts are silent. Subsequent prompts loud and clear. Now all prompts are heard. Poem from R&#38;D staff? Yes. Rhyming sonnets were shakespeare-like complex; they wrote Japanese haiku, showed as above. The SAS R&#38;D staff should complete some paper work in defects system before changing a code. They use informal descriptive language(HAIKUUU!) in the early [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p>First prompts are silent.<br />
Subsequent prompts loud and clear.<br />
Now all prompts are heard.</p></blockquote>
<p>Poem from R&amp;D staff?<br />
Yes. Rhyming sonnets were shakespeare-like complex;<br />
they wrote Japanese haiku, showed as above.</p>
<p>The SAS R&amp;D staff should complete some paper work in defects system before changing a code. They use informal descriptive language(HAIKUUU!) in the early stage. <a href="http://blogs.sas.com/sasdummy/" target="_blank">Chris Hemedinger</a>, a senior software engineer at SAS, collected some <a href="http://blogs.sas.com/sasdummy/index.php?/archives/62-Poetry-in-commotion.html" target="_blank">haikus</a> in his blog to show the humor side of SAS R&amp;D staff. It&#8217;s interesting to cite one of the most famous haikus by <a href="http://en.wikipedia.org/wiki/Matsuo_Bash%C5%8D" target="_blank">Matsuo Bashō</a> for comparison:</p>
<blockquote><p>Old pond<br />
a frog jumps<br />
the sound of water</p></blockquote>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e0bef7d3-3ec5-4580-99ea-fd432ffbdcce" class="wlWriterSmartContent" style="margin: 0px; padding: 0px; display: inline;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/haiku">haiku</a>,<a rel="tag" href="http://del.icio.us/popular/SAS">SAS</a>,<a rel="tag" href="http://del.icio.us/popular/R&amp;D">R&amp;D</a>,<a rel="tag" href="http://del.icio.us/popular/Matsuo%20Bash%c3%b4">Matsuo Bashô</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/10/haiku-from-sas-rd-staff-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy grow up</title>
		<link>http://www.jiangtanghu.com/blog/2008/12/10/happy-grow-up-2/</link>
		<comments>http://www.jiangtanghu.com/blog/2008/12/10/happy-grow-up-2/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 02:21:00 +0000</pubDate>
		<dc:creator>Jiangtang Hu</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[Beijing]]></category>
		<category><![CDATA[Robert Louis Stevenson]]></category>
		<category><![CDATA[The Book of Virutes]]></category>
		<category><![CDATA[W. Bennentt]]></category>

		<guid isPermaLink="false">http://www.jiangtanghu.com/blog/2008/12/10/happy-grow-up-2/</guid>
		<description><![CDATA[Happy hearts and happy faces, Happy play in grassy places&#8211; -Good and Bad Children by Robert Louis Stevenson I read this verse in W. Bennentt&#8217;s popular book, The Book of Virtues, during the bus-to-company time this morning. It&#8217;s interesting to read Stevenson&#8217;s Treasure Island, of course in Chinese edition when I was young. Yes, it [...]]]></description>
				<content:encoded><![CDATA[<div><span style="font-family: Arial;"> </span></div>
<div style="margin-right: 0px;" dir="ltr"><span style="font-family: Arial;"></p>
<blockquote><p>Happy hearts and happy faces,<br />
Happy play in grassy  places&#8211;<br />
-<em><a href="http://www.bartleby.com/188/128.html">Good and Bad  Children</a></em> by <a href="http://en.wikipedia.org/wiki/Robert_Louis_Stevenson">Robert Louis  Stevenson</a></p></blockquote>
<p>I read this verse in W. Bennentt&#8217;s popular book,  <em><a href="http://www.amazon.com/Book-Virtues-Treasury-Great-Stories/dp/0671683063">The  Book of Virtues</a></em>, during the bus-to-company time this morning. It&#8217;s  interesting to read Stevenson&#8217;s <em>Treasure Island</em>, of course in Chinese  edition when I was young.</p>
<p></span></div>
<div><span style="font-family: Arial; font-size: 85%;"> </span></div>
<div><span style="font-family: Arial;">Yes, it sounds &#8220;uncool&#8221;, &#8211;I went to work, with technical  documents in my bag, and read a for-children book. A grown-up with childlike  innocence? dare not say. I just read the book to fresh my mind and my  English.</p>
<p></span></div>
<div></div>
<div><span style="font-family: Arial;">It snows little Beijing. </span></div>
<p><span style="font-family: Arial;"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiangtanghu.com/blog/2008/12/10/happy-grow-up-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
