Strengthen your programming skills with tips and techniques from the experts
When you write a program that simulates data from a statistical model, you should always check that the simulation code is correct. One way to do this is to generate a large simulated sample, estimate the parameters in the simulated data, and make sure that the estimates are close to
The Kronecker product (also called the direct product) is a binary operation that combines two matrices to form a new matrix. The Kronecker product appears in textbooks about the design of experiments and multivariate statistics. The Kronecker product seems intimidating at first, but often one of the matrices in the
Last month a SAS programmer asked how to fit a multivariate Gaussian mixture model in SAS. For univariate data, you can use the FMM Procedure, which fits a large variety of finite mixture models. If your company is using SAS Viya, you can use the MBC or GMM procedures, which
Is there programmatic way to reduce memory requirements of a CAS table in SAS® Viya®? Yes! SAS' Steven Sober shows you how.
I recently showed how to compute within-group multivariate statistics by using the SAS/IML language. However, a principal of good software design is to encapsulate functionality and write self-contained functions that compute and return the results. What is the best way to return multiple statistics from a SAS/IML module? A convenient
The multivariate normal distribution is used frequently in multivariate statistics and machine learning. In many applications, you need to evaluate the log-likelihood function in order to compare how well different models fit the data. The log-likelihood for a vector x is the natural logarithm of the multivariate normal (MVN) density
In my new book, End-to-End Data Science with SAS: A Hands-On Programming Guide, I use the 1.5 IQR rule to adjust multiple variables. This program utilizes a macro that loops through a list of variables to make the necessary adjustments and creates an output data set. One of the most
A previous article introduces the MAPREDUCE function in the iml action. (The iml action was introduced in Viya 3.5.) The MAPREDUCE function implements the map-reduce paradigm, which is a two-step process for distributing a computation to multiple threads. The example in the previous article adds a set of numbers by
During the 2020 Coronavirus pandemic, you've probably formed a great appreciation for good, informative graphics. Good graphics can help you get a handle on thousands of individual data values, see the geographical distribution, or look for trends. In February, I wrote a blog post about creating a coronavirus dashboard with
Learn how to use SAS code (PROC HTTP) to read and write files from your Microsoft OneDrive, Microsoft Teams or SharePoint Online. You'll learn how to create a Microsoft Office 365 app, connect to it with SAS, and automate the integration with your office productivity environment.
The iml action in SAS Viya (introduced in Viya 3.5) provides a set of general programming tools that you can use to implement a custom parallel algorithm. This makes the iml action different than other Viya actions, which use distributed computations to solve specific problems in statistics, machine learning, and
Are you looking for a specific CAS action to use in your project? Maybe you need to create a linear or logistic regression and can't seem to find the CAS action? In this post in the Getting Started with Python Integration to SAS® Viya® series, we are going to look
오랜 시간동안 많은 사랑을 받아온 SAS 사용자 커뮤니티가 리뉴얼되었습니다. 한국에서 SAS 커뮤니티의 역사는 벌써 30년이 되었습니다. 1990년 SAS코리아 설립 이후 SAS User Group International-Korea(SUGI-K)라는 이름으로 활동한 SAS 사용자 모임이 2007년 MYSAS로 명칭을 바꾸었습니다. 그리고, 2010년 홈페이지를 개편하고 10년 만인 2020년, 사용자 모임의 활성화를 위해 새로운 SAS 커뮤니티 사이트로 여러분을 다시
Testing people for coronavirus is a public health measure that reduces the spread of coronavirus. Dr. Anthony Fauci, a US infectious disease expert, recently mentioned the concept of "pool testing." The verb "to pool" means "to combine from different sources." In a USA Today article, Dr. Deborah Birx, the coordinator
The first time I saw a formula for the pooled variance, I was quite confused. It looked like Frankenstein's monster, assembled from bits and pieces of other quantities and brought to life by a madman. However, the pooled variance does not have to be a confusing monstrosity. The verb "to
A lookup table is a programming technique where one or more values can be used to retrieve another value. For example, many years ago, I had benzene exposure estimates for 10 years (1940 to 1949) for each of five locations in a factory. Given a year and a job location,
If you have ever run a Kolmogorov-Smirnov test for normality, you have encountered the Kolmogorov D statistic. The Kolmogorov D statistic is used to assess whether a random sample was drawn from a specified distribution. Although it is frequently used to test for normality, the statistic is "distribution free" in
Kevin Russell of SAS Technical Support shows you how partitioning CAS tables speeds processing.
Sometimes in matrix computations, it is important to display the nonzero elements of a matrix. This can be useful for visualizing the structure of a sparse matrix (one that has many zeros) and it is also useful when describing a matrix algorithm (such as Gaussian elimination) that introduces zeros at
In the second post of the Getting Started with Python Integration to SAS® Viya® series we will learn about Working with CAS Actions and CASResults Objects. CAS actions are commands sent to the CAS server to run a task, and CASResults objects contain information returned from the CAS server. This
Index of articles on Getting Started with Python Integration to SAS® Viya®. Part 1 - Making a Connection Part 2 - Working with CAS Actions and CASResults Objects Part 3 - Loading a CAS Action Set Part 4 - Exploring Caslibs Part 5 - Uploading Data into CAS Part 6
SAS Public Sector's Elena Shtern is your guide as you extract data from the Federal Reserve Economic Data site using the SASEFRED interface engine, part of SAS/ETS® software.
A previous article shows how to use the iml action to read a CAS data table into an IML matrix. This article shows how to write a CAS table from data in an IML matrix. You can read an overview of the iml action, which was introduced in SAS Viya
A previous article compares a SAS/IML program that runs in PROC IML to the same program that runs in the iml action. (You can read an overview of the iml action.) The example in the previous article was very simple and did not read or write data. This article compares
A previous article provides an introduction and overview of the iml action, which is available in SAS Viya 3.5. The article compares the iml action to PROC IML and states that most PROC IML programs can be modified to run in iml action. This article takes a closer look at
Whether you enjoy debugging or hate it, for programmers, debugging is a fact of life. It’s easy to misspell a keyword, scramble your array subscripts, or (heaven forbid!) forget a semicolon. That’s why we include a chapter on debugging in The Little SAS® Book and its companion book, Exercises and
This article introduces the iml action, which is available in SAS Viya 3.5. The iml action supports most of the same syntax and functionality as the SAS/IML matrix language, which is implemented in PROC IML. With minimal changes, most programs that run in PROC IML also run in the iml
Learning never stops. When SAS had to change this year’s SAS Global Forum (SASGF) to a virtual event, everyone was disappointed. I am, however, super excited about all of the papers and stream of video releases over the last month (and I encourage you to register for the upcoming live