Strengthen your programming skills with tips and techniques from the experts

The SAS extension for VS Code supports SAS syntax and programming, and can connect to almost all SAS environments.
Strengthen your programming skills with tips and techniques from the experts
The SAS extension for VS Code supports SAS syntax and programming, and can connect to almost all SAS environments.
I read a journal article in which a researcher used a formula for the probability density function (PDF) of the sample correlation coefficient. The formula was rather complicated, and presented with no citation, so I was curious to learn more. I found the distribution for the correlation coefficient in the
A SAS programmer wanted to find the name of the variable for each row that contains the largest value. This task is useful for wide data sets in which each observation has several variables that are measured on the same scale. For example, each observation in the data might represent
Transitioning from SAS9 to SAS Viya can be uncertain for SAS programmers. Whether your organization is making the move and you’re curious about your current SAS analytical workflows, or you're contemplating moving to SAS Viya and concerned about its impact on your SAS expertise and programs. The hesitation is understandable.
Use SAS DATA step to split a large binary file into smaller pieces, which can help with file upload operations,
In a first course in numerical analysis, students often encounter a simple iterative method for solving a linear system of equations, known as Jacobi's method (or Jacobi's iterative method). Although Jacobi's method is not used much in practice, it is introduced because it is easy to explain, easy to implement,
Have you ever been curious about your monthly water consumption and how it compares to others in your community? Recently, I had this question and decided to get ahold of my family's water usage data for analysis. Harnessing the power of data visualization, I compared my family of four's monthly
Learn how to fit a logistic regression and use your model to score new data. In part 4 of this series, we created and saved our modeling data set with all our updates from imputing missing values and assigning rows to training and validation data. Now we will use this
Statistical software provides methods to simulate independent random variates from continuous and discrete distributions. For example, in the SAS DATA step, you can use the RAND function to simulate variates from continuous distributions (such as the normal or lognormal distributions) or from discrete distributions (such as the Bernoulli or Poisson).
SAS expert Ron Cody recently published a fiction novel, The Enigma Terrorists, in which SAS code plays a key role.
In a previous article, I presented some of the most popular blog posts from 2023. The popular articles tend to discuss elementary topics that have broad appeal. However, I also wrote many technical articles about advanced topics. The following articles didn't make the Top 10 list, but they deserve a
In 2023, I wrote 90 articles for The DO Loop blog. My most popular articles were about SAS programming, data visualization, and statistics. In addition, several "general interest" articles were popular, including my article for Pi Day and an article about AI chatbots. If you missed any of these articles,
Learn how to fit a linear regression and use your model to score new data. In part 4 of this series, we created our modeling dataset by including a column to identify the rows to be used for training and validating our model. Here, we will create our first model
SAS Enterprise Guide(이하 SAS EG)의 최근 버전에서는 기존의 폴더를 통한 접근뿐만 아니라 GitHub 레파지토리를 등록하여 프로그램을 실행, 수정, 관리할 수 있습니다. 회사나 개인 용도로 GitHub을 사용하고 있을 경우, SAS EG에 레파지토리를 등록하여 사용이 가능합니다. 기존에 SAS EG와 GitHub을 사용하는 분이라면 EG를 통해서 좀 더 효율적이고 편리하게 작업을 하실 수 있습니다.
A previous article discussed how to compute probabilities for the bivariate standard normal distribution. The standard bivariate normal distribution with correlation ρ is denoted BVN(0,ρ). For any point (x,y), you can use the PROBBNRM function in SAS to compute the probability that the random variables (X,Y) ~ BVN(0,ρ) is observed
This article shows how to use SAS to compute the probabilities for two correlated normal variables. Specifically, this article shows how to compute the probabilities for rectangular regions in the plane. A second article discusses the computation over infinite regions such as quadrants. If (X,Y) are random variables that are
Learn how to split your data into a training and validation data set to be used for modeling. In part 3 of this series, we replaced the missing values with imputed values. Our final step in preparing the data for modeling is to split the data into a training and
The collinearity problem is to determine whether three points in the plane lie along a straight line. You can solve this problem by using middle-school algebra. An algebraic solution requires three steps. First, name the points: p, q, and r. Second, find the parametric equation for the line that passes
Plot rates, not counts. This maxim is often stated by data visualization experts, but often ignored by practitioners. You might also hear the related phrases "plot proportions" or "plot percentages," which mean the same thing but expresses the idea alliteratively. An example in a previous article about avoiding alphabetical ordering
In SAS Viya 4 you can create Reports in SAS Visual Analytics that you may want to move around between machines. What if you want copy a report for example from a development environment folder to a production environment folder? You may want to work on the report in one system before putting it onto a final system and making it generally available. Or you may want to have a backup copy saved for recovery purposes. This blog post provides an updated description of how to easily save off SAS Visual Analytics report content to a file and easily move it between machines.
In part 1 of this series, we examined our data before building any models. Among the discoveries were missing values in some of our columns. Missing values are an inevitable part of data analysis. Whether it's due to a faulty sensor, human error, or simply the absence of information, missing
Converting a program from one language to another can be a challenge. Even if the languages share many features, there is often syntax that is valid in one language that is not valid in another. Recently, a SAS programmer was converting a program from R to SAS IML. He reached
You most likely have used a Portable Document Format (PDF) file in one form or another. Now, what if you have a PDF file and want to extract the text from the file? What if the PDF file contains input fields that a user fills in and you want to
Sometimes it is helpful to display a table of statistics directly on a graph. A simple example is displaying the number of observations and the mean or median on a histogram. In SAS, the term inset is used to describe a table that is displayed on a graph. This article
SAS Visual Anaytics(이하, VA)를 사용할 때, 리포트의 형태를 고정하고 변수만 변경하면서 그래프 및 값들이 바뀌는 결과를 확인할 수 있으면 더 효율적이지 않을까 생각해 본 적이 있으신가요? VA에서 파라미터를 활용하면 가능합니다. 파라미터의 활용법을 다루기 전에 전반적인 이해를 돕고자 파라미터가 무엇인지, 어떻게 사용하는 것인지 등에 대한 내용을 먼저 살펴보고자 합니다. 이번 블로그
Appending data tables is a common task for data analysis. Here are three of the several methods possible through the SAS Viya platform.
In several previous articles, I've shown how to use SAS to fit models to data by using maximum likelihood estimation (MLE). However, I have not previously shown how to obtain standard errors for the estimates. This article combines two previous articles to show how to obtain MLE estimates and the
A previous article shows how to use Monte Carlo simulation to approximate the sampling distribution of the sample mean and sample median. When x ~ N(0,1) are normal data, the sample mean is also normal, and there are simple formulas for the expected value and the standard error of the
Welcome back to my SAS Users blog series CAS Action! - a series on fundamentals. In this post, I'll show how to create user defined functions (UDFs) for the distributed CAS server using SAS and CASL code. Once the UDF is created, you can use it on the CAS server with programming
An elementary course in statistics often includes a discussion of the sampling distribution of a statistic. The canonical example is the sampling distribution of the sample mean. For samples of size n that are drawn from a normally distribution (X ~ N(μ, σ)), the sample mean is normally distributed as