BookmarkSubscribeRSS Feed
Dragon1
Calcite | Level 5

I would like to optimize the performance of the production processes with multiple objectives.  Have anyone had experience in developing desirability function in SAS?  Thanks.

8 REPLIES 8
PaigeMiller
Diamond | Level 26

You mean like the one in the JMP Prediction Profiler?

Yes, I developed such a thing in SAS a long time ago, and it now belongs to the company I worked for at that time, so I can't share it with you (I can't even use it myself). But in PROC IML, you would create a desirability function, and then use one of the Non-Linear Optimization functions in PROC IML to find the maximum desirability.

But honestly, if you have a copy of JMP, you'd be wise just to export your data to JMP, fit the model there and use the built-in optimization tools there. It's sooo much easier, and a very nice user interface.

--
Paige Miller
Ksharp
Super User

You'd better take a look at IML . In its documentation , there is indeed a REG function writing by IML . More efficient is using IML's function SOLVE().

Post it at  IML  forum . Rick might give you some better idea.

Xia Keshan

PaigeMiller
Diamond | Level 26

Not sure what you mean by "a REG function writing by IML"

SOLVE() doesn't really apply here anyway, it applies to solving a system of linear equations; the desirability function that the OP mentioned is a non-linear function and we want to find a maximum.

--
Paige Miller
Ksharp
Super User

Well. I should clarify something . It is from documentation.


proc iml;
x = {1 1 1,
1 2 4,
1 3 9,
1 4 16,
1 5 25};
y = {1, 5, 9, 23, 36};
b = inv(x` * x) * x` * y;
print b;
yhat = x * b;
r = y-yhat;
print yhat r;
sse = ssq(r);
dfe = nrow(x)-ncol(x);
mse = sse/dfe;
print sse dfe mse;


start Regress; /* begin module */
xpxi = inv(x` * x); /* inverse of X'X */
beta = xpxi * (x` * y); /* parameter estimate */
yhat = x * beta; /* predicted values */
resid = y-yhat; /* residuals */
sse = ssq(resid); /* SSE */
n = nrow(x); /* sample size */
dfe = nrow(x)-ncol(x); /* error DF */
mse = sse/dfe; /* MSE */
cssy = ssq(y-sum(y)/n); /* corrected total SS */
rsquare = (cssy-sse)/cssy; /* RSQUARE */
results = sse || dfe || mse || rsquare;
print results[c={"SSE" "DFE" "MSE" "RSquare"}
L="Regression Results"];
stdb = sqrt(vecdiag(xpxi) * mse); /* std of estimates */
t = beta/stdb; /* parameter t tests */
prob = 1-probf(t#t,1,dfe); /* p-values */
paramest = beta || stdb || t || prob;
print paramest[c={"Estimate" "StdErr" "t" "Pr>|t|"}
L="Parameter Estimates" f=Best6.];
print y yhat resid;
finish Regress; /* end module */


PaigeMiller
Diamond | Level 26

I don't think this is what the original question asked for. The question wasn't about fitting a regression model, it was about maximizing a desirability function (which would have to use the fitted regression equation plus additional user-supplied desirabilities)

--
Paige Miller
Ksharp
Super User

Ha. IML have a couple of functions to do such optimization question . One of my favorite is GA .

Dragon1
Calcite | Level 5

Hi Paige,

Thank you for your help.  I have several questions.

(1) Do you still remember which non-linear optimization function you used in your project? 

(2) How much time did you spend in developing this desirability function feature roughly?

(3) Did you develop this under the SAS PROC IML environment or strictly under SAS/IML?

Thanks a lot!

PaigeMiller
Diamond | Level 26

1) Nelder-Mead

2) A lot (roughly)

3) PROC IML

--
Paige Miller

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1924 views
  • 4 likes
  • 3 in conversation