Posts Tagged ‘ Matrix Computations ’

Efficient evaluation of a quadratic form

April 15, 2019
By
Efficient evaluation of a quadratic form

A quadratic form is a second-degree polynomial that does not have any linear or constant terms. For multivariate polynomials, you can quickly evaluate a quadratic form by using the matrix expression x` A x This computation is straightforward in a matrix language such as SAS/IML. However, some computations in statistics

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Efficient evaluation of a quadratic form

4 ways to compute an SSCP matrix

April 10, 2019
By
4 ways to compute an SSCP matrix

In numerical linear algebra, there are often multiple ways to solve a problem, and each way is useful in various contexts. In fact, one of the challenges in matrix computations is choosing from among different algorithms, which often vary in their use of memory, data access, and speed. This article

The post Read more »

Tags: ,
Posted in SAS | Comments Off on 4 ways to compute an SSCP matrix

How to simulate multivariate outliers

March 27, 2019
By
How to simulate multivariate outliers

In simulation studies, sometimes you need to simulate outliers. For example, in a simulation study of regression techniques, you might want to generate outliers in the explanatory variables to see how the technique handles high-leverage points. This article shows how to generate outliers in multivariate normal data that are a

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on How to simulate multivariate outliers

Singular parameterizations, generalized inverses, and regression estimates

November 28, 2018
By
Singular parameterizations, generalized inverses, and regression estimates

I remember the first time I used PROC GLM in SAS to include a classification effect in a regression model. I thought I had done something wrong because the parameter estimates table was followed by a scary-looking note: Note: The X'X matrix has been found to be singular, and a

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Singular parameterizations, generalized inverses, and regression estimates

Generalized inverses for matrices

November 21, 2018
By

A data analyst asked how to compute parameter estimates in a linear regression model when the underlying data matrix is rank deficient. This situation can occur if one of the variables in the regression is a linear combination of other variables. It also occurs when you use the GLM parameterization

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Generalized inverses for matrices

Transpose blocks to reshape data

October 22, 2018
By
Transpose blocks to reshape data

A SAS programmer asked how to rearrange elements of a matrix. The rearrangement he wanted was rather complicated: certain blocks of data needed to move relative to other blocks, but the values within each block were to remain unchanged. It turned out that the mathematical operation he needed is called

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Transpose blocks to reshape data

Fast simulation of multivariate normal data with an AR(1) correlation structure

October 3, 2018
By
Fast simulation of multivariate normal data with an AR(1) correlation structure

It is sometimes necessary for researchers to simulate data with thousands of variables. It is easy to simulate thousands of uncorrelated variables, but more difficult to simulate thousands of correlated variables. For that, you can generate a correlation matrix that has special properties, such as a Toeplitz matrix or a

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Fast simulation of multivariate normal data with an AR(1) correlation structure

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

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.