How can I return the input and output slacks using the DEA example from the SAS/OR(R) 12.1 User's Guide?
Here is a link: https://support.sas.com/documentation/cdl/en/ormpex/65555/HTML/default/viewer.htm#ormpex_ex22_sect00...
Thanks.
If I understand correctly, the following changes should do what you want:
num input_slack {GARAGES, INPUTS};
num output_slack {GARAGES, OUTPUTS};
do k = GARAGES;
solve;
efficiency_number[k] = 1 / Inefficiency.sol;
for {j in GARAGES}
weight_sol[k,j] = (if Weight[j].sol > 1e-6 then Weight[j].sol else .);
for {i in INPUTS}
input_slack[k,i] = round(Input_con[i].ub - Input_con[i].body, 1e-6);
for {i in OUTPUTS}
output_slack[k,i] = round(Output_con[i].body - Output_con[i].lb, 1e-6);
end;
set EFFICIENT_GARAGES = {j in GARAGES: efficiency_number[j] >= 1 - 1e-6};
set INEFFICIENT_GARAGES = GARAGES diff EFFICIENT_GARAGES;
create data slack_data from [garage]=INEFFICIENT_GARAGES garage_name efficiency_number
{i in INPUTS} <col(i)=input_slack[garage,i]>
{i in OUTPUTS} <col(i)=output_slack[garage,i]>;
By slacks, do you mean the differences between the two sides of the inequalities?
input[i,k] - sum {j in GARAGES} input[i,j] * Weight[j]
sum {j in GARAGES} output[i,j] * Weight[j] - output[i,k] * Inefficiency
And do you want to print the values or save them to a data set?
By slacks, I'm trying to get specific potential input and output variable improvements for the inefficient garages. My understanding is the slacks show the further increases in output or reduction in input that could be gained beyond that from the radial projection (equal increase in all outputs, or decrease in all inputs) or a radial efficiency score equal to 1. I'd like to save it to a data set.
I hope this helps. Thanks for your time.
If I understand correctly, the following changes should do what you want:
num input_slack {GARAGES, INPUTS};
num output_slack {GARAGES, OUTPUTS};
do k = GARAGES;
solve;
efficiency_number[k] = 1 / Inefficiency.sol;
for {j in GARAGES}
weight_sol[k,j] = (if Weight[j].sol > 1e-6 then Weight[j].sol else .);
for {i in INPUTS}
input_slack[k,i] = round(Input_con[i].ub - Input_con[i].body, 1e-6);
for {i in OUTPUTS}
output_slack[k,i] = round(Output_con[i].body - Output_con[i].lb, 1e-6);
end;
set EFFICIENT_GARAGES = {j in GARAGES: efficiency_number[j] >= 1 - 1e-6};
set INEFFICIENT_GARAGES = GARAGES diff EFFICIENT_GARAGES;
create data slack_data from [garage]=INEFFICIENT_GARAGES garage_name efficiency_number
{i in INPUTS} <col(i)=input_slack[garage,i]>
{i in OUTPUTS} <col(i)=output_slack[garage,i]>;
That is exactly what I was after. Thank you so much for your time and the fast response!
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.