<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: SAS Macros: Letting SAS Do the Typing</title>
	<atom:link href="http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/feed/" rel="self" type="application/rss+xml" />
	<link>http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/</link>
	<description>I'm a biologist not a...</description>
	<lastBuildDate>Wed, 08 Feb 2012 12:02:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Matt</title>
		<link>http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/comment-page-1/#comment-232204</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Fri, 28 Oct 2011 14:51:16 +0000</pubDate>
		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/#comment-232204</guid>
		<description>Thanks for the quick macro tutorial.  Little pieces of information such as the fact that there is a column created named _N_ is massively useful.  SAS help guides sometimes leave these kind of details out and it frustrates me beyond belief.  Simple example, but this will allow me to branch off into more complex code.  Thanks again.</description>
		<content:encoded><![CDATA[<p>Thanks for the quick macro tutorial.  Little pieces of information such as the fact that there is a column created named _N_ is massively useful.  SAS help guides sometimes leave these kind of details out and it frustrates me beyond belief.  Simple example, but this will allow me to branch off into more complex code.  Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srinath</title>
		<link>http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/comment-page-1/#comment-181749</link>
		<dc:creator>Srinath</dc:creator>
		<pubDate>Wed, 29 Dec 2010 08:30:17 +0000</pubDate>
		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/#comment-181749</guid>
		<description>use only one parameter and  find the total of two numbers.

ex: x=2 and y=3 find sum with only one parameter.</description>
		<content:encoded><![CDATA[<p>use only one parameter and  find the total of two numbers.</p>
<p>ex: x=2 and y=3 find sum with only one parameter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zc</title>
		<link>http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/comment-page-1/#comment-181211</link>
		<dc:creator>zc</dc:creator>
		<pubDate>Fri, 24 Dec 2010 17:29:06 +0000</pubDate>
		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/#comment-181211</guid>
		<description>Very rewarding in reading the interesting Macro example and stimulating comments.

I have an application question not sure whether your guys know the sure answer:

How to obtain the adjusted differences with 95% confidence intervals in original scale for the dependent variables that need to be log-transformed before you do the GLM for a dichotomous predictor variable? We often need to use the GLM model to account for variations of multiple co-variables 
(categorical or continuous))? If the data are in original scale, this is very simple as these are the regression coefficients and 95% CIs from GLM. However, sometimes, the dependent variable is highly skewed, and violate the assumption of Normality, therefore, data log-transformation is needed before you do the GLM. In such cases, the regression coefficients you obtained are effectively the ratio of the two adjusted means in the original scale, so you can not obtain the confidence limits of the adjusted difference directly.</description>
		<content:encoded><![CDATA[<p>Very rewarding in reading the interesting Macro example and stimulating comments.</p>
<p>I have an application question not sure whether your guys know the sure answer:</p>
<p>How to obtain the adjusted differences with 95% confidence intervals in original scale for the dependent variables that need to be log-transformed before you do the GLM for a dichotomous predictor variable? We often need to use the GLM model to account for variations of multiple co-variables<br />
(categorical or continuous))? If the data are in original scale, this is very simple as these are the regression coefficients and 95% CIs from GLM. However, sometimes, the dependent variable is highly skewed, and violate the assumption of Normality, therefore, data log-transformation is needed before you do the GLM. In such cases, the regression coefficients you obtained are effectively the ratio of the two adjusted means in the original scale, so you can not obtain the confidence limits of the adjusted difference directly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ScottS-M</title>
		<link>http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/comment-page-1/#comment-147982</link>
		<dc:creator>ScottS-M</dc:creator>
		<pubDate>Fri, 13 Nov 2009 23:43:08 +0000</pubDate>
		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/#comment-147982</guid>
		<description>@Toby
That sounds pretty identical to what I wrote:
&lt;blockquote&gt;This particular example could be done a few different ways (the easiest and probably better way being to merge the meancv dataset with the trees) but I hope it gives a decent introduction to SAS macros.&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>@Toby<br />
That sounds pretty identical to what I wrote:</p>
<blockquote><p>This particular example could be done a few different ways (the easiest and probably better way being to merge the meancv dataset with the trees) but I hope it gives a decent introduction to SAS macros.</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toby</title>
		<link>http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/comment-page-1/#comment-147980</link>
		<dc:creator>Toby</dc:creator>
		<pubDate>Fri, 13 Nov 2009 23:19:56 +0000</pubDate>
		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/programmer/sas-macros-letting-sas-do-the-typing/#comment-147980</guid>
		<description>Seems to me you have made a mountain out of a mole hill with the example.  While there are many uses of the macro language in SAS it is also over used by far too many to solve problems that are better solved in simplier manners.


If I assume your same starting data set here is a two step solution:



Proc Means
 Data = Trees NWay NoPrint ;
 Class Name ;
 Var Height ;
 Output Out = MeanSTD ( Drop = _Type_ _Freq_ )
        Mean = Mean STD = STD ;
Run ;



Proc SQL ;
Create Table Final As
 Select Trees.Name , Height , Mean , STD ,
        ( ( Height - Mean ) / STD ) As StHeight
  From Trees
       Left Join
       MeanSTD
       On Trees.Name = MeanSTD.Name
   Order By Name ;
Quit ;



SAS is a bunch of individual languages held together by data sets.  The macro language is nothing more than a way to create &quot;Open Code in Mass Quantity&quot;.  Which if used right can be a life saver or finger cramp saver (which ever you like).  However, it can just as easily and more often than not is, a problem maker that stunts the growth of programmer in learning the SAS language.</description>
		<content:encoded><![CDATA[<p>Seems to me you have made a mountain out of a mole hill with the example.  While there are many uses of the macro language in SAS it is also over used by far too many to solve problems that are better solved in simplier manners.</p>
<p>If I assume your same starting data set here is a two step solution:</p>
<p>Proc Means<br />
 Data = Trees NWay NoPrint ;<br />
 Class Name ;<br />
 Var Height ;<br />
 Output Out = MeanSTD ( Drop = _Type_ _Freq_ )<br />
        Mean = Mean STD = STD ;<br />
Run ;</p>
<p>Proc SQL ;<br />
Create Table Final As<br />
 Select Trees.Name , Height , Mean , STD ,<br />
        ( ( Height &#8211; Mean ) / STD ) As StHeight<br />
  From Trees<br />
       Left Join<br />
       MeanSTD<br />
       On Trees.Name = MeanSTD.Name<br />
   Order By Name ;<br />
Quit ;</p>
<p>SAS is a bunch of individual languages held together by data sets.  The macro language is nothing more than a way to create &#8220;Open Code in Mass Quantity&#8221;.  Which if used right can be a life saver or finger cramp saver (which ever you like).  However, it can just as easily and more often than not is, a problem maker that stunts the growth of programmer in learning the SAS language.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

