BookmarkSubscribeRSS Feed
Terrencefung
Calcite | Level 5

Hi SAS community members,

 

I am trying to find out the values of two independent variables that make the value of dependent variable is minimum.

 

For example, here is my equation: EC= q1(x1)c1+q2(x2)c2

 

what i want to do is find out the values of x1 and x2 that make EC is the minimum.

 

Could anyone please help me for this .

 

Many thanks for your help.

 

Regards,

Terrence

4 REPLIES 4
Shmuel
Garnet | Level 18

1) please post a smaple of your data for test.

2) how many observationsare in your dataset ?

3) have you tried to create a sas code ? If yes - post it.

Terrencefung
Calcite | Level 5

Hi Shmuel,

 

Thank you very much for your prompt response. Some variables of the equation are known,

 

The sample data as follow:

 

 

Global CompanyemEstimated Probability
Key
 
 
117310.01095
117310.00952
128610.00804
336210.0161
373400.00812
383910.0123
394610.01109
406000.00972
406010.01077
437210.00967
460110.00978
460100.00981
462210.00922
476910.01033
504710.01023
539910.00945
613610.01154
613610.00984
688210.00917
765210.00949
765200.00958
799110.01051
809210.01075
897200.01
953810.01213
1002610.00946

 

em=1means the observations is a manipulator, 0 otherwise,  Estimated Probability is the estmated probabilty calculated by a Logit model.

 

 I need to find a cut-off value for Estimated Probability that make EC has the minimum value

EC= q1(x1)c1+q2(x2)c2

where q1=0.01, c1=1 , q2=0.99, c2=20

x1 is the observed Type I error, x2 is the observed the Type II error.

 

I have 10,000 observations.

 

Thank you again for your reply.

 

Kind regards,

Terrence 

PGStats
Opal | Level 21

Are q1 and q2 continuous functions? If so, can you find their derivative?

 

Do you have a licence for SAS/OR?

PG
Terrencefung
Calcite | Level 5

Hi PG STATS,

 

Thank you for your reply.

q1 and q2 are assumed probabilities, and not continuous. For example, here i assume the assuemd probabilty for manipulator q1=0.01 (1%), and the assumend probabilty for non-manipulator is q2=0.99 (99%).

 

Yes, I have the licence for SAS/OR.

 

Thank you for your help.

 

 

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!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 828 views
  • 0 likes
  • 3 in conversation