Posts Tagged ‘ Statistical Programming ’

A Monte Carlo algorithm to estimate a median

February 21, 2018
By
A Monte Carlo algorithm to estimate a median

This article describes and implements a fast algorithm that estimates a median for very large samples. The traditional median estimate sorts a sample of size N and returns the middle value (when N is odd). The algorithm in this article uses Monte Carlo techniques to estimate the median much faster.

The post Read more »

Tags: ,
Posted in SAS | Comments Off on A Monte Carlo algorithm to estimate a median

Compute the quantiles of any distribution

February 19, 2018
By
Compute the quantiles of any distribution

Your statistical software probably provides a function that computes quantiles of common probability distributions such as the normal, exponential, and beta distributions. Because there are infinitely many probability distributions, you might encounter a distribution for which a built-in quantile function is not implemented. No problem! This article shows how to

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Compute the quantiles of any distribution

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 Read more »

Tags: , ,
Posted in SAS | Comments Off on Use lists to pass parameters to SAS/IML functions

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 Read more »

Tags: , ,
Posted in SAS | Comments Off on Create lists by using a natural syntax in SAS/IML

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 Read more »

Tags: , , ,
Posted in SAS | Comments Off on 10 posts from 2017 that deserve a second look

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 Read more »

Tags: , ,
Posted in SAS | Comments Off on The method of moments: A smart way to choose initial parameters for MLE

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 Read more »

Tags: ,
Posted in SAS | Comments Off on Compute the CDF and quantiles of discrete distributions

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 Read more »

Tags: ,
Posted in SAS | Comments Off on Catch run-time errors in SAS/IML programs

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

Sponsors







Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.