I have previously written about how to use the "table" distribution to generate random values from a discrete probability distribution. For example, if there are 50 black marbles, 20 red marbles, and 30 white marbles in a box, the following SAS/IML program simulates random draws (with replacement) of 1,000 marbles:
Uncategorized
David Loshin discusses master data model requirements.
Suppose that you have a SAS/IML matrix and you want to set each element of a submatrix to zero (or any other value). There is a simple syntax that accomplishes this task. If you subscript a matrix and do not specify a row, it means "use all rows." So, for
This week's tip is from Michael Raithel and his classic book The Complete Guide to SAS Indexes. Michael has a wealth of SAS experience and is a frequent and sought-out speaker at SAS Global Forum and regional user group conferences. If you get the opportunity to hear him speak, don't
Recently, I was having lunch with a city council member who shared a litany of comments about the outstanding job the city and its staff does in all areas of city operations. She remarked on how little the public understands about all the city does and how efficiently it’s done.
What are the odds of winning the lottery? This seems like a simple question (and yes, there is a simple answer), but there are a few technical details to work out first... Which lottery? Let's say the Powerball Lottery. When? The number of balls used in the Powerball lottery has
If you are like me, you've experienced the following frustration. You are reading the SAS/STAT documentation, trying to understand some procedure or option, when you find an example that is very similar to what you need. "Great," you think, "this example will help me understand how the SAS procedure works!"
John D. Cook shared a picture of "pretty squiggles" on his blog, as well as a prose description of the mathematics behind it. I'm more of a programmer than a mathematician, but I've attempted to transcribe his description into a SAS program. I used DATA step to generate the point
PROC DOCUMENT makes your life easier by giving you the freedom from the pre-determined order in which SAS stores procedure output. You can also label, manage, and search your output so that it is at your fingertips when you need it. You can learn what a DOCUMENT does and get
David Loshin explains the technical requirements for MDM/DW integration.
Suppose you have an old jalopy that's perfectly reliable. Your jalopy gets you where you wanna go: no frills; no drama. Do you trade your old wheels in for a racecar that accelerates like crazy and corners like it's on rails? Or stick with what's old and comfortable? Your choice
In linear algebra, the I symbol is used to denote an n x n identity matrix. The symbol J (or sometimes 1) is used to denote an n x p matrix of ones. When the SAS/IML language was implemented, the I function was defined to generate the identity matrix. The J function was defined
Netflix has made a big splash in the news with its use of big data. By analyzing millions of data points about the viewing habits of its customers, the movie delivery giant used the insight it gained to devise the "perfect show". One of the defining characteristics of the show,
This week's SAS tip is from Frederick Pratter and his book Web Development with SAS by Example, Third Edition. The many real-world examples in the book guide lend it to being frequently excerpted on this blog! Previously featured tips include: Formatting XML documents, Configuring TCP security, and SQL pass-through. The following excerpt is from SAS
Editor Len Tashman's Preview of Foresight Foresight has always presented its methods-based articles as either tutorials, which introduce and illustrate a methodology in nontechnical language, or as case studies, with a focus on the practical issues and challenges in generating forecasts. We lead off this issue with two practical issues articles. First, Stephan
Compare it to predicting the economy. So concludes an ABC News Australia story by finance reporter Sue Lannin, entitled "Economic forecasts no better than a random walk." The story covers a recent apology by the International Monetary Fund over its estimates for troubled European nations, and an admission by the
Für einige der genannten Veranstaltungen haben wir ein kleines Kontingent an Freikarten: Bei Interesse bitte einfach anschreiben. Unter anderem ist SAS auf folgenden Events präsent:
I like to think that I have a graph for all occasions - Chinese New Year is no exception! ... The exact date of the Chinese New Year varies from year to year, because it's based on the lunar (moon) cycles. I thought it would be useful to create a
Last week the SAS Training Post blog posted a short article on an easy way to find variables in common to two data sets. The article used PROC CONTENTS (with the SHORT option) to print out the names of variables in SAS data sets so that you can visually determine
If you happen to be in Raleigh, NC next Tuesday evening, please come out for the APICS Triangle Chapter professional development meeting, 6:00-8:00 pm. While I can't make any promises about the caliber of the evening's speaker (me), you are assured a good meal and good conversation with representatives from
To optimize a Structured Query Language (SQL), the database professional must befriend this order and perhaps even embrace it. Who is your best friend? I’m talking about the order in which SQL processes your statements. Simply put, in what order does SQL do your work? (From my previous post you
When I travel to San Francisco in April for SAS Global Forum 2013, it will make my 12th time to attend the international SAS users group conference, and my 7th consecutive year. A lot of people assume that I automatically go every year, but the truth is that SAS employees
I wanted to write a blog post about the "Table distribution" in SAS. The Table distribution, which is supported by the RAND and the RANDGEN function, enables you to specify the probability of selecting each of k items. Therefore you can use the Table distribution to sample, with replacement, from
How many analytical projects have foundered due to lack of problem definition and other soft skills? As my SAS colleague Sascha Schubert writes, people and process matter, in addition to great technology. Great technology is a great first step, but having the right people following the right process is critically important.
This week's tip is from Gerhard Svolba and his book Data Quality for Analytics Using SAS. Gerhard is a product manager and pre-sales consultant at SAS in Austria, where he specializes in analytics and customer intelligence. Visit his author page to learn more about him and his work. The following excerpt is
For decades, researchers and programmers have used SAS to analyze, summarize, and report clinical trial data. Now Chris Holland and Jack Shostak have written the first comprehensive book on applying clinical research data and metadata to the Clinical Data Interchange Standards Consortium (CDISC) standards. What does this mean for you—the
We had some fierce wind storms all across the United States yesterday, which even spawned some tornadoes! It looks like we weathered the storm OK here in Cary (but I still need to run out to the lake and make sure my pontoon/houseboat is still there, agh!). Anyway ... as with other
I've got a new trick that you can use to track progress in a long-running SAS program, while using SAS Enterprise Guide. I've previously written about the SYSECHO statement and how you can use it to update the Task Status window with custom messages. SYSECHO is a "global" statement in
Over the holidays I was having a discussion with my cat, Ms. Trixie Lou. A question that often arises during the first programming class is the following: how do I find the variables that are in common to these two or three data sets? As it turns out, Ms. Trixie
The SAS/IML language secretly creates temporary variables. Most of the time programmers aren't even aware that the language does this. However, there is one situation where if you don't think carefully about temporary variables, your program will silently produce an error. And as every programmer knows, silent wrong numbers are