Operations Research topics: SAS/OR,
SAS Optimization, and SAS Simulation Studio

Using Procedures in a PROC GA Optimization Problem

Reply
New Contributor
Posts: 4

Using Procedures in a PROC GA Optimization Problem

Dear Sir or Madam, I have read the documentation of the GA Procedure and it seems a powerful tool for optimization problems. I'm currently working on an optimization problem whose one of the objetives is to maximize the spearman correlation between a set of two variables. I know that SAS has specific procedures to calculate the correlation between variables, so I would like to know if there is a way to include these procedures inside the Objective Function Definition inside a GA procedure? Thanks in advance. Best Regards, Davi Laraia
SAS Employee
Posts: 340

Re: Using Procedures in a PROC GA Optimization Problem

It is possible to call a SAS proc (e.g.: proc corr) from a function defined in proc ga using the dusubl() function.

First you will need to create the input data source of proc corr, then call procc corr using dosubl(), then read the results from the created dataset (open(), read(),... functions).

If this is realy just calculating correlation and data is already in variables of proc ga, I would write the calculation myself.

New Contributor
Posts: 4

Re: Using Procedures in a PROC GA Optimization Problem

Dear gergely_batho, First of all, thank you for your quick response. I was looking for a way to use proc corr because it is already optimized and all the details (sorting, ranking and treatment of ties) are already implemented. It´s a good idea to write the calculation myself and I'm considering it, but that would require in my case a validation of this procedure by a third party extending significantly the time of this project. I've never worked with the dusubl() function, so I'll give it a try. Thank you! Best Regards, Davi Laraia
Ask a Question
Discussion stats
  • 2 replies
  • 313 views
  • 1 like
  • 2 in conversation