Does anyone have experience with a SAS optimizer to support fitting of complex, multi-stage (several data steps and procs), non-linear function fitting? This would presumably be written in macro language. I'm on SAS 9.4.
Does anyone have experience with a SAS optimizer to support fitting of complex, multi-stage (several data steps and procs), non-linear function fitting? This would presumably be written in macro language. I'm on SAS 9.4.
@Joe_GM wrote:
Does anyone have experience with a SAS optimizer to support fitting of complex, multi-stage (several data steps and procs), non-linear function fitting? This would presumably be written in macro language. I'm on SAS 9.4.
When you say "a SAS optimizer", do you have a particular optimizer in mind, or particular optimization function in mind?
I am looking to adjust a set of input parameters to fit a set of outputs to closely match required values. I would expect this to be achieved by minimising e.g. a sum of squared differences. I would be looking to use this for a variety of different 'models'.
@Joe_GM wrote:
I am looking to adjust a set of input parameters to fit a set of outputs to closely match required values. I would expect this to be achieved by minimising e.g. a sum of squared differences. I would be looking to use this for a variety of different 'models'.
There are many procedures in SAS that minimize the sum of squared differences. Why do you need to build your own?
All the examples that I've seen express the model within a single procedure. My models involve several DATA and PROC steps. Can any of the SAS optimizers handle such a model?
Please be specific about what you are doing.
The input parameters are part of a correlation matrix which is fed into PROC COPULA:
proc copula;
var randomfactor1 randomfactor2 randomfactor3 randomfactor4;
define cop normal (corr = correlmatrix);
simulate cop / ndraws = %eval(&numsims.*&numtimesteps.)
seed = &seed.
outuniform = simcopula
plots = (datatype=original);
run;
The output simulations are merged with a set of rates, using the random factors to calculate sets of rates over the numtimesteps
for each of the numsims
.
After several data steps and another merge an output correlation is calculated:
proc corr data=rates_forcorr out=rates_corr_mtx;
var infYield&termyears. infYield1 realYield&termyears. realYield1;
run;
These output correlations are required to match desired values.
Well, at the start you asked if anyone has experience with this, and I have to admit I don't have experience with this type of analysis.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.