Date: Mon, 4 May 2009 23:25:25 +0800
Reply-To: Murphy Choy <goladin@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Murphy Choy <goladin@GMAIL.COM>
Subject: Re: Low probabilities estimates / Logistic Regression.
In-Reply-To: <55090ac00905040815yf08e053mc9c209b01a00012c@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"
Hi Ed,
I believe that the thing will be adjusted for. Not sure about the options
but if you check out the functions/keywords on proc logistic, you might find
something on prior probabilities adjustment.
--
Regards,
Murphy Choy
Certified Advanced Programmer for SAS V9
Certified Basic Programmer for SAS V9
DataShaping Certified SAS Professional
From: SAS User [mailto:sasusr@gmail.com]
Sent: Monday, May 04, 2009 11:15 PM
To: goladin@gmail.com; SAS-L@listserv.uga.edu
Subject: Re: Low probabilities estimates / Logistic Regression.
Yes,
You can use the outroc option... but I don't know if it's taking account the
sampling weights, as the estimated probabilities (because as I said they
are too slow)
Ed.
2009/5/4 Murphy Choy <goladin@gmail.com>
Hi Ed,
I believe proc logistic has a roc out function which allows you to plot the
ROC curve. There is also a tables function.
--
Regards,
Murphy Choy
Certified Advanced Programmer for SAS V9
Certified Basic Programmer for SAS V9
DataShaping Certified SAS Professional
From: SAS User [mailto:sasusr@gmail.com]
Sent: Monday, May 04, 2009 9:40 PM
To: goladin@gmail.com; SAS-L@listserv.uga.edu
Subject: Re: Low probabilities estimates / Logistic Regression.
Thanks for answering Murphy,
Target near to 1 (1-1,005) something like that (because I deleted some
outliers)
Non target weight is close to 5.
I made the logistic regression as I described.
Any better code to get the roc curve and estimated probabilities (with
oversampling?)
Maybe proc surveylogistic?
Thanks,
Ed.
2009/5/2 Murphy Choy <goladin@gmail.com>
Hi Ed,
I am not sure whether what you did is correct but below are some suggestions
for oversampling.
First, set the weight of your target as 1.
After which set the weight for the complement of target as P(Non
target)/P(Target), where the P refers to the proportion of the item in the
population.
Once the above is set up, you can use the logistic regression as below.
Below is an example of the above method applied.
Example Case:
2000 cases of target.
I will randomly select 2000 cases of non target.
Set weight of target as 1.
Set weight of non target as (0.96)/(0.4)=2.4
Do the logistic regression.
I am using an example from a SAS book called Credit Risk Scorecards.
--
Regards,
Murphy Choy
Certified Advanced Programmer for SAS V9
Certified Basic Programmer for SAS V9
DataShaping Certified SAS Professional
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of SAS
User
Sent: Saturday, May 02, 2009 9:04 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Low probabilities estimates / Logistic Regression.
Murphy:I'm using oversampling.
1/5 for a group of the target.
1/1 for the other group.
I used code like this:
proc logistic;
class [vars];
model [var]=[vars];
weight [var_weight];
run;
What am I doing wrong?
Ed.
2009/4/30 Murphy Choy <goladin@gmail.com>
Hi,
>
> Are you using oversampling?
>
> --
> Regards,
> Murphy Choy
>
> Certified Advanced Programmer for SAS V9
> Certified Basic Programmer for SAS V9
> DataShaping Certified SAS Professional
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of SAS
> User
> Sent: Friday, May 01, 2009 7:38 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Low probabilities estimates / Logistic Regression.
>
> Hello:
> I'm making a logistic regression (using proc logistic with weights) to
> model
> a very rare event and I'm obtaining as predictions very low probabilities
> of
> that event. Closer to 0 the most part of the observations the few with
> cases
> with highest probabilities for this case are observations with P(event)
> near
> 0,5.. Is that right?
> Thanks a lot,
> Ed.
>
>