Posts Tagged ‘ Optimization ’

Split data into groups that have the same mean and variance

May 1, 2017
By
Split data into groups that have the same mean and variance

A frequently asked question on SAS discussion forums concerns randomly assigning units (often patients in a study) to various experimental groups so that each group has approximately the same number of units. This basic problem is easily solved in SAS by using PROC SURVEYSELECT or a DATA step program. A

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Split data into groups that have the same mean and variance

Quadratic optimization in SAS

April 12, 2017
By
Quadratic optimization in SAS

At SAS Global Forum last week, I saw a poster that used SAS/IML to optimized a quadratic objective function that arises in financial portfolio management (Xia, Eberhardt, and Kastin, 2017). The authors used the Newton-Raphson optimizer (NLPNRA routine) in SAS/IML to optimize a hypothetical portfolio of assets. The Newton-Raphson algorithm

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Quadratic optimization in SAS

Solve mixed-integer linear programming problems in SAS

January 18, 2017
By
Solve mixed-integer linear programming problems in SAS

This article shows how to solve mixed-integer linear programming (MILP) problems in SAS. In a mixed-integer problem, some of the variables in the problem are integer-valued whereas others are continuous. The objective function is a linear function of the variables and the variables can be subject to linear constraints. Last

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Solve mixed-integer linear programming problems in SAS

Solve linear programming problems in SAS

December 19, 2016
By
Solve linear programming problems in SAS

In some applications, you need to optimize a linear objective function of many variables, subject to linear constraints. Solving this problem is called linear programming or linear optimization. This article shows two ways to solve linear programming problems in SAS: You can use the OPTMODEL procedure in SAS/OR software or

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Solve linear programming problems in SAS

Ten tips before you run an optimization

May 11, 2016
By

Optimization is a primary tool of computational statistics. SAS/IML software provides a suite of nonlinear optimizers that makes it easy to find an optimum for a user-defined objective function. You can perform unconstrained optimization, or define linear or nonlinear constraints for constrained optimization. Over the years I have seen many

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Ten tips before you run an optimization

Trap and cap: Avoid division-by-zero and domain errors when evaluating functions

November 4, 2015
By
Trap and cap: Avoid division-by-zero and domain errors when evaluating functions

Statistical programmers often need to evaluate complicated expressions that contain square roots, logarithms, and other functions whose domain is restricted. Similarly, you might need to evaluate a rational expression in which the denominator of the expression can be zero. In these cases, it is important to avoid evaluating a function

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Trap and cap: Avoid division-by-zero and domain errors when evaluating functions

Date and datetime: accuracy vs storage and I/O costs (SAS)

March 12, 2013
By

How much storage space and I/O resources can be saved by using the LENGTH statement to shrink the storage of date and datetimes while maintaining sufficient precision? In my experience, saving I/O generally makes SAS run faster (such as in a DATA step)...
Read more »

Tags: , ,
Posted in SAS | Comments Off on Date and datetime: accuracy vs storage and I/O costs (SAS)

Birthday gift code puzzle

September 19, 2011
By

This is a SAS code puzzle. The code works as is, but can you make it simpler? We do this while enjoying simulation and the quirkiness of the Gregorian calendar. The problem A person receives a gift on a random day. Relative to his birthday, how many da...
Read more »

Tags: ,
Posted in SAS | Comments Off on Birthday gift code puzzle

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.