Blog Archives

Merge observed outcomes into a list of all outcomes

July 1, 2015
By
Merge observed outcomes into a list of all outcomes

When you count the outcomes of an experiment, you do not always observe all of the possible outcomes. For example, if you roll a six-sided die 10 times, it might be that the "1" face does not appear in those 10 rolls. Obviously, this situation occurs more frequently with small […] The post Merge observed outcomes into a list of all outcomes appeared first on The DO Loop.

Read more »

An easy way to use numbers for column headers

June 29, 2015
By
An easy way to use numbers for column headers

When I am computing with SAS/IML matrices and vectors, I often want to label the columns or rows so that I can better understand the data. The labels are called headers, and the COLNAME= and ROWNAME= options in the SAS/IML PRINT statement enable you to add headers for columns and […] The post An easy way to use numbers for column headers appeared first on The DO Loop.

Read more »

The sensitivity of Newton’s method to an initial guess

June 24, 2015
By
The sensitivity of Newton’s method to an initial guess

In my article about finding an initial guess for root-finding algorithms, I stated that Newton's root-finding method "might not converge or might converge to a root that is far away from the root that you wanted to find." A reader wanted more information about that statement. I have previously shown […] The post The sensitivity of Newton's method to an initial guess appeared first on The DO Loop.

Read more »

Finding roots: Automating the search for an initial guess

June 22, 2015
By
Finding roots: Automating the search for an initial guess

A SAS programmer asked an interesting question on a SAS Support Community. The programmer had a nonlinear function with 12 parameters. He also had file that contained 4,000 lines, where each line contained values for the 12 parameters. In other words, the file specified 4,000 different functions. The programmer wanted […] The post Finding roots: Automating the search for an initial guess 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 »

Execute SAS/IML statements that are in a file at run time

June 15, 2015
By
Execute SAS/IML statements that are in a file at run time

A feature of SAS/IML 13.2 (shipped with SAS 9.4m2, Aug 2014) is the ability to execute SAS/IML statements that are in a file. The feature is implemented by the new EXECUTEFILE subroutine. This feature is similar to the CALL EXECUTE statement. The difference is that the EXECUTEFILE subroutine reads, parses, […] The post Execute SAS/IML statements that are in a file at run time appeared first on The DO Loop.

Read more »

The spiral of splatter

June 11, 2015
By
The spiral of splatter

"Daddy, help! Help me! Come quick!" I heard my daughter's screams from the upstairs bathroom and bounded up the stairs two at a time. Was she hurt? Bleeding? Was the toilet overflowing? When I arrived in the doorway, she pointed at the wall and at the floor. The wall was […] The post The spiral of splatter appeared first on The DO Loop.

Read more »

Computing polar angles from coordinate data

June 10, 2015
By
Computing polar angles from coordinate data

Equations that involve trigonometric functions can have infinitely many solutions. For example, the solution to the equation tan(θ)=1 is θ = π/4 + kπ, where k is any integer. In order to obtain a unique solution to the equation, we define the "arc" functions: inverse trigonometric functions that return a […] The post Computing polar angles from coordinate data appeared first on The DO Loop.

Read more »

Fit a circle to data

June 8, 2015
By
Fit a circle to data

I still remember the first time I was asked to "consult" on a statistical problem. A former physics professor had some students who had gathered data that should lie along an arc of a theoretical circle. The professor asked if there was a regression technique that could find the center […] The post Fit a circle to data appeared first on The DO Loop.

Read more »

The mystery of the density curve that was too short

June 3, 2015
By
The mystery of the density curve that was too short

I was reading a statistics book when I encountered a histogram that caught my eye. The histogram looked similar to the one at the left. It contained a normal density estimate overlaid on a histogram, but the height of the density curve seemed too short when compared to the heights […] The post The mystery of the density curve that was too short appeared first on The DO Loop.

Read more »


Subscribe

Email:

  Subscribe