Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- How to find the value of two independent variables...

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-05-2017 08:33 PM

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Terrencefung

02-05-2017 09:21 PM

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.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Shmuel

02-05-2017 11:23 PM - edited 02-05-2017 11:40 PM

Hi Shmuel,

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

The sample data as follow:

Global Company | em | Estimated Probability |

Key | ||

1173 | 1 | 0.01095 |

1173 | 1 | 0.00952 |

1286 | 1 | 0.00804 |

3362 | 1 | 0.0161 |

3734 | 0 | 0.00812 |

3839 | 1 | 0.0123 |

3946 | 1 | 0.01109 |

4060 | 0 | 0.00972 |

4060 | 1 | 0.01077 |

4372 | 1 | 0.00967 |

4601 | 1 | 0.00978 |

4601 | 0 | 0.00981 |

4622 | 1 | 0.00922 |

4769 | 1 | 0.01033 |

5047 | 1 | 0.01023 |

5399 | 1 | 0.00945 |

6136 | 1 | 0.01154 |

6136 | 1 | 0.00984 |

6882 | 1 | 0.00917 |

7652 | 1 | 0.00949 |

7652 | 0 | 0.00958 |

7991 | 1 | 0.01051 |

8092 | 1 | 0.01075 |

8972 | 0 | 0.01 |

9538 | 1 | 0.01213 |

10026 | 1 | 0.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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Terrencefung

02-05-2017 11:31 PM

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

Do you have a licence for SAS/OR?

PG

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PGStats

02-05-2017 11:38 PM - edited 02-05-2017 11:44 PM

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.