Posts Tagged ‘ Statistical Programming ’

Rolling statistics in SAS/IML

February 3, 2016
By
Rolling statistics in SAS/IML

Last week I showed how to use PROC EXPAND to compute moving averages and other rolling statistics in SAS. Unfortunately, PROC EXPAND is part of SAS/ETS software and not every SAS site has a license for SAS/ETS. For simple moving averages, you can write a DATA step program, as discussed […] The post Rolling statistics in SAS/IML appeared first on The DO Loop.

Read more »

Banking to 45 degrees: Aspect ratios for time series plots

January 20, 2016
By
Banking to 45 degrees: Aspect ratios for time series plots

In SAS, the aspect ratio of a graph is the physical height of the graph divided by the physical width. Recently I demonstrated how to set the aspect ratio of graphs in SAS by using the ASPECT= option in PROC SGPLOT or by using the OVERLAYEQUATED statement in the Graph […] The post Banking to 45 degrees: Aspect ratios for time series plots appeared first on The DO Loop.

Read more »

Twelve posts from 2015 that deserve a second look

January 11, 2016
By
Twelve posts from 2015 that deserve a second look

I began 2016 by compiling a list of popular articles from my blog in 2015. This "People's Choice" list contains many interesting articles, but some of my personal favorites did not make the list. Today I present the "Editor's Choice" list of articles that deserve a second look. I've grouped […] The post Twelve posts from 2015 that deserve a second look appeared first on The DO Loop.

Read more »

Extracting elements from a matrix: rows, columns, submatrices, and indices

November 25, 2015
By
Extracting elements from a matrix: rows, columns, submatrices, and indices

A matrix is a convenient way to store an array of numbers. However, often you need to extract certain elements from a matrix. The SAS/IML language aupports two ways to extract elements: by using subscripts or by using indices. Use subscripts when you are extracting a rectangular portion of a […] The post Extracting elements from a matrix: rows, columns, submatrices, and indices appeared first on The DO Loop.

Read more »

Can’t find that data? Search all variables in all data sets

November 2, 2015
By
Can’t find that data? Search all variables in all data sets

Sometimes I can't remember where I put things. If I lose my glasses or garden tools, I am out of luck. But when I can't remember where I put some data, I have SAS to help me find it. When I can remember the name of the data set, my […] The post Can't find that data? Search all variables in all data sets appeared first on The DO Loop.

Read more »

Exact tests in PROC FREQ: What, when, and how

October 26, 2015
By
Exact tests in PROC FREQ: What, when, and how

Did you know that the FREQ procedure in SAS can compute exact p-values for more than 20 statistical tests and statistics that are associated with contingency table? Mamma mia! That's a veritable smorgasbord of options! Some of the tests are specifically for one-way tables or 2 x 2 tables, but many apply […] The post Exact tests in PROC FREQ: What, when, and how appeared first on The DO Loop.

Read more »

Plot the conditional distribution of the response in a linear regression model

September 10, 2015
By
Plot the conditional distribution of the response in a linear regression model

A friend who teaches courses about statistical regression asked me how to create a graph in SAS that illustrates an important concept: the conditional distribution of the response variable. The basic idea is to draw a scatter plot with a regression line, then overlay several probability distributions along the line, […] The post Plot the conditional distribution of the response in a linear regression model appeared first on The DO…

Read more »

Where did it come from? Adding the source of each observation to a SAS data set

August 3, 2015
By
Where did it come from? Adding the source of each observation to a SAS data set

Imagine the following scenario. You have many data sets from various sources, such as individual stores or hospitals. You use the SAS DATA step to concatenate the many data sets into a single large data set. You give the big data set to a colleague who will analyze it. Later […] The post Where did it come from? Adding the source of each observation to a SAS data set appeared…

Read more »

The use of SAS/IML software in published research

July 6, 2015
By
The use of SAS/IML software in published research

SAS/IML software is used by many SAS programmers, primarily for creating custom algorithms and macros that implement statistical analyses that are not built into any SAS procedure. I know that PROC IML is used regularly by pharmaceutical companies, by the financial and insurance industries, and by researchers in medical colleges […] The post The use of SAS/IML software in published research appeared first on The DO Loop.

Read more »

Everything you wanted to know about writing SAS/IML modules

June 17, 2015
By
Everything you wanted to know about writing SAS/IML modules

One of the fundamental principles of computer programming is to break a task into smaller subtasks and to modularize the program by encapsulating each subtask into its own function. I have written many blog posts over the years about how to define and use functions in the SAS/IML language. I […] The post Everything you wanted to know about writing SAS/IML modules appeared first on The DO Loop.

Read more »


Subscribe

Email:

  Subscribe