|
I have a data file that holds contribution information for donors.
After the ID variable, there are 26 additional variables in the file, only two of which I'm interested in for now: GFTAMT (gift amount) and GFTDAT (gift date). An ID is listed for (matched to) each gift on file (some of the IDs have a couple hundred gifts over the years, which means a couple hundred instances of the ID in the ID field). Thing is, I only want this information for each ID going back the last 20 years. So, for each ID I want only the GFTAMT and GFTDAT hits for any gift made since, say, 1987/01/01. Thanks for any thoughts you might have. Mark ====================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 |
|
At 05:50 PM 11/13/2007, Mark Palmberg wrote:
>After [an] ID variable, only two [other variables]: GFTAMT (gift >amount) and GFTDAT (gift date). An ID is listed for (matched to) >each gift on file (some of the IDs have a couple hundred gifts over >the years, which means a couple hundred instances of the ID in the ID field). > >Thing is, I only want this information for each ID going back the >last 20 years. So, for each ID I want only the GFTAMT and GFTDAT >hits for any gift made since, say, 1987/01/01. So far, this doesn't look like a CASESTOVARS problem. As described, it looks like DELETE VARIABLES <all but those three>. SELECT IF GFTDAT GE DATE.MDY(01,01,1987). Now, you could then run CASESTOVARS to get all gifts for one ID into one record (though I wouldn't recommend it). It looks like I'm missing something. Can you say what? ===================== 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 |
|
Does SPSS have tools for Rasch measurement? If so, where might I find them?
Thanks, Bob Robert M. Schacht, Ph.D. <[hidden email]> Pacific Basin Rehabilitation Research & Training Center 1268 Young Street, Suite #204 Research Center, University of Hawaii Honolulu, HI 96814 ===================== 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 reply to this post by Richard Ristow
<commentary>
IMHO, the unit of analysis generally depends on the hypothesis you are testing. If you want to say something about individual gifts, then you generally want your unit of analysis to be a gift. If you want to say something about givers, then you generally want your unit of analysis to be a giver. I suspect that Richard recommends that the unit of analysis be a gift--one case per gift--because it is very easy to aggregate up to givers using something like AGGREGATE. For example, does the level of giving differ by the age of the giver? This can be tested by aggregating the sum of gifts by giver (assuming, of course, that you have the age of the giver). If you are just interested in descriptive reports, the best strategy to have data at the lowest level of analysis and then specify higher levels (such as a person id) as a grouping variable. All of the reporting procedures (TABLES, SUMMARIZE, CTABLES) has the concept of group so its very easy to "aggregate" to a higher unit of analysis. </commentary> The important thing to remember is that you may have to save your data as different units of analysis depending upon the relationships you are looking at--you are not stuck with a particular initial data organization. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Richard Ristow Sent: Tuesday, November 13, 2007 4:42 PM To: [hidden email] Subject: Re: CASESTOVARS with a VARS limit At 05:50 PM 11/13/2007, Mark Palmberg wrote: >After [an] ID variable, only two [other variables]: GFTAMT (gift >amount) and GFTDAT (gift date). An ID is listed for (matched to) >each gift on file (some of the IDs have a couple hundred gifts over >the years, which means a couple hundred instances of the ID in the ID field). > >Thing is, I only want this information for each ID going back the >last 20 years. So, for each ID I want only the GFTAMT and GFTDAT >hits for any gift made since, say, 1987/01/01. So far, this doesn't look like a CASESTOVARS problem. As described, it looks like DELETE VARIABLES <all but those three>. SELECT IF GFTDAT GE DATE.MDY(01,01,1987). Now, you could then run CASESTOVARS to get all gifts for one ID into one record (though I wouldn't recommend it). It looks like I'm missing something. Can you say what? ===================== 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 |
|
In reply to this post by Richard Ristow
Yes, this looks like it would work, Richard, and thanks for applying your perspective to the matter. I'd like to end up with a means of looking at this information as part of an RFM analysis which would then link to another main table by ID, so I guess what I'm struggling with is finding a method of looking at an individual's giving patterns over the last 20 years using the data as I have it.
Thanks again. Mark -----Original Message----- From: Richard Ristow [mailto:[hidden email]] Sent: Tue 11/13/2007 5:42 PM To: Mark Palmberg; [hidden email] Subject: Re: CASESTOVARS with a VARS limit At 05:50 PM 11/13/2007, Mark Palmberg wrote: >After [an] ID variable, only two [other variables]: GFTAMT (gift >amount) and GFTDAT (gift date). An ID is listed for (matched to) >each gift on file (some of the IDs have a couple hundred gifts over >the years, which means a couple hundred instances of the ID in the ID field). > >Thing is, I only want this information for each ID going back the >last 20 years. So, for each ID I want only the GFTAMT and GFTDAT >hits for any gift made since, say, 1987/01/01. So far, this doesn't look like a CASESTOVARS problem. As described, it looks like DELETE VARIABLES <all but those three>. SELECT IF GFTDAT GE DATE.MDY(01,01,1987). Now, you could then run CASESTOVARS to get all gifts for one ID into one record (though I wouldn't recommend it). It looks like I'm missing something. Can you say what? ===================== 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 reply to this post by Bob Schacht-3
Bob,
SPSS does not have the capacity to analyze one-parameter IRT models, of which Rasch models are a special case. If you wanted to take the approach that a 1-parameter IRT model is a special case of multi-level logistic regression model (items within persons), then you might be able to crib something together using the relatively new GEE procedure -- I've never tried it, but at one time I experimented with running 1PL models using generalized linear models in HLM, and it worked ok. But specialty tools like BILOG are much easier to use, and if you're an academic user you can do short-term software rentals through e-academy.com. Dan R. Bob Schacht wrote: > Does SPSS have tools for Rasch measurement? If so, where might I find > them? > > Thanks, > Bob > > Robert M. Schacht, Ph.D. <[hidden email]> > Pacific Basin Rehabilitation Research & Training Center > 1268 Young Street, Suite #204 > Research Center, University of Hawaii > Honolulu, HI 96814 > > ===================== > 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 > -- Daniel Robertson Senior Research and Planning Associate Institutional Research and Planning Cornell University, Ithaca NY 14853-2801 607.255.9642 / irp.cornell.edu ===================== 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 reply to this post by Mark Palmberg-2
The simple RFM analysis requires the unit of analysis be a giver and not a
gift so you can aggregate the sum of gifts by user, get the max of date for the most recent date, and get the number within aggregate. Then use the Rank procedure to get your quintiles or whatever. WRT to looking at patterns, I think you want your record to be a giver containing pairs of variables for each gift (date and amount). You can get there via CASESTOVARS. You'll probably want to change the dates to offsets from the 1st date so that you can then compare givers. Once you have this, you can then find things like the mean number of gifts per user, mean number of days between gifts, etc. So, I think you're right to be thinking about using CASESTOVARS for parts of this analysis after you select out really old gifts. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Palmberg Sent: Wednesday, November 14, 2007 5:56 AM To: [hidden email] Subject: Re: CASESTOVARS with a VARS limit Yes, this looks like it would work, Richard, and thanks for applying your perspective to the matter. I'd like to end up with a means of looking at this information as part of an RFM analysis which would then link to another main table by ID, so I guess what I'm struggling with is finding a method of looking at an individual's giving patterns over the last 20 years using the data as I have it. Thanks again. Mark -----Original Message----- From: Richard Ristow [mailto:[hidden email]] Sent: Tue 11/13/2007 5:42 PM To: Mark Palmberg; [hidden email] Subject: Re: CASESTOVARS with a VARS limit At 05:50 PM 11/13/2007, Mark Palmberg wrote: >After [an] ID variable, only two [other variables]: GFTAMT (gift >amount) and GFTDAT (gift date). An ID is listed for (matched to) >each gift on file (some of the IDs have a couple hundred gifts over >the years, which means a couple hundred instances of the ID in the ID field). > >Thing is, I only want this information for each ID going back the >last 20 years. So, for each ID I want only the GFTAMT and GFTDAT >hits for any gift made since, say, 1987/01/01. So far, this doesn't look like a CASESTOVARS problem. As described, it looks like DELETE VARIABLES <all but those three>. SELECT IF GFTDAT GE DATE.MDY(01,01,1987). Now, you could then run CASESTOVARS to get all gifts for one ID into one record (though I wouldn't recommend it). It looks like I'm missing something. Can you say what? ===================== 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 |
|
>I think you want your record to be a giver containing pairs of
variables for each gift (date and amount). Yes. Right. CASESTOVARS seemed like the tool I needed, but I'm wondering if there's a flag I can set somewhere to limit the number of variables I end up with (since, again, I have one record with as many as 500 gifts). Actually, now that I think about it, I wonder if I can include some SQL in the query I use to pull my data file from the database that will limit the data before it even gets into my table. I'll look into that. As far as changing the dates to offsets from 1987/01/07, do you have a syntax suggestion for that? Would that resulting field contain the number of months (for example) elapsed since the start date? Seems like the Date and Time Wizard should be able to handle this.... Thanks, ViAnn. Mark -----Original Message----- From: ViAnn Beadle [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 9:15 AM To: Mark Palmberg; [hidden email] Subject: RE: CASESTOVARS with a VARS limit The simple RFM analysis requires the unit of analysis be a giver and not a gift so you can aggregate the sum of gifts by user, get the max of date for the most recent date, and get the number within aggregate. Then use the Rank procedure to get your quintiles or whatever. WRT to looking at patterns, I think you want your record to be a giver containing pairs of variables for each gift (date and amount). You can get there via CASESTOVARS. You'll probably want to change the dates to offsets from the 1st date so that you can then compare givers. Once you have this, you can then find things like the mean number of gifts per user, mean number of days between gifts, etc. So, I think you're right to be thinking about using CASESTOVARS for parts of this analysis after you select out really old gifts. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Palmberg Sent: Wednesday, November 14, 2007 5:56 AM To: [hidden email] Subject: Re: CASESTOVARS with a VARS limit Yes, this looks like it would work, Richard, and thanks for applying your perspective to the matter. I'd like to end up with a means of looking at this information as part of an RFM analysis which would then link to another main table by ID, so I guess what I'm struggling with is finding a method of looking at an individual's giving patterns over the last 20 years using the data as I have it. Thanks again. Mark -----Original Message----- From: Richard Ristow [mailto:[hidden email]] Sent: Tue 11/13/2007 5:42 PM To: Mark Palmberg; [hidden email] Subject: Re: CASESTOVARS with a VARS limit At 05:50 PM 11/13/2007, Mark Palmberg wrote: >After [an] ID variable, only two [other variables]: GFTAMT (gift >amount) and GFTDAT (gift date). An ID is listed for (matched to) each >gift on file (some of the IDs have a couple hundred gifts over the >years, which means a couple hundred instances of the ID in the ID field). > >Thing is, I only want this information for each ID going back the last >20 years. So, for each ID I want only the GFTAMT and GFTDAT hits for >any gift made since, say, 1987/01/01. So far, this doesn't look like a CASESTOVARS problem. As described, it looks like DELETE VARIABLES <all but those three>. SELECT IF GFTDAT GE DATE.MDY(01,01,1987). Now, you could then run CASESTOVARS to get all gifts for one ID into one record (though I wouldn't recommend it). It looks like I'm missing something. Can you say what? ===================== 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 |
|
You started this thread by saying you wanted to exclude really old gifts.
Use the syntax Richard provided before you do the CASESTOVARS. That will get rid of some of them. Are you afraid of running into a variable limitation here or just fear the pain of dealing with all those variables in syntax? The date time wizard will give you clues but you'll probably have to craft your own syntax from that pasted by it. It will probably generate a COMPUTE command using the datediff function within it. You can specify the granularity of the change from seconds to days to months to years. -----Original Message----- From: Mark Palmberg [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 9:26 AM To: ViAnn Beadle; [hidden email] Subject: RE: CASESTOVARS with a VARS limit >I think you want your record to be a giver containing pairs of variables for each gift (date and amount). Yes. Right. CASESTOVARS seemed like the tool I needed, but I'm wondering if there's a flag I can set somewhere to limit the number of variables I end up with (since, again, I have one record with as many as 500 gifts). Actually, now that I think about it, I wonder if I can include some SQL in the query I use to pull my data file from the database that will limit the data before it even gets into my table. I'll look into that. As far as changing the dates to offsets from 1987/01/07, do you have a syntax suggestion for that? Would that resulting field contain the number of months (for example) elapsed since the start date? Seems like the Date and Time Wizard should be able to handle this.... Thanks, ViAnn. Mark -----Original Message----- From: ViAnn Beadle [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 9:15 AM To: Mark Palmberg; [hidden email] Subject: RE: CASESTOVARS with a VARS limit The simple RFM analysis requires the unit of analysis be a giver and not a gift so you can aggregate the sum of gifts by user, get the max of date for the most recent date, and get the number within aggregate. Then use the Rank procedure to get your quintiles or whatever. WRT to looking at patterns, I think you want your record to be a giver containing pairs of variables for each gift (date and amount). You can get there via CASESTOVARS. You'll probably want to change the dates to offsets from the 1st date so that you can then compare givers. Once you have this, you can then find things like the mean number of gifts per user, mean number of days between gifts, etc. So, I think you're right to be thinking about using CASESTOVARS for parts of this analysis after you select out really old gifts. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Palmberg Sent: Wednesday, November 14, 2007 5:56 AM To: [hidden email] Subject: Re: CASESTOVARS with a VARS limit Yes, this looks like it would work, Richard, and thanks for applying your perspective to the matter. I'd like to end up with a means of looking at this information as part of an RFM analysis which would then link to another main table by ID, so I guess what I'm struggling with is finding a method of looking at an individual's giving patterns over the last 20 years using the data as I have it. Thanks again. Mark -----Original Message----- From: Richard Ristow [mailto:[hidden email]] Sent: Tue 11/13/2007 5:42 PM To: Mark Palmberg; [hidden email] Subject: Re: CASESTOVARS with a VARS limit At 05:50 PM 11/13/2007, Mark Palmberg wrote: >After [an] ID variable, only two [other variables]: GFTAMT (gift >amount) and GFTDAT (gift date). An ID is listed for (matched to) each >gift on file (some of the IDs have a couple hundred gifts over the >years, which means a couple hundred instances of the ID in the ID field). > >Thing is, I only want this information for each ID going back the last >20 years. So, for each ID I want only the GFTAMT and GFTDAT hits for >any gift made since, say, 1987/01/01. So far, this doesn't look like a CASESTOVARS problem. As described, it looks like DELETE VARIABLES <all but those three>. SELECT IF GFTDAT GE DATE.MDY(01,01,1987). Now, you could then run CASESTOVARS to get all gifts for one ID into one record (though I wouldn't recommend it). It looks like I'm missing something. Can you say what? ===================== 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 |
|
>Are you afraid of running into a variable limitation here or just fear
the pain of dealing with all those variables in syntax? Both! Also, for this stage in my analysis, a 20-year timeframe should be plenty long enough. There are additional variables in my underlying data source that I may want to incorporate at some point (GFTYP [type], GFTARA [area], etc.), so my total number of variables will scale up pretty quickly. Thanks again for your help, ViAnn. It's much appreciated. Mark -----Original Message----- From: ViAnn Beadle [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 10:31 AM To: Mark Palmberg; [hidden email] Subject: RE: CASESTOVARS with a VARS limit You started this thread by saying you wanted to exclude really old gifts. Use the syntax Richard provided before you do the CASESTOVARS. That will get rid of some of them. Are you afraid of running into a variable limitation here or just fear the pain of dealing with all those variables in syntax? The date time wizard will give you clues but you'll probably have to craft your own syntax from that pasted by it. It will probably generate a COMPUTE command using the datediff function within it. You can specify the granularity of the change from seconds to days to months to years. -----Original Message----- From: Mark Palmberg [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 9:26 AM To: ViAnn Beadle; [hidden email] Subject: RE: CASESTOVARS with a VARS limit >I think you want your record to be a giver containing pairs of variables for each gift (date and amount). Yes. Right. CASESTOVARS seemed like the tool I needed, but I'm wondering if there's a flag I can set somewhere to limit the number of variables I end up with (since, again, I have one record with as many as 500 gifts). Actually, now that I think about it, I wonder if I can include some SQL in the query I use to pull my data file from the database that will limit the data before it even gets into my table. I'll look into that. As far as changing the dates to offsets from 1987/01/07, do you have a syntax suggestion for that? Would that resulting field contain the number of months (for example) elapsed since the start date? Seems like the Date and Time Wizard should be able to handle this.... Thanks, ViAnn. Mark -----Original Message----- From: ViAnn Beadle [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 9:15 AM To: Mark Palmberg; [hidden email] Subject: RE: CASESTOVARS with a VARS limit The simple RFM analysis requires the unit of analysis be a giver and not a gift so you can aggregate the sum of gifts by user, get the max of date for the most recent date, and get the number within aggregate. Then use the Rank procedure to get your quintiles or whatever. WRT to looking at patterns, I think you want your record to be a giver containing pairs of variables for each gift (date and amount). You can get there via CASESTOVARS. You'll probably want to change the dates to offsets from the 1st date so that you can then compare givers. Once you have this, you can then find things like the mean number of gifts per user, mean number of days between gifts, etc. So, I think you're right to be thinking about using CASESTOVARS for parts of this analysis after you select out really old gifts. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Palmberg Sent: Wednesday, November 14, 2007 5:56 AM To: [hidden email] Subject: Re: CASESTOVARS with a VARS limit Yes, this looks like it would work, Richard, and thanks for applying your perspective to the matter. I'd like to end up with a means of looking at this information as part of an RFM analysis which would then link to another main table by ID, so I guess what I'm struggling with is finding a method of looking at an individual's giving patterns over the last 20 years using the data as I have it. Thanks again. Mark -----Original Message----- From: Richard Ristow [mailto:[hidden email]] Sent: Tue 11/13/2007 5:42 PM To: Mark Palmberg; [hidden email] Subject: Re: CASESTOVARS with a VARS limit At 05:50 PM 11/13/2007, Mark Palmberg wrote: >After [an] ID variable, only two [other variables]: GFTAMT (gift >amount) and GFTDAT (gift date). An ID is listed for (matched to) each >gift on file (some of the IDs have a couple hundred gifts over the >years, which means a couple hundred instances of the ID in the ID field). > >Thing is, I only want this information for each ID going back the last >20 years. So, for each ID I want only the GFTAMT and GFTDAT hits for >any gift made since, say, 1987/01/01. So far, this doesn't look like a CASESTOVARS problem. As described, it looks like DELETE VARIABLES <all but those three>. SELECT IF GFTDAT GE DATE.MDY(01,01,1987). Now, you could then run CASESTOVARS to get all gifts for one ID into one record (though I wouldn't recommend it). It looks like I'm missing something. Can you say what? ===================== 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 |
|
In reply to this post by ViAnn Beadle
At 10:14 AM 11/14/2007, ViAnn Beadle wrote:
>The simple RFM analysis requires the unit of analysis be a giver and >not a gift so you can aggregate the sum of gifts by user, get the >max of date for the most recent date, and get the number within >aggregate. Then use the Rank procedure to get your quintiles or whatever. That is how I would expect to go about it. (As for details, I'm little enough familiar with RFM analysis that I had to look up what it was.) >WRT to looking at patterns, I think you want your record to be a >giver containing pairs of variables for each gift (date and amount). >You can get there via CASESTOVARS. You'll probably want to change >the dates to offsets from the 1st date so that you can then compare >givers. Once you have this, you can then find things like the mean >number of gifts per user, mean number of days between gifts, etc. I'm not sure that'S what I'd expect to do. I'd think first of leaving data in 'long' form - one record per gift, many records per ID - and calculating such statistics across the groups of records, mostly with AGGREGATE. It would be quite easy to get, . Date and size of the most recent gift . Total number of gifts, and total amounts given, over various stretches of time: in the past year, the past five years, the five years before that, ... With a little ingenuity, you can get quite a set of such measures in a single AGGREGATE run. >So, I think you're right to be thinking about using CASESTOVARS for >parts of this analysis after you select out really old gifts. I'll be interested to see what techniques do turn out to serve you best. -Good luck, Richard ===================== 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 |
|
SPSS sells an add-on to Excel which computes all the RFM scores and does
some really nifty heatmap charts. This product is targeted to Excel database marketing users and not current SPSS users. It uses the SPSS engine in the background and relies upon aggregate to calculate the components with a row is a transaction and not a customer. -----Original Message----- From: Richard Ristow [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 10:04 AM To: Mark Palmberg; [hidden email] Cc: ViAnn Beadle Subject: Re: CASESTOVARS with a VARS limit At 10:14 AM 11/14/2007, ViAnn Beadle wrote: >The simple RFM analysis requires the unit of analysis be a giver and >not a gift so you can aggregate the sum of gifts by user, get the >max of date for the most recent date, and get the number within >aggregate. Then use the Rank procedure to get your quintiles or whatever. That is how I would expect to go about it. (As for details, I'm little enough familiar with RFM analysis that I had to look up what it was.) >WRT to looking at patterns, I think you want your record to be a >giver containing pairs of variables for each gift (date and amount). >You can get there via CASESTOVARS. You'll probably want to change >the dates to offsets from the 1st date so that you can then compare >givers. Once you have this, you can then find things like the mean >number of gifts per user, mean number of days between gifts, etc. I'm not sure that'S what I'd expect to do. I'd think first of leaving data in 'long' form - one record per gift, many records per ID - and calculating such statistics across the groups of records, mostly with AGGREGATE. It would be quite easy to get, . Date and size of the most recent gift . Total number of gifts, and total amounts given, over various stretches of time: in the past year, the past five years, the five years before that, ... With a little ingenuity, you can get quite a set of such measures in a single AGGREGATE run. >So, I think you're right to be thinking about using CASESTOVARS for >parts of this analysis after you select out really old gifts. I'll be interested to see what techniques do turn out to serve you best. -Good luck, Richard ===================== 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 reply to this post by Mark Palmberg-2
I don't think you'll run into variable limitations but you might suffer from
brain freeze ;-) Make sure your resulting date variables are in time order and variable order. Then you can use a loop across vectors to datediff your date variables. Something like the following which is completely untested calculates the interval between gifts (not the interval between the first and this gift): vector datevar= date1 to date4/datediffvar(3). loop #i=2 to 4. compute datediffvar(#i)=datediff(datevar(#i),datevar(#i-1),"days"). end loop. Note that you'll have to make sure that vector loops across the maximum number of date variables for a given case and you'll end up with lots of missing data for the less frequent givers. -----Original Message----- From: Mark Palmberg [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 9:43 AM To: ViAnn Beadle; [hidden email] Subject: RE: CASESTOVARS with a VARS limit >Are you afraid of running into a variable limitation here or just fear the pain of dealing with all those variables in syntax? Both! Also, for this stage in my analysis, a 20-year timeframe should be plenty long enough. There are additional variables in my underlying data source that I may want to incorporate at some point (GFTYP [type], GFTARA [area], etc.), so my total number of variables will scale up pretty quickly. Thanks again for your help, ViAnn. It's much appreciated. Mark -----Original Message----- From: ViAnn Beadle [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 10:31 AM To: Mark Palmberg; [hidden email] Subject: RE: CASESTOVARS with a VARS limit You started this thread by saying you wanted to exclude really old gifts. Use the syntax Richard provided before you do the CASESTOVARS. That will get rid of some of them. Are you afraid of running into a variable limitation here or just fear the pain of dealing with all those variables in syntax? The date time wizard will give you clues but you'll probably have to craft your own syntax from that pasted by it. It will probably generate a COMPUTE command using the datediff function within it. You can specify the granularity of the change from seconds to days to months to years. -----Original Message----- From: Mark Palmberg [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 9:26 AM To: ViAnn Beadle; [hidden email] Subject: RE: CASESTOVARS with a VARS limit >I think you want your record to be a giver containing pairs of variables for each gift (date and amount). Yes. Right. CASESTOVARS seemed like the tool I needed, but I'm wondering if there's a flag I can set somewhere to limit the number of variables I end up with (since, again, I have one record with as many as 500 gifts). Actually, now that I think about it, I wonder if I can include some SQL in the query I use to pull my data file from the database that will limit the data before it even gets into my table. I'll look into that. As far as changing the dates to offsets from 1987/01/07, do you have a syntax suggestion for that? Would that resulting field contain the number of months (for example) elapsed since the start date? Seems like the Date and Time Wizard should be able to handle this.... Thanks, ViAnn. Mark -----Original Message----- From: ViAnn Beadle [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 9:15 AM To: Mark Palmberg; [hidden email] Subject: RE: CASESTOVARS with a VARS limit The simple RFM analysis requires the unit of analysis be a giver and not a gift so you can aggregate the sum of gifts by user, get the max of date for the most recent date, and get the number within aggregate. Then use the Rank procedure to get your quintiles or whatever. WRT to looking at patterns, I think you want your record to be a giver containing pairs of variables for each gift (date and amount). You can get there via CASESTOVARS. You'll probably want to change the dates to offsets from the 1st date so that you can then compare givers. Once you have this, you can then find things like the mean number of gifts per user, mean number of days between gifts, etc. So, I think you're right to be thinking about using CASESTOVARS for parts of this analysis after you select out really old gifts. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Palmberg Sent: Wednesday, November 14, 2007 5:56 AM To: [hidden email] Subject: Re: CASESTOVARS with a VARS limit Yes, this looks like it would work, Richard, and thanks for applying your perspective to the matter. I'd like to end up with a means of looking at this information as part of an RFM analysis which would then link to another main table by ID, so I guess what I'm struggling with is finding a method of looking at an individual's giving patterns over the last 20 years using the data as I have it. Thanks again. Mark -----Original Message----- From: Richard Ristow [mailto:[hidden email]] Sent: Tue 11/13/2007 5:42 PM To: Mark Palmberg; [hidden email] Subject: Re: CASESTOVARS with a VARS limit At 05:50 PM 11/13/2007, Mark Palmberg wrote: >After [an] ID variable, only two [other variables]: GFTAMT (gift >amount) and GFTDAT (gift date). An ID is listed for (matched to) each >gift on file (some of the IDs have a couple hundred gifts over the >years, which means a couple hundred instances of the ID in the ID field). > >Thing is, I only want this information for each ID going back the last >20 years. So, for each ID I want only the GFTAMT and GFTDAT hits for >any gift made since, say, 1987/01/01. So far, this doesn't look like a CASESTOVARS problem. As described, it looks like DELETE VARIABLES <all but those three>. SELECT IF GFTDAT GE DATE.MDY(01,01,1987). Now, you could then run CASESTOVARS to get all gifts for one ID into one record (though I wouldn't recommend it). It looks like I'm missing something. Can you say what? ===================== 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 |
|
In reply to this post by ViAnn Beadle
You can read about this product (SPSS Advantage for Excel 2007) at
http://www.spss.com/advantage_excel/ and you can thank ViAnn for designing those cool heatmaps (and the other parts). -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of ViAnn Beadle Sent: Wednesday, November 14, 2007 10:13 AM To: [hidden email] Subject: Re: [SPSSX-L] CASESTOVARS with a VARS limit SPSS sells an add-on to Excel which computes all the RFM scores and does some really nifty heatmap charts. This product is targeted to Excel database marketing users and not current SPSS users. It uses the SPSS engine in the background and relies upon aggregate to calculate the components with a row is a transaction and not a customer. ===================== 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 reply to this post by ViAnn Beadle
It's called SPSS Advantage for Excel 2007:
http://www.spss.com/advantage_excel/ -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of ViAnn Beadle Sent: Wednesday, November 14, 2007 11:13 AM To: [hidden email] Subject: Re: CASESTOVARS with a VARS limit SPSS sells an add-on to Excel which computes all the RFM scores and does some really nifty heatmap charts. This product is targeted to Excel database marketing users and not current SPSS users. It uses the SPSS engine in the background and relies upon aggregate to calculate the components with a row is a transaction and not a customer. -----Original Message----- From: Richard Ristow [mailto:[hidden email]] Sent: Wednesday, November 14, 2007 10:04 AM To: Mark Palmberg; [hidden email] Cc: ViAnn Beadle Subject: Re: CASESTOVARS with a VARS limit At 10:14 AM 11/14/2007, ViAnn Beadle wrote: >The simple RFM analysis requires the unit of analysis be a giver and >not a gift so you can aggregate the sum of gifts by user, get the >max of date for the most recent date, and get the number within >aggregate. Then use the Rank procedure to get your quintiles or whatever. That is how I would expect to go about it. (As for details, I'm little enough familiar with RFM analysis that I had to look up what it was.) >WRT to looking at patterns, I think you want your record to be a >giver containing pairs of variables for each gift (date and amount). >You can get there via CASESTOVARS. You'll probably want to change >the dates to offsets from the 1st date so that you can then compare >givers. Once you have this, you can then find things like the mean >number of gifts per user, mean number of days between gifts, etc. I'm not sure that'S what I'd expect to do. I'd think first of leaving data in 'long' form - one record per gift, many records per ID - and calculating such statistics across the groups of records, mostly with AGGREGATE. It would be quite easy to get, . Date and size of the most recent gift . Total number of gifts, and total amounts given, over various stretches of time: in the past year, the past five years, the five years before that, ... With a little ingenuity, you can get quite a set of such measures in a single AGGREGATE run. >So, I think you're right to be thinking about using CASESTOVARS for >parts of this analysis after you select out really old gifts. I'll be interested to see what techniques do turn out to serve you best. -Good luck, Richard ===================== 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 |
|
In reply to this post by ViAnn Beadle
At 12:13 PM 11/14/2007, ViAnn Beadle wrote:
>I don't think you'll run into variable limitations but you might >suffer from brain freeze ;-) I won't post the FAQ about case and variable limits; but, no, you won't hit variable limitations. But your records, and your code, will get more complex. >Make sure your resulting date variables are in time order and >variable order. Then you can use a loop across vectors to datediff >your date variables. Something like the following which is >completely untested calculates the interval between gifts (not the >interval between the first and this gift): > >vector datevar= date1 to date4/datediffvar(3). >loop #i=2 to 4. >. compute datediffvar(#i)= > datediff(datevar(#i),datevar(#i-1),"days"). >end loop. Exactly. But as an illustration of styles, this is the equivalent, with the data in 'long' form. It's actually more lines (because of '#NewGuy', plus commenting and decoration); but, I think, simpler underlying logic. And it has no dependency on the actual or maximum number of gifts per ID. Not tested: * Flag the first record for an ID. . * (This can be done more simply by . * ADD VARIABLES/FILE=*/BY ID/FIRST=NewGuy. . * but that makes 'NewGuy' a regular variable, not a . * scratch variable, so you have to decide whether . * keep it or drop it from your final data. Of course,. * if the next step is AGGREGATE, odds-and-ends . * variables like that will disappear anyway.) . NUMERIC #NewGuy (F2) /* Flag first record for an ID */. DO IF MISSING(LAG(ID)) OR LAG(ID) NE ID. . COMPUTE #NewGuy = 1. ELSE. . COMPUTE #NewGuy = 0. END IF. * Difference in days between successive gifts . * (Requires data be sorted by ID and gift date.) . NUMERIC BtwnGift (F4). VAR LABEL BtwnGift 'Time, days, since previous gift'. IF NOT #NewGuy BtwnGift = datediff(GFTDAT,LAG(GFTDAT),"days"). .............. Going forward, at 11:43 AM 11/14/2007, Mark Palmberg wrote: >>There are additional variables in my underlying data source that I >>may want to incorporate at some point (GFTYP [type], GFTARA [area], >>etc.), so my total number of variables will scale up pretty quickly. Again, there are tastes and style. For me, the more variables there are per gift (or other instance, such as office visit), the more I'd try not to go to 'wide' organization. Ah, well. Go in peace, upon the path. -Happy analysis, Richard ===================== 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 reply to this post by ViAnn Beadle
I appreciate this commentary very much, ViAnn. Actually, the analysis
of these givers is being done as part of a larger modeling project to determine who and what our major donors are. I already have variables in another table for NUMGFT (number of gifts, lifetime), BIGGFT (largest single gift), AVGAMT (average gift size), EARLGDT (earliest gift date) and LASTGDT (last gift date), so I can do a fair amount of analysis using those variables. What I'm missing is a sense of any giving patterns over time, and whether those patterns are meaningful in identifying major donor behavior. In short, I'd like to explore beyond NUMGFT / (LASTGDT - EARLGDT). -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of ViAnn Beadle Sent: Tuesday, November 13, 2007 7:03 PM To: [hidden email] Subject: Re: CASESTOVARS with a VARS limit <commentary> IMHO, the unit of analysis generally depends on the hypothesis you are testing. If you want to say something about individual gifts, then you generally want your unit of analysis to be a gift. If you want to say something about givers, then you generally want your unit of analysis to be a giver. I suspect that Richard recommends that the unit of analysis be a gift--one case per gift--because it is very easy to aggregate up to givers using something like AGGREGATE. For example, does the level of giving differ by the age of the giver? This can be tested by aggregating the sum of gifts by giver (assuming, of course, that you have the age of the giver). If you are just interested in descriptive reports, the best strategy to have data at the lowest level of analysis and then specify higher levels (such as a person id) as a grouping variable. All of the reporting procedures (TABLES, SUMMARIZE, CTABLES) has the concept of group so its very easy to "aggregate" to a higher unit of analysis. </commentary> The important thing to remember is that you may have to save your data as different units of analysis depending upon the relationships you are looking at--you are not stuck with a particular initial data organization. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Richard Ristow Sent: Tuesday, November 13, 2007 4:42 PM To: [hidden email] Subject: Re: CASESTOVARS with a VARS limit At 05:50 PM 11/13/2007, Mark Palmberg wrote: >After [an] ID variable, only two [other variables]: GFTAMT (gift >amount) and GFTDAT (gift date). An ID is listed for (matched to) each >gift on file (some of the IDs have a couple hundred gifts over the >years, which means a couple hundred instances of the ID in the ID field). > >Thing is, I only want this information for each ID going back the last >20 years. So, for each ID I want only the GFTAMT and GFTDAT hits for >any gift made since, say, 1987/01/01. So far, this doesn't look like a CASESTOVARS problem. As described, it looks like DELETE VARIABLES <all but those three>. SELECT IF GFTDAT GE DATE.MDY(01,01,1987). Now, you could then run CASESTOVARS to get all gifts for one ID into one record (though I wouldn't recommend it). It looks like I'm missing something. Can you say what? ===================== 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 ===================== 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 |
