Posts Tagged ‘ Statistical Programming ’

Use lists to pass parameters to SAS/IML functions

January 24, 2018
By
Use lists to pass parameters to SAS/IML functions

A popular way to use lists in the SAS/IML language is to pack together several related matrices into a single data structure that can be passed to a function. Imagine that you have written an algorithm that requires a dozen different parameters. Historically, you would have to pass those parameters [...] The post Use lists to pass parameters to SAS/IML functions appeared first on The DO Loop.

Read more »

Create lists by using a natural syntax in SAS/IML

January 22, 2018
By
Create lists by using a natural syntax in SAS/IML

SAS/IML 14.3 (SAS 9.4M5) introduced a new syntax for creating lists and for assigning and extracting item in a list. Lists (introduced in SAS/IML 14.2) are data structures that are convenient for holding heterogeneous data. A single list can hold character matrices, numeric matrices, scalar values, and other lists, as [...] The post Create lists by using a natural syntax in SAS/IML appeared first on The DO Loop.

Read more »

10 posts from 2017 that deserve a second look

January 10, 2018
By
10 posts from 2017 that deserve a second look

Last week I wrote about the 10 most popular articles from The DO Loop in 2017. My most popular articles tend to be about elementary statistics or SAS programming tips. Less popular are the articles about advanced statistical and programming techniques. However, these technical articles fill an important niche. Not [...] The post 10 posts from 2017 that deserve a second look appeared first on The DO Loop.

Read more »

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 »


Subscribe

Email:

  Subscribe