Posts Tagged ‘ Data Analysis ’

Discover power laws by log-transforming data

December 5, 2016
By
Discover power laws by log-transforming data

A recent issue of Astronomy magazine mentioned Kepler's third law of planetary motion, which states "the square of a planet's orbital period is proportional to the cube of its average distance from the Sun" (Astronomy, Dec 2016, p. 17). The article included a graph (shown at the right) that shows […] The post Discover power laws by log-transforming data appeared first on The DO Loop.

Read more »

Visualize the ages of US presidents

November 14, 2016
By
Visualize the ages of US presidents

Who was the oldest person elected president of the United States? How about the youngest? Who was the oldest when he left office? Let's look at some data. Wikipedia has a page that presents a table of the presidents of the US by age. It lists the dates for which […] The post Visualize the ages of US presidents appeared first on The DO Loop.

Read more »

Sometimes you need to reverse the data before you fit a distribution

November 2, 2016
By
Sometimes you need to reverse the data before you fit a distribution

Occasionally on a discussion forum, a statistical programmer will ask a question like the following: I am trying to fit a parametric distribution to my data. The sample has a long tail, so I have tried the lognormal, Weibull, and gamma distributions, but nothing seems to fit. Please help!! In […] The post Sometimes you need to reverse the data before you fit a distribution appeared first on The DO…

Read more »

Counting observations for which two events occur

October 31, 2016
By
Counting observations for which two events occur

Every year near Halloween I write an article in which I demonstrate a simple programming trick that is a real treat to use. This year's trick (which features the CMISS function and the crossproducts matrix in SAS/IML) enables you to count the number of observations that are missing for pairs […] The post Counting observations for which two events occur appeared first on The DO Loop.

Read more »

Loess regression in SAS/IML

October 19, 2016
By
Loess regression in SAS/IML

A previous post discusses how the loess regression algorithm is implemented in SAS. The LOESS procedure in SAS/STAT software provides the data analyst with options to control the loess algorithm and fit nonparametric smoothing curves through points in a scatter plot. Although PROC LOESS satisfies 99.99% of SAS users who […] The post Loess regression in SAS/IML appeared first on The DO Loop.

Read more »

What is loess regression?

October 17, 2016
By
What is loess regression?

Loess regression is a nonparametric technique that uses local weighted regression to fit a smooth curve through points in a scatter plot. Loess curves are can reveal trends and cycles in data that might be difficult to model with a parametric curve. Loess regression is one of several algorithms in […] The post What is loess regression? appeared first on The DO Loop.

Read more »

The empty-space distance plot

October 12, 2016
By
The empty-space distance plot

How far away is the nearest hospital? How far is the nearest restaurant? The nearest gas station? These are commonly asked questions whose answers depend on the location of the person asking the question. Recently I showed an algorithm that enables you to find the distance between a set of […] The post The empty-space distance plot appeared first on The DO Loop.

Read more »

Visualize a weighted regression

October 5, 2016
By
Visualize a weighted regression

What is weighted regression? How does it differ from ordinary (unweighted) regression? This article describes how to compute and score weighted regression models. Visualize a weighted regression Technically, an "unweighted" regression should be called an "equally weighted " regression since each ordinary least squares (OLS) regression weights each observation equally. […] The post Visualize a weighted regression appeared first on The DO Loop.

Read more »

Let PROC FREQ create graphs of your two-way tables

October 3, 2016
By
Let PROC FREQ create graphs of your two-way tables

The recent releases of SAS 9.4 have featured major enhancements to the ODS statistical graphics procedures such as PROC SGPLOT. In fact, PROC SGPLOT (and the underlying Graph Template Language (GTL)) are so versatile and powerful that you might forget to consider whether you can create a graph automatically by […] The post Let PROC FREQ create graphs of your two-way tables appeared first on The DO Loop.

Read more »

Distances between observations in two groups

September 28, 2016
By
Distances between observations in two groups

Last week I showed how to find the nearest neighbors for a set of d-dimensional points. A SAS user wrote to ask whether something similar could be done when you have two distinct groups of points and you want to find the elements in the second group that are closest […] The post Distances between observations in two groups appeared first on The DO Loop.

Read more »


Subscribe

Email:

  Subscribe