Posts Tagged ‘ Matrix Computations ’

The intersection of two line segments

July 9, 2018
By
The intersection of two line segments

Back in high school, you probably learned to find the intersection of two lines in the plane. The intersection requires solving a system of two linear equations. There are three cases: (1) the lines intersect in a unique point, (2) the lines are parallel and do not intersect, or (3)

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on The intersection of two line segments

The sweep operator: A fundamental operation in regression

April 18, 2018
By
The sweep operator: A fundamental operation in regression

The sweep operator performs elementary row operations on a system of linear equations. The sweep operator enables you to build regression models by "sweeping in" or "sweeping out" particular rows of the X`X matrix. As you do so, the estimates for the regression coefficients, the error sum of squares, and

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on The sweep operator: A fundamental operation in regression

Find the unique rows of a numeric matrix

April 11, 2018
By
Find the unique rows of a numeric matrix

Sometimes it is important to ensure that a matrix has unique rows. When the data are all numeric, there is an easy way to detect (and delete!) duplicate rows in a matrix. The main idea is to subtract one row from another. Start with the first row and subtract it

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Find the unique rows of a numeric matrix

The conjugate gradient method

March 21, 2018
By
The conjugate gradient method

I often claim that the "natural syntax" of the SAS/IML language makes it easy to implement an algorithm or statistical formula as it appears in a textbook or journal. The other day I had an opportunity to test the truth of that statement. A SAS programmer wanted to implement the

The post Read more »

Tags: ,
Posted in SAS | Comments Off on The conjugate gradient method

The probability of a saddle point in a matrix

March 5, 2018
By
The probability of a saddle point in a matrix

Many people know that a surface can contain a saddle point, but did you know that you can define the saddle point of a matrix? Saddle points in matrices are somewhat rare, which means that if you choose a random matrix you are unlikely to choose one that has a

The post Read more »

Tags: ,
Posted in SAS | Comments Off on The probability of a saddle point in a matrix

A self-similar Christmas tree

December 11, 2017
By
A self-similar Christmas tree

Happy holidays to all my readers! My greeting-card to you is an image of a self-similar Christmas tree. The image (click to enlarge) was created in SAS by using two features that I blog about regularly: matrix computations and ODS statistical graphics. Self-similarity in Kronecker products I have previously shown

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on A self-similar Christmas tree

The singular value decomposition and low-rank approximations

August 30, 2017
By

Aa previous article discussed the mathematical properties of the singular value decomposition (SVD) and showed how to use the SVD subroutine in SAS/IML software. This article uses the SVD to construct a low-rank approximation to an image. Applications include image compression and denoising an image. Construct a grayscale image The

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on The singular value decomposition and low-rank approximations

Flip it. Flip it good.

July 31, 2017
By

A SAS user needed to convert a program from MATLAB into the SAS/IML matrix language and asked whether these is a SAS/IML equivalent to the fliplr and flipud functions in MATLAB. These functions flip the columns or rows (respectively) of a matrix; "LR" stands for "left-right" and "UD" stands for

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Flip it. Flip it good.

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.