Posts Tagged ‘ Numerical Analysis ’

Visualize the bivariate normal cumulative distribution

July 11, 2012
By
Visualize the bivariate normal cumulative distribution

When you are working with probability distributions (normal, Poisson, exponential, and so forth), there are four essential functions that a statistical programmer needs. As I've written before, for common univariate distributions, SAS provides the following functions: the PDF function, which returns the probability density at a given point the CDF
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Convergence or divergence? A simple iteration with a random component

June 13, 2012
By
Convergence or divergence? A simple iteration with a random component

A collegue who works with time series sent me the following code snippet. He said that the calculation was overflowing and wanted to know if this was a bug in SAS: data A(drop=m); call streaminit(12345); m = 2; x = 0; do i = 1 to 5000; x = m*x
Read more »

Tags: , , ,
Posted in SAS | Comments Off

The curious case of random eigenvalues

May 16, 2012
By
The curious case of random eigenvalues

I've been a fan of statistical simulation and other kinds of computer experimentation for many years. For me, simulation is a good way to understand how the world of statistics works, and to formulate and test conjectures. Last week, while investigating the efficiency of the power method for finding dominant
Read more »

Tags: , , ,
Posted in SAS | Comments Off

The power method: compute only the largest eigenvalue of a matrix

May 9, 2012
By
The power method: compute only the largest eigenvalue of a matrix

When I was at SAS Global Forum last week, a SAS user asked my advice regarding a SAS/IML program that he wrote. One step of the program was taking too long to run and he wondered if I could suggest a way to speed it up. The long-running step was
Read more »

Tags: , , ,
Posted in SAS | Comments Off

The DIF function: Compute lagged differences and finite differences

May 2, 2012
By
The DIF function: Compute lagged differences and finite differences

To a statistician, the DIF function (which was introduced in SAS/IML 9.22) is useful for time series analysis. To a numerical analyst and a statistical programmer, the function has many other uses, including computing finite differences. The DIF function computes the difference between the original vector and a shifted version
Read more »

Tags: , , ,
Posted in SAS | Comments Off

The LAG function: Useful for more than time series analysis

April 30, 2012
By
The LAG function: Useful for more than time series analysis

To a statistician, the LAG function (which was introduced in SAS/IML 9.22) is useful for time series analysis. To a numerical analyst and a statistical programmer, the function provides a convenient way to compute quantitites that involve adjacent values in any vector. The LAG function is essentially a "shift operator."
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Generate a random matrix with specified eigenvalues

March 30, 2012
By
Generate a random matrix with specified eigenvalues

In a previous post I showed how to implement Stewart's (1980) algorithm for generating random orthogonal matrices in SAS/IML software. By using the algorithm, it is easy to generate a random matrix that contains a specified set of eigenvalues. If D = diag(λ1, ..., λp) is a diagonal matrix and
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Generating a random orthogonal matrix

March 28, 2012
By
Generating a random orthogonal matrix

Because I am writing a new book about simulating data in SAS, I have been doing a lot of reading and research about how to simulate various quantities. Random integers? Check! Random univariate samples? Check! Random multivariate samples? Check! Recently I've been researching how to generate random matrices. I've blogged
Read more »

Tags: , , ,
Posted in SAS | Comments Off

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.

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.