Posts Tagged ‘ Statistical Programming ’

Three ways to add a smoothing spline to a scatter plot in SAS

February 24, 2014
By
Three ways to add a smoothing spline to a scatter plot in SAS

Like many SAS programmers, I use the Statistical Graphics (SG) procedures to graph my data in SAS. To me, the SGPLOT and SGRENDER procedures are powerful, easy to use, and produce fabulous ODS graphics. I was therefore surprised when a SAS customer told me that he continues to use the
Read more »

Tags: , ,
Posted in SAS | Comments Off

Techniques for scoring a regression model in SAS

February 19, 2014
By
Techniques for scoring a regression model in SAS

My previous post described how to use the "missing response trick" to score a regression model. As I said in that article, there are other ways to score a regression model. This article describes using the SCORE procedure, a SCORE statement, the relatively new PLM procedure, and the CODE statement.
Read more »

Tags: , , , ,
Posted in SAS | Comments Off

The missing value trick for scoring a regression model

February 17, 2014
By
The missing value trick for scoring a regression model

A fundamental operation in statistical data analysis is to fit a statistical regression model on one set of data and then evaluate the model on another set of data. The act of evaluating the model on the second set of data is called scoring. One of first "tricks" that I
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Secret Santa: What is the probability of pulling your own name from a hat?

December 4, 2013
By
Secret Santa: What is the probability of pulling your own name from a hat?

Each year my siblings choose names for a Christmas gift exchange. It is not unusual for a sibling to pick her own name, whereupon the name is replaced into the hat and a new name is drawn. In fact, that "glitch" in the drawing process was a motivation for me
Read more »

Tags: , ,
Posted in SAS | Comments Off

Twelve advantages to calling R from the SAS/IML language

November 25, 2013
By
Twelve advantages to calling R from the SAS/IML language

For several years, there has been interest in calling R from SAS software, primarily because of the large number of special-purpose R packages. The ability to call R from SAS has been available in SAS/IML since 2009. Previous blog posts about R include a video on how to call R
Read more »

Tags: , ,
Posted in SAS | Comments Off

Write a reusable SAS/IML module that passes values to R

November 20, 2013
By
Write a reusable SAS/IML module that passes values to R

When I call R from within the SAS/IML language, I often pass parameters from SAS into R. This feature enables me to write general-purpose, reusable, modules that can analyze data from many different data sets. I've previously blogged about how to pass values to SAS procedures from PROC IML by
Read more »

Tags: , ,
Posted in SAS | Comments Off

How to choose parameters so that a distribution has a specified mean and variance

July 26, 2013
By
How to choose parameters so that a distribution has a specified mean and variance

The truncated normal distribution TN(μ, σ, a, b) is the distribution of a normal random variable with mean μ and standard deviation σ that is truncated on the interval . I previously blogged about how to implement the truncated normal distribution in SAS. A friend wanted to simulate data
Read more »

Tags: , ,
Posted in SAS | Comments Off

Count the number of unique rows in a matrix

June 24, 2013
By

How do you count the number of unique rows in a matrix? The simplest algorithm is to sort the data and then iterate down the rows, comparing each row with the previous row. However, this algorithm has two shortcomings: it physically sorts the data (which means that the original locations
Read more »

Tags: , ,
Posted in SAS | Comments Off

Proc-x is looking for sponsors!

Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: [email protected]

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.