Blog Archives

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 »

Create an ogive in SAS

September 26, 2016
By
Create an ogive in SAS

My son is taking an AP Statistics course in high school this year. AP Statistics is one of the fastest-growing AP courses, so I welcome the chance to see topics and techniques in the course. Last week I was pleased to see that they teach data exploration techniques, such as […] The post Create an ogive in SAS appeared first on The DO Loop.

Read more »

Simulate data from a generalized Gaussian distribution

September 21, 2016
By
Simulate data from a generalized Gaussian distribution

Although statisticians often assume normally distributed errors, there are important processes for which the error distribution has a heavy tail. A well-known heavy-tailed distribution is the t distribution, but the t distribution is unsuitable for some applications because it does not have finite moments (means, variance,...) for small parameter values. […] The post Simulate data from a generalized Gaussian distribution appeared first on The DO Loop.

Read more »

The distribution of nearest neighbor distances

September 19, 2016
By
The distribution of nearest neighbor distances

Last week I showed how to compute nearest-neighbor distances for a set of numerical observations. Nearest-neighbor distances are used in many statistical computations, including the analysis of spatial point patterns. This article describes how the distribution of nearest-neighbor distances can help you determine whether spatial data are uniformly distributed or […] The post The distribution of nearest neighbor distances appeared first on The DO Loop.

Read more »

Compute nearest neighbors in SAS

September 14, 2016
By
Compute nearest neighbors in SAS

Finding nearest neighbors is an important step in many statistical computations such as local regression, clustering, and the analysis of spatial point patterns. Several SAS procedures find nearest neighbors as part of an analysis, including PROC LOESS, PROC CLUSTER, PROC MODECLUS, and PROC SPP. This article shows how to find […] The post Compute nearest neighbors in SAS appeared first on The DO Loop.

Read more »

Overlay a curve on a bar chart in SAS

September 12, 2016
By
Overlay a curve on a bar chart in SAS

One of the strengths of the SGPLOT procedure in SAS is the ease with which you can overlay multiple plots on the same graph. For example, you can easily combine the SCATTER and SERIES statements to add a curve to a scatter plot. However, if you try to overlay incompatible […] The post Overlay a curve on a bar chart in SAS appeared first on The DO Loop.

Read more »

Coverage probability of confidence intervals: A simulation approach

September 8, 2016
By
Coverage probability of confidence intervals: A simulation approach

The article uses the SAS DATA step and Base SAS procedures to estimate the coverage probability of the confidence interval for the mean of normally distributed data. This discussion is based on Section 5.2 (p. 74–77) of Simulating Data with SAS. What is a confidence interval? Recall that a confidence […] The post Coverage probability of confidence intervals: A simulation approach appeared first on The DO Loop.

Read more »

Graph a step function in SAS

September 6, 2016
By
Graph a step function in SAS

Last week I wrote about how to compute sample quantiles and weighted quantiles in SAS. As part of that article, I needed to draw some step functions. Recall that a step function is a piecewise constant function that jumps by a certain amount at a finite number of points. Graph […] The post Graph a step function in SAS appeared first on The DO Loop.

Read more »

The Lambert W function in SAS

August 31, 2016
By
The Lambert W function in SAS

This article describes how you can evaluate the Lambert W function in SAS/IML software. The Lambert W function is defined implicitly: given a real value x, the function's value w = W(x) is the value of w that satisfies the equation w exp(w) = x. Thus W is the inverse […] The post The Lambert W function in SAS appeared first on The DO Loop.

Read more »

Weighted percentiles

August 29, 2016
By
Weighted percentiles

Many univariate descriptive statistics are intuitive. However, weighted statistic are less intuitive. A weight variable changes the computation of a statistic by giving more weight to some observations than to others. This article shows how to compute and visualize weighted percentiles, also known as a weighted quantiles, as computed by […] The post Weighted percentiles appeared first on The DO Loop.

Read more »


Subscribe

Email:

  Subscribe