Posts Tagged ‘ Statistical Programming ’

The method of moments: A smart way to choose initial parameters for MLE

November 27, 2017
By
The method of moments: A smart way to choose initial parameters for MLE

When you run an optimization, it is often not clear how to provide the optimization algorithm with an initial guess for the parameters. A good guess converges quickly to the optimal solution whereas a bad guess might diverge or require many iterations to converge. Many people use a default value [...] The post The method of moments: A smart way to choose initial parameters for MLE appeared first on The…

Read more »

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 Compute the CDF and quantiles of discrete distributions appeared first on The DO Loop.

Read more »

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 Catch run-time errors in SAS/IML programs appeared first on The DO Loop.

Read more »

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 A tip for debugging SAS/IML modules: The PAUSE statement appeared first on The DO Loop.

Read more »

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 Principal component regression in SAS appeared first on The DO Loop.

Read more »

The path of zip codes

September 18, 2017
By
The path of zip codes

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 The path of zip codes appeared first on The DO Loop.

Read more »

Use a bar chart to visualize pairwise correlations

August 16, 2017
By
Use a bar chart to visualize pairwise correlations

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 Use a bar chart to visualize pairwise correlations appeared first on The DO Loop.

Read more »

Robust principal component analysis in SAS

August 9, 2017
By
Robust principal component analysis in SAS

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 Robust principal component analysis in SAS appeared first on The DO Loop.

Read more »

Test for the equality of two proportions in SAS

July 5, 2017
By
Test for the equality of two proportions in SAS

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 Test for the equality of two proportions in SAS appeared first on The DO Loop.

Read more »

Video: Create and use lists and tables in SAS/IML

June 26, 2017
By
Video: Create and use lists and tables in SAS/IML

My presentation at SAS Global Forum 2017 was "More Than Matrices: SAS/IML Software Supports New Data Structures." The paper was published in the conference proceedings several months ago, but I recently recorded a short video that gives an overview of using the new data structures in SAS/IML 14.2: If your [...] The post Video: Create and use lists and tables in SAS/IML appeared first on The DO Loop.

Read more »


Subscribe

Email:

  Subscribe