{"id":1348,"date":"2013-06-07T12:39:45","date_gmt":"2013-06-07T16:39:45","guid":{"rendered":"http:\/\/blogs.bu.edu\/ellisrp\/?p=1348"},"modified":"2013-06-07T12:40:49","modified_gmt":"2013-06-07T16:40:49","slug":"useful-reference-for-serious-sas-programmers","status":"publish","type":"post","link":"https:\/\/blogs.bu.edu\/ellisrp\/2013\/06\/useful-reference-for-serious-sas-programmers\/","title":{"rendered":"Useful reference for serious SAS programmers"},"content":{"rendered":"<p>I often do bootstrap and simulations in my research, and for some background research, I found the following excellent short article on how to use SAS to do efficient replications\/bootstrapping\/jackknifing.<\/p>\n<div dir=\"ltr\">Paper 183-2007<\/div>\n<div dir=\"ltr\">Don&#8217;t Be Loopy: Re-Sampling and Simulation the SAS\u00ae Way<\/div>\n<div dir=\"ltr\">David L. Cassell, Design Pathways, Corvallis, OR<\/div>\n<p>http:\/\/www2.sas.com\/proceedings\/forum2007\/183-2007.pdf<\/p>\n<p>Here is an elegant example that shows how to do 1000 replications of the Kurtosis of X. Note that proc univariate could be replaced with anything. Discussion of proc append and critique of alternative programs is also useful.<\/p>\n<p>(I will note that it starts by creating a sample that is 1000 times as large as the original, but still, it is very fast given what is being done.)<\/p>\n<div dir=\"ltr\">proc surveyselect data=YourData out=outboot         \/* 1 *\/<\/div>\n<div dir=\"ltr\">seed=30459584                                 \/* 2 *\/<\/div>\n<div dir=\"ltr\">method=urs                                    \/* 3 *\/<\/div>\n<div dir=\"ltr\">samprate=1                                    \/* 4 *\/<\/div>\n<div dir=\"ltr\">outhits                                       \/* 5 *\/<\/div>\n<div dir=\"ltr\">rep=1000;                                     \/* 6 *\/<\/div>\n<div dir=\"ltr\">run;<\/div>\n<div dir=\"ltr\">proc univariate data=outboot \/* consider noprint option here to reduce output *\/;<\/div>\n<div dir=\"ltr\">var x;<\/div>\n<div dir=\"ltr\">by Replicate;                                     \/* 7 *\/<\/div>\n<div dir=\"ltr\">output out=outall kurtosis=curt;<\/div>\n<div dir=\"ltr\">run;<\/div>\n<div dir=\"ltr\">proc univariate data=outall;<\/div>\n<div dir=\"ltr\">var curt;<\/div>\n<div dir=\"ltr\">output out=final pctlpts=2.5, 97.5 pctlpre=ci;<\/div>\n<div dir=\"ltr\">run;<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I often do bootstrap and simulations in my research, and for some background research, I found the following excellent short article on how to use SAS to do efficient replications\/bootstrapping\/jackknifing. Paper 183-2007 Don&#8217;t Be Loopy: Re-Sampling and Simulation the SAS\u00ae Way David L. Cassell, Design Pathways, Corvallis, OR http:\/\/www2.sas.com\/proceedings\/forum2007\/183-2007.pdf Here is an elegant example that &hellip; <a href=\"https:\/\/blogs.bu.edu\/ellisrp\/2013\/06\/useful-reference-for-serious-sas-programmers\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Useful reference for serious SAS programmers<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2755,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[185,7238,7243],"tags":[10929],"_links":{"self":[{"href":"https:\/\/blogs.bu.edu\/ellisrp\/wp-json\/wp\/v2\/posts\/1348"}],"collection":[{"href":"https:\/\/blogs.bu.edu\/ellisrp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.bu.edu\/ellisrp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.bu.edu\/ellisrp\/wp-json\/wp\/v2\/users\/2755"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.bu.edu\/ellisrp\/wp-json\/wp\/v2\/comments?post=1348"}],"version-history":[{"count":3,"href":"https:\/\/blogs.bu.edu\/ellisrp\/wp-json\/wp\/v2\/posts\/1348\/revisions"}],"predecessor-version":[{"id":1350,"href":"https:\/\/blogs.bu.edu\/ellisrp\/wp-json\/wp\/v2\/posts\/1348\/revisions\/1350"}],"wp:attachment":[{"href":"https:\/\/blogs.bu.edu\/ellisrp\/wp-json\/wp\/v2\/media?parent=1348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.bu.edu\/ellisrp\/wp-json\/wp\/v2\/categories?post=1348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.bu.edu\/ellisrp\/wp-json\/wp\/v2\/tags?post=1348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}