Posts Tagged ‘ Statistical Programming ’

Compute the CDF and quantiles of discrete distributions

November 22, 2017
By
Compute the CDF and quantiles of discrete distributions

A statistical programmer read my article about the beta-binomial distribution and wanted to know how to compute the cumulative distribution (CDF) and the quantile function for this distribution. In general, if you know the PDF for a discrete distribution, you can also compute the CDF and quantile functions. This article

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Compute the CDF and quantiles of discrete distributions

Catch run-time errors in SAS/IML programs

November 15, 2017
By
Catch run-time errors in SAS/IML programs

Did you know that a SAS/IML function can recover from a run-time error? You can specify how to handle run-time errors by using a programming technique that is similar to the modern "try-catch" technique, although the SAS/IML technique is an older implementation. Preventing errors versus handling errors In general, SAS/IML

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Catch run-time errors in SAS/IML programs

A tip for debugging SAS/IML modules: The PAUSE statement

November 13, 2017
By
A tip for debugging SAS/IML modules: The PAUSE statement

Debugging is the bane of every programmer. SAS supports a DATA step debugger, but that debugger can't be used for debugging SAS/IML programs. In lieu of a formal debugger, many SAS/IML programmers resort to inserting multiple PRINT statements into a function definition. However, there is an easier way to query

The post Read more »

Tags: ,
Posted in SAS | Comments Off on A tip for debugging SAS/IML modules: The PAUSE statement

Principal component regression in SAS

October 23, 2017
By
Principal component regression in SAS

A common question on discussion forums is how to compute a principal component regression in SAS. One reason people give for wanting to run a principal component regression is that the explanatory variables in the model are highly correlated which each other, a condition known as multicollinearity. Although principal component

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Principal component regression in SAS

The path of zip codes

September 18, 2017
By

Toe bone connected to the foot bone, Foot bone connected to the leg bone, Leg bone connected to the knee bone,...              — American Spiritual, "Dem Bones" Last week I read an interesting article on Robert Kosara's data visualization blog. Kosara connected the geographic centers of the US zip codes in

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on The path of zip codes

Use a bar chart to visualize pairwise correlations

August 16, 2017
By

Visualizing the correlations between variables often provides insight into the relationships between variables. I've previously written about how to use a heat map to visualize a correlation matrix in SAS/IML, and Chris Hemedinger showed how to use Base SAS to visualize correlations between variables. Recently a SAS programmer asked how

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Use a bar chart to visualize pairwise correlations

Robust principal component analysis in SAS

August 9, 2017
By

Recently, I was asked whether SAS can perform a principal component analysis (PCA) that is robust to the presence of outliers in the data. A PCA requires a data matrix, an estimate for the center of the data, and an estimate for the variance/covariance of the variables. Classically, these estimates

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Robust principal component analysis in SAS

Test for the equality of two proportions in SAS

July 5, 2017
By

A SAS customer asked how to use SAS to conduct a Z test for the equality of two proportions. He was directed to the SAS Usage Note "Testing the equality of two or more proportions from independent samples." The note says to "specify the CHISQ option in the TABLES statement

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Test for the equality of two proportions in SAS

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.

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: tal.galili@gmail.com
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.