|
Hello,
I am running a logistic regression model which saves the predicted probabilities for those who did and did not answer on the dependent. I would like to group the probabilities into 5 tiles based on those who were modelled. I would like to classify the non-responders into the same groups depending on their predicted probability score. I have tried RANK command but this doesn't quite work for my purpose. Many thanks in advance. ATB, Jignesh ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
In what way does RANK not work for you?
-----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of J Sutar Sent: Thursday, May 01, 2008 6:30 AM To: [hidden email] Subject: Grouping logistic probabilites Hello, I am running a logistic regression model which saves the predicted probabilities for those who did and did not answer on the dependent. I would like to group the probabilities into 5 tiles based on those who were modelled. I would like to classify the non-responders into the same groups depending on their predicted probability score. I have tried RANK command but this doesn't quite work for my purpose. Many thanks in advance. ATB, Jignesh ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
My current attempt is:
RANK VARIABLES= PRE_1 (A) BY DummyV1 /ntiles(5) INTO RANK1. where DummyV1 =1 if valid responses on DV DummyV1=0 if missing at DV I would like to group PRE_1 (the predicted probabilites) into 5 equal groups for where DummyV1=1 only. So the break down of these 5 groups will be based on the probability score. I would then like to classify those who belong to DummyV1=0 into the same definition of the 5 groups already created for DummyV1=1. Currently my syntax ranks both groups on DummyV1 into 5 equal sized groups individually. On 01/05/2008, ViAnn Beadle <[hidden email]> wrote: > > In what way does RANK not work for you? > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of J > Sutar > Sent: Thursday, May 01, 2008 6:30 AM > To: [hidden email] > Subject: Grouping logistic probabilites > > Hello, > > I am running a logistic regression model which saves the predicted > probabilities for those who did and did not answer on the dependent. > > I would like to group the probabilities into 5 tiles based on those who > were > modelled. I would like to classify the non-responders into the same groups > depending on their predicted probability score. > > I have tried RANK command but this doesn't quite work for my purpose. > > Many thanks in advance. > > ATB, > Jignesh > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Here is a little bit more information,
This is a similar example of what I require but this example involves manual intervention in the form of copying and pasting output tables from SPSS to excel to produce the IF statements below. I am hoping I can learn how to this more efficiently. USE ALL. COMPUTE filter_$=(DummyV1=1). VARIABLE LABEL filter_$ 'DummyV1=1 (FILTER)'. VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. FORMAT filter_$ (f1.0). FILTER BY filter_$. EXECUTE . FREQUENCIES VARIABLES=PRE_1 /NTILES= 10 /ORDER= ANALYSIS . IF (PRE_1 <=0.00164676643061749) RankGrp=1. IF (PRE_1 >0.00164676643061749 & PRE_1 <= 0.00412623256883683) RankGrp=2. IF (PRE_1 >0.00412623256883683 & PRE_1 <= 0.00733462954248551) RankGrp=3. IF (PRE_1 >0.00733462954248551 & PRE_1 <= 0.0109616626838707) RankGrp=4. IF (PRE_1 >0.0109616626838707 & PRE_1 <= 0.0156787765386074) RankGrp=5. IF (PRE_1 >0.0156787765386074 & PRE_1 <= 0.0230233936216253) RankGrp=6. IF (PRE_1 >0.0230233936216253 & PRE_1 <= 0.0345075335250341) RankGrp=7. IF (PRE_1 >0.0345075335250341 & PRE_1 <= 0.0572568186083756) RankGrp=8. IF (PRE_1 >0.0572568186083756 & PRE_1 <= 0.139969182373795) RankGrp=9. IF (PRE_1 >0.139969182373795) RankGrp=10. On 01/05/2008, J Sutar <[hidden email]> wrote: > > My current attempt is: > > RANK VARIABLES= PRE_1 (A) BY DummyV1 > /ntiles(5) INTO RANK1. > > > where DummyV1 =1 if valid responses on DV > DummyV1=0 if missing at DV > > I would like to group PRE_1 (the predicted probabilites) into 5 equal > groups for where DummyV1=1 only. So the break down of these 5 groups will be > based on the probability score. > > I would then like to classify those who belong to DummyV1=0 into the same > definition of the 5 groups already created for DummyV1=1. > > > > Currently my syntax ranks both groups on DummyV1 into 5 equal sized groups > individually. > > > On 01/05/2008, ViAnn Beadle <[hidden email]> wrote: > > > > In what way does RANK not work for you? > > > > -----Original Message----- > > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of > > J > > Sutar > > Sent: Thursday, May 01, 2008 6:30 AM > > To: [hidden email] > > Subject: Grouping logistic probabilites > > > > Hello, > > > > I am running a logistic regression model which saves the predicted > > probabilities for those who did and did not answer on the dependent. > > > > I would like to group the probabilities into 5 tiles based on those who > > were > > modelled. I would like to classify the non-responders into the same > > groups > > depending on their predicted probability score. > > > > I have tried RANK command but this doesn't quite work for my purpose. > > > > Many thanks in advance. > > > > ATB, > > Jignesh > > > > ===================== > > To manage your subscription to SPSSX-L, send a message to > > [hidden email] (not to SPSSX-L), with no body text except the > > command. To leave the list, send the command > > SIGNOFF SPSSX-L > > For a list of commands to manage subscriptions, send the command > > INFO REFCARD > > > > > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Hi,
I was wondering if anyone was able to help with the below please? Thanks Jignesh 2008/5/1 J Sutar <[hidden email]>: > Here is a little bit more information, > > This is a similar example of what I require but this example involves > manual intervention in the form of copying and pasting output tables from > SPSS to excel to produce the IF statements below. I am hoping I can learn > how to this more efficiently. > > > USE ALL. > COMPUTE filter_$=(DummyV1=1). > VARIABLE LABEL filter_$ 'DummyV1=1 (FILTER)'. > VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. > FORMAT filter_$ (f1.0). > FILTER BY filter_$. > EXECUTE . > > > FREQUENCIES > VARIABLES=PRE_1 > /NTILES= 10 > /ORDER= ANALYSIS . > > IF (PRE_1 <=0.00164676643061749) RankGrp=1. > IF (PRE_1 >0.00164676643061749 & PRE_1 <= 0.00412623256883683) RankGrp=2. > IF (PRE_1 >0.00412623256883683 & PRE_1 <= 0.00733462954248551) RankGrp=3. > IF (PRE_1 >0.00733462954248551 & PRE_1 <= 0.0109616626838707) RankGrp=4. > IF (PRE_1 >0.0109616626838707 & PRE_1 <= 0.0156787765386074) RankGrp=5. > IF (PRE_1 >0.0156787765386074 & PRE_1 <= 0.0230233936216253) RankGrp=6. > IF (PRE_1 >0.0230233936216253 & PRE_1 <= 0.0345075335250341) RankGrp=7. > IF (PRE_1 >0.0345075335250341 & PRE_1 <= 0.0572568186083756) RankGrp=8. > IF (PRE_1 >0.0572568186083756 & PRE_1 <= 0.139969182373795) RankGrp=9. > IF (PRE_1 >0.139969182373795) RankGrp=10. > > > > On 01/05/2008, J Sutar <[hidden email]> wrote: > > > > My current attempt is: > > > > RANK VARIABLES= PRE_1 (A) BY DummyV1 > > /ntiles(5) INTO RANK1. > > > > > > where DummyV1 =1 if valid responses on DV > > DummyV1=0 if missing at DV > > > > I would like to group PRE_1 (the predicted probabilites) into 5 equal > > groups for where DummyV1=1 only. So the break down of these 5 groups will be > > based on the probability score. > > > > I would then like to classify those who belong to DummyV1=0 into the > > same definition of the 5 groups already created for DummyV1=1. > > > > > > > > Currently my syntax ranks both groups on DummyV1 into 5 equal sized > > groups individually. > > > > > > On 01/05/2008, ViAnn Beadle <[hidden email]> wrote: > > > > > > In what way does RANK not work for you? > > > > > > -----Original Message----- > > > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf > > > Of J > > > Sutar > > > Sent: Thursday, May 01, 2008 6:30 AM > > > To: [hidden email] > > > Subject: Grouping logistic probabilites > > > > > > Hello, > > > > > > I am running a logistic regression model which saves the predicted > > > probabilities for those who did and did not answer on the dependent. > > > > > > I would like to group the probabilities into 5 tiles based on those > > > who were > > > modelled. I would like to classify the non-responders into the same > > > groups > > > depending on their predicted probability score. > > > > > > I have tried RANK command but this doesn't quite work for my purpose. > > > > > > Many thanks in advance. > > > > > > ATB, > > > Jignesh > > > > > > ===================== > > > To manage your subscription to SPSSX-L, send a message to > > > [hidden email] (not to SPSSX-L), with no body text except > > > the > > > command. To leave the list, send the command > > > SIGNOFF SPSSX-L > > > For a list of commands to manage subscriptions, send the command > > > INFO REFCARD > > > > > > > > > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Hi,
I'm not sure if you want quintiles or deciles. It seems that you were very close to the solution already. The following code is untested: compute myfilter = (dummyv1=1). filter by myfilter. rank variables pre_1 /ntiles (10) into pre_1_decile /ntiles (5) into pre_1_quintile. filter off. Cheers!! Albert-Jan --- J Sutar <[hidden email]> wrote: > Hi, > > I was wondering if anyone was able to help with the > below please? > > Thanks > Jignesh > > 2008/5/1 J Sutar <[hidden email]>: > > > Here is a little bit more information, > > > > This is a similar example of what I require but > this example involves > > manual intervention in the form of copying and > pasting output tables from > > SPSS to excel to produce the IF statements below. > I am hoping I can learn > > how to this more efficiently. > > > > > > USE ALL. > > COMPUTE filter_$=(DummyV1=1). > > VARIABLE LABEL filter_$ 'DummyV1=1 (FILTER)'. > > VALUE LABELS filter_$ 0 'Not Selected' 1 > 'Selected'. > > FORMAT filter_$ (f1.0). > > FILTER BY filter_$. > > EXECUTE . > > > > > > FREQUENCIES > > VARIABLES=PRE_1 > > /NTILES= 10 > > /ORDER= ANALYSIS . > > > > IF (PRE_1 <=0.00164676643061749) RankGrp=1. > > IF (PRE_1 >0.00164676643061749 & PRE_1 <= > 0.00412623256883683) RankGrp=2. > > IF (PRE_1 >0.00412623256883683 & PRE_1 <= > 0.00733462954248551) RankGrp=3. > > IF (PRE_1 >0.00733462954248551 & PRE_1 <= > 0.0109616626838707) RankGrp=4. > > IF (PRE_1 >0.0109616626838707 & PRE_1 <= > 0.0156787765386074) RankGrp=5. > > IF (PRE_1 >0.0156787765386074 & PRE_1 <= > 0.0230233936216253) RankGrp=6. > > IF (PRE_1 >0.0230233936216253 & PRE_1 <= > 0.0345075335250341) RankGrp=7. > > IF (PRE_1 >0.0345075335250341 & PRE_1 <= > 0.0572568186083756) RankGrp=8. > > IF (PRE_1 >0.0572568186083756 & PRE_1 <= > 0.139969182373795) RankGrp=9. > > IF (PRE_1 >0.139969182373795) RankGrp=10. > > > > > > > > On 01/05/2008, J Sutar <[hidden email]> wrote: > > > > > > My current attempt is: > > > > > > RANK VARIABLES= PRE_1 (A) BY DummyV1 > > > /ntiles(5) INTO RANK1. > > > > > > > > > where DummyV1 =1 if valid responses on DV > > > DummyV1=0 if missing at DV > > > > > > I would like to group PRE_1 (the predicted > probabilites) into 5 equal > > > groups for where DummyV1=1 only. So the break > down of these 5 groups will be > > > based on the probability score. > > > > > > I would then like to classify those who belong > to DummyV1=0 into the > > > same definition of the 5 groups already created > for DummyV1=1. > > > > > > > > > > > > Currently my syntax ranks both groups on DummyV1 > into 5 equal sized > > > groups individually. > > > > > > > > > On 01/05/2008, ViAnn Beadle <[hidden email]> > wrote: > > > > > > > > In what way does RANK not work for you? > > > > > > > > -----Original Message----- > > > > From: SPSSX(r) Discussion > [mailto:[hidden email]] On Behalf > > > > Of J > > > > Sutar > > > > Sent: Thursday, May 01, 2008 6:30 AM > > > > To: [hidden email] > > > > Subject: Grouping logistic probabilites > > > > > > > > Hello, > > > > > > > > I am running a logistic regression model which > saves the predicted > > > > probabilities for those who did and did not > answer on the dependent. > > > > > > > > I would like to group the probabilities into 5 > tiles based on those > > > > who were > > > > modelled. I would like to classify the > non-responders into the same > > > > groups > > > > depending on their predicted probability > score. > > > > > > > > I have tried RANK command but this doesn't > quite work for my purpose. > > > > > > > > Many thanks in advance. > > > > > > > > ATB, > > > > Jignesh > > > > > > > > ===================== > > > > To manage your subscription to SPSSX-L, send a > message to > > > > [hidden email] (not to SPSSX-L), > with no body text except > > > > the > > > > command. To leave the list, send the command > > > > SIGNOFF SPSSX-L > > > > For a list of commands to manage > subscriptions, send the command > > > > INFO REFCARD > > > > > > > > > > > > > > > ===================== > To manage your subscription to SPSSX-L, send a > message to > [hidden email] (not to SPSSX-L), with no > body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send > the command > INFO REFCARD > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Hi,
Yes almost, the syntax you provided me does the same as I have so far. Which is to break for dummyv1=1 into deciles. A further step i would like to compute is to break for dummyv1=0 into 'deciles' (unequal sized) also, defined by the cutpoints of dummyv1=1. Does that makes sense? Is this doable? Jignesh On 03/05/2008, Albert-jan Roskam <[hidden email]> wrote: > > Hi, > > I'm not sure if you want quintiles or deciles. It > seems that you were very close to the solution > already. The following code is untested: > > compute myfilter = (dummyv1=1). > filter by myfilter. > rank variables pre_1 > /ntiles (10) into pre_1_decile > /ntiles (5) into pre_1_quintile. > filter off. > > Cheers!! > Albert-Jan > > --- J Sutar <[hidden email]> wrote: > > > Hi, > > > > I was wondering if anyone was able to help with the > > below please? > > > > Thanks > > Jignesh > > > > 2008/5/1 J Sutar <[hidden email]>: > > > > > Here is a little bit more information, > > > > > > This is a similar example of what I require but > > this example involves > > > manual intervention in the form of copying and > > pasting output tables from > > > SPSS to excel to produce the IF statements below. > > I am hoping I can learn > > > how to this more efficiently. > > > > > > > > > USE ALL. > > > COMPUTE filter_$=(DummyV1=1). > > > VARIABLE LABEL filter_$ 'DummyV1=1 (FILTER)'. > > > VALUE LABELS filter_$ 0 'Not Selected' 1 > > 'Selected'. > > > FORMAT filter_$ (f1.0). > > > FILTER BY filter_$. > > > EXECUTE . > > > > > > > > > FREQUENCIES > > > VARIABLES=PRE_1 > > > /NTILES= 10 > > > /ORDER= ANALYSIS . > > > > > > IF (PRE_1 <=0.00164676643061749) RankGrp=1. > > > IF (PRE_1 >0.00164676643061749 & PRE_1 <= > > 0.00412623256883683) RankGrp=2. > > > IF (PRE_1 >0.00412623256883683 & PRE_1 <= > > 0.00733462954248551) RankGrp=3. > > > IF (PRE_1 >0.00733462954248551 & PRE_1 <= > > 0.0109616626838707) RankGrp=4. > > > IF (PRE_1 >0.0109616626838707 & PRE_1 <= > > 0.0156787765386074) RankGrp=5. > > > IF (PRE_1 >0.0156787765386074 & PRE_1 <= > > 0.0230233936216253) RankGrp=6. > > > IF (PRE_1 >0.0230233936216253 & PRE_1 <= > > 0.0345075335250341) RankGrp=7. > > > IF (PRE_1 >0.0345075335250341 & PRE_1 <= > > 0.0572568186083756) RankGrp=8. > > > IF (PRE_1 >0.0572568186083756 & PRE_1 <= > > 0.139969182373795) RankGrp=9. > > > IF (PRE_1 >0.139969182373795) RankGrp=10. > > > > > > > > > > > > On 01/05/2008, J Sutar <[hidden email]> wrote: > > > > > > > > My current attempt is: > > > > > > > > RANK VARIABLES= PRE_1 (A) BY DummyV1 > > > > /ntiles(5) INTO RANK1. > > > > > > > > > > > > where DummyV1 =1 if valid responses on DV > > > > DummyV1=0 if missing at DV > > > > > > > > I would like to group PRE_1 (the predicted > > probabilites) into 5 equal > > > > groups for where DummyV1=1 only. So the break > > down of these 5 groups will be > > > > based on the probability score. > > > > > > > > I would then like to classify those who belong > > to DummyV1=0 into the > > > > same definition of the 5 groups already created > > for DummyV1=1. > > > > > > > > > > > > > > > > Currently my syntax ranks both groups on DummyV1 > > into 5 equal sized > > > > groups individually. > > > > > > > > > > > > On 01/05/2008, ViAnn Beadle <[hidden email]> > > wrote: > > > > > > > > > > In what way does RANK not work for you? > > > > > > > > > > -----Original Message----- > > > > > From: SPSSX(r) Discussion > > [mailto:[hidden email]] On Behalf > > > > > Of J > > > > > Sutar > > > > > Sent: Thursday, May 01, 2008 6:30 AM > > > > > To: [hidden email] > > > > > Subject: Grouping logistic probabilites > > > > > > > > > > Hello, > > > > > > > > > > I am running a logistic regression model which > > saves the predicted > > > > > probabilities for those who did and did not > > answer on the dependent. > > > > > > > > > > I would like to group the probabilities into 5 > > tiles based on those > > > > > who were > > > > > modelled. I would like to classify the > > non-responders into the same > > > > > groups > > > > > depending on their predicted probability > > score. > > > > > > > > > > I have tried RANK command but this doesn't > > quite work for my purpose. > > > > > > > > > > Many thanks in advance. > > > > > > > > > > ATB, > > > > > Jignesh > > > > > > > > > > ===================== > > > > > To manage your subscription to SPSSX-L, send a > > message to > > > > > [hidden email] (not to SPSSX-L), > > with no body text except > > > > > the > > > > > command. To leave the list, send the command > > > > > SIGNOFF SPSSX-L > > > > > For a list of commands to manage > > subscriptions, send the command > > > > > INFO REFCARD > > > > > > > > > > > > > > > > > > > > > ===================== > > To manage your subscription to SPSSX-L, send a > > message to > > [hidden email] (not to SPSSX-L), with no > > body text except the > > command. To leave the list, send the command > > SIGNOFF SPSSX-L > > For a list of commands to manage subscriptions, send > > the command > > INFO REFCARD > > > > > > > ____________________________________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
| Free forum by Nabble | Edit this page |
