{"id":1440,"date":"2011-06-11T02:05:49","date_gmt":"2011-06-11T07:05:49","guid":{"rendered":"http:\/\/www.thejuliagroup.com\/blog\/?p=1440"},"modified":"2011-06-11T02:12:41","modified_gmt":"2011-06-11T07:12:41","slug":"more-after-the-data-step-the-naked-mole-rat-continues","status":"publish","type":"post","link":"https:\/\/www.thejuliagroup.com\/blog\/more-after-the-data-step-the-naked-mole-rat-continues\/","title":{"rendered":"More after the data step (the naked mole rat continues)"},"content":{"rendered":"<p><a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/03\/rockyandbullwinkle.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1149\" title=\"rockyandbullwinkle\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/03\/rockyandbullwinkle.jpg\" alt=\"Rocky &amp; Bullwinkle\" width=\"256\" height=\"300\" \/><\/a>When last seen, our heroes were attempting to write a book with the title<\/p>\n<p><a href=\"http:\/\/www.thejuliagroup.com\/blog\/?p=1421\">Beyond SAS Basics: Tips, Statistics and a Naked Mole Rat<\/a><\/p>\n<p>The first chapter was entitled<\/p>\n<p><a href=\"http:\/\/www.thejuliagroup.com\/blog\/?p=1427\">After the Data Step. The first half of it was posted here earlie<\/a>r which you would know if you were following this blog in the probably vain hope that you might learn something.<\/p>\n<p>Writing the second half of the chapter was delayed by people offering to pay me actual money if I would fly around the country to hither and yon and do work like a real grown up. I didn&#8217;t make it to hither, but you can see a picture of yon below.<\/p>\n<p><a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/06\/yon.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1441\" title=\"yon\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/06\/yon-225x300.jpg\" alt=\"Lac du Flambeau\" width=\"225\" height=\"300\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/06\/yon-225x300.jpg 225w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/06\/yon-768x1024.jpg 768w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/06\/yon.jpg 1200w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a>Now that I have returned,\u00a0 I have completed the rest of Chapter 1. To whit &#8230;<\/p>\n<p>The next section could have been an entire book in itself. I LOVE statistics. I have spent most of my life as a statistician, and also won a world judo championship and married three husbands (not at the same time). It is a myth statisticians are boring and it is not true that math is hard, I don\u2019t care what that stupid Talking Barbie doll said. Math is a lot easier than unemployment, in the opinion of most people. Since this book is titled \u201cBeyond the Basics\u201d, I did not include means, frequencies or correlations in the statistics section. I could have included simple linear regression or one-way Analysis of Variance \u2013 I know those are not that basic to most people.<\/p>\n<p>If at this point your eyes are starting to glaze over and you\u2019re starting to get anxious, just cut it out right now! You\u2019re NOT that bad at math and it\u2019s NOT that hard. It\u2019s not rocket science. Besides which, having been married to a rocket scientist for fifteen years, I can tell you that they aren\u2019t perfect, either. This section includes just two chapters. The first is on logistic regression \u2013 when your data really DO fit in neat little boxes \u2013 like did someone live or die, buy your widget or walk on by, vote Democrat or Republican. These are the kinds of things we want to predict on a daily basis. The second chapter in this section is the most common research design for testing whether something works \u2013 an experimental group and control group are each given a pre-test and a post-test. Read all about it in the chapter on Repeated Measures Analysis of Variance. If I have not convinced you, you can skip this chapter and still understand the rest of the book perfectly. Then, you can wait for my next book \u2013 Hamster Statistics with SAS. (Under suggestions for next year\u2019s topic, one conference attendee wrote, \u201cStatistics so simple a hamster can understand it \u2013 Bring your own hamster.\u201d)<\/p>\n<blockquote><p>This next section is for those of you who don\u2019t like statistics \u2013 and for those who do.<br \/>\n<em>&#8220;Public agencies are very keen on amassing statistics &#8211; they collect them, add them, raise them to the nth power, take the cube root and prepare wonderful diagrams. But what you must never forget is that every one of those figures comes in the first instance from the village watchman, who just puts down what he damn pleases.&#8221; &#8211; Sir Josiah Stamp<\/em><\/p><\/blockquote>\n<p>People who don\u2019t want to get too involved in statistics can take comfort in the fact that many statistical results are flawed because the data are of poor quality. If this describes you, there is plenty of work available out there fixing the data. I\u2019ve read books that asserted that 80% of the time in any data analysis project is spent on data cleaning and data management. I deeply suspect that they just made this number up, but, as Dilbert said, studies have shown that real numbers are no more useful than numbers you just make up. (How many studies have shown this? 42. I just made that number up, too. See, it works!) My point, and you may rightly have despaired by now of me ever having one, is that a very large proportion of the amount of time on any project goes into fixing the data. So, if you don\u2019t want to get very involved in statistics but you still want to use SAS for fun and profit, specialize in data quality improvement and you will be the life of the party. (Of course, that will only be at parties attended by nerdy SAS programmers but judging by the fact that you are reading this book it is assumed that you will fit right in.)<br \/>\nFor those of you who DO love statistics (and, please, come sit next to me), the section on data quality is essential because unless you\u2019ve been hanging out at parties where you met that guy in the last paragraph (and you didn\u2019t invite me!), then you need to make sure your data are as near to error-free as you can get.<\/p>\n<p>Section four is an introduction to SAS macros. There are a lot of reasons to like SAS macros. Any time you do the same type of task repetitively, you could write a macro and just supply the information that changes. For example, say you have a report you do for 24 different departments and the only difference is the name of the dataset you read in, the name of the department in the title and the name of the department manager \u2013 macro material for sure! Another reason to like macros is that a lot of the concepts you learn are applicable to other programming languages beyond SAS, and we\u2019re all about being generalists here.<br \/>\nThe main reason not to like macros is that they look like they are written in Micmac. (Micmac , also spelled Mi\u2019kmaq)\u00a0 is the language of a tribe native to Canada. For a sample of the language, see Exhibit A.<\/p>\n<p><a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/06\/micmac.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1442\" title=\"micmac\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/06\/micmac-300x225.jpg\" alt=\"Scroll in Micmac\" width=\"300\" height=\"225\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/06\/micmac-300x225.jpg 300w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/06\/micmac-1024x768.jpg 1024w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2011\/06\/micmac.jpg 1600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/>Exhibit A<\/a><\/p>\n<p>For a sample of a macro, see Exhibit B, from a 1997 paper by Art Carpenter*. I was right, wasn\u2019t I ?).<\/p>\n<p>.<\/p>\n<p>.<\/p>\n<p>.<\/p>\n<p>.<\/p>\n<p>EXHIBIT B<\/p>\n<p><code>%do q = 1 %to &amp;n;<br \/>\nPROC FSEDIT DATA=dedata.p&amp;&amp;dsn&amp;q mod<br \/>\nSCREEN=GLSCN.descn.p&amp;&amp;dsn&amp;q...SCREEN;<br \/>\nRUN;<br \/>\n%end;<\/code><\/p>\n<p>There is also the problem that the way people learn the macro language is usually sufficient to send them screaming in the opposite direction. Macro processing is taught beginning with several chapters on parameter scope, tokens, quoting and masking text.\u00a0 Instead, I\u2019ve included a couple of macros so you can see right away how useful macros can be and learn the statements and functions as we go along.<br \/>\nSo, now we come to the final section, which is the \u201cwhere do you go from here?\u201d Since I don\u2019t know you well enough to differentiate between you and a hairless monkey, it\u2019s a bit surprising that I have an answer for you, but I do. The secret to keeping excited about the work you do and keeping other people excited enough to pay you is NOT Viagra, regardless of the 1,247,877 emails you have received. In fact, the answer is to really and truly keep learning. This section includes recommended resources from websites to mailing lists to conferences to specific books and papers I found both useful and interesting.<\/p>\n<p>It also includes a a naked mole rat.<\/p>\n<p>*<a href=\"http:\/\/ www2.sas.com\/proceedings\/sugi22\/CODERS\/PAPER77.PDF \"> Carpenter, A. L. (1997). Resolving and Using &amp;&amp;var&amp;i Macro Variables . <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When last seen, our heroes were attempting to write a book with the title Beyond SAS Basics: Tips, Statistics and a Naked Mole Rat The first chapter was entitled After the Data Step. The first half of it was posted here earlier which you would know if you were following this blog in the probably&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,9,11,8],"tags":[],"class_list":["post-1440","post","type-post","status-publish","format-standard","hentry","category-dr-de-mars-general-life-ramblings","category-software","category-statistics","category-technology"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/1440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/comments?post=1440"}],"version-history":[{"count":4,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/1440\/revisions"}],"predecessor-version":[{"id":1445,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/1440\/revisions\/1445"}],"wp:attachment":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/media?parent=1440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/categories?post=1440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/tags?post=1440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}