# Posts Tagged ‘ Numerical Analysis ’

## Compute the rank of a matrix in SAS

April 8, 2015
By

A common question from statistical programmers is how to compute the rank of a matrix in SAS. Recall that the rank of a matrix is defined as the number of linearly independent columns in the matrix. (Equivalently, the number of linearly independent rows.) This article describes how to compute the

Tags: ,
Posted in SAS | Comments Off

## Create a custom PDF and CDF in SAS

March 6, 2015
By

In my previous post, I showed how to approximate a cumulative density function (CDF) by evaluating only the probability density function. The technique uses the trapezoidal rule of integration to approximate the CDF from the PDF. For common probability distributions, you can use the CDF function in Base SAS to

Tags: ,
Posted in SAS | Comments Off

## Optimizing a function of an integral

March 12, 2014
By

This post was kindly contributed by The DO Loop - go there to comment and to read the full post. Last week I showed how to find parameters that maximize the integral of a certain probability density function (PDF). Because the function was a PDF, I could evaluate the integral by calling the CDF...

Tags: ,
Posted in SAS | Comments Off

## Optimizing a function that evaluates an integral

March 5, 2014
By

SAS programmers use the SAS/IML language for many different tasks. One important task is computing an integral. Another is optimizing functions, such as maximizing a likelihood function to find parameters that best fit a set of data. Last week I saw an interesting problem that combines these two important tasks.

Tags: ,
Posted in SAS | Comments Off

## Define functions with default parameter values in SAS/IML

February 10, 2014
By

One of my favorite new features of SAS/IML 12.1 enables you to define functions that contain default values for parameters. This is extremely useful when you want to write a function that has optional arguments. Example: Centering a data vector It is simple to specify a SAS/IML module with a

Tags: , , ,
Posted in SAS | Comments Off

## A simple way to find the root of a function of one variable

February 5, 2014
By

Finding the root (or zero) of a function is an important computational task because it enables you to solve nonlinear equations. I have previously blogged about using Newton's method to find a root for a function of several variables. I have also blogged about how to use the bisection method

Tags: , ,
Posted in SAS | Comments Off

## How to compute the incomplete beta function in SAS

November 13, 2013
By

While sorting through an old pile of papers, I discovered notes from a 2012 SAS conference that I had attended. Next to the abstract for one presentation, I had scrawled a note to myself that read "BLOG about the incomplete beta function!" Okay, Rick, whatever you say! In statistics, the

Tags: ,
Posted in SAS | Comments Off

## Using finite differences to estimate the maximum of a time series

July 28, 2013
By

Finding the maximum value of a function is an important task in statistics. There are three approaches to finding a maxima: When the function is available as an analytic expression, you can use an optimization algorithm to find the maxima. For example, in the SAS/IML language, you can use any

Tags: ,
Posted in SAS | Comments Off

## Proc-x is looking for 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: [email protected]

## 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.

## Recent Posts

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.