aggregating alpha factor?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

aggregating alpha factor?

wsu_wright
I have the following data structure

ID    event    school
12      1       schoolx
45       1      schoolz
45      2       schoolx
67      4       schoolw
67      7       schoolw

(ID=numeric, event=numeric, school=alpha)

I need to aggregate on the ID, selecting the last event and school factor.  Since I don't think spss allows for aggregating alpha variables whene they are not part of the break variable, I'm lost on how to get the aggregation done.

Thanks in advance.

David
Reply | Threaded
Open this post in threaded view
|

Re: aggregating alpha factor?

Jason Burke
AGGREGATE allows strings to be summarized. Naturally, certain summary
functions are not allowable (mean, std. deviation, sum, and median).

In order to summarize string variables you will need to do it using
syntax (that may have changed in SPSS 15)

HTH,


Jason

* This illustrates an approach if you have SPSS 14 (multiple datasets) .

DATASET DECLARE results .

AGGREGATE
  /OUTFILE= results
  /BREAK=ID
  /event_last = LAST(event)
 /school_last = LAST(school).


On 9/30/06, David Wright <[hidden email]> wrote:

> I have the following data structure
>
> ID    event    school
> 12      1       schoolx
> 45       1      schoolz
> 45      2       schoolx
> 67      4       schoolw
> 67      7       schoolw
>
> (ID=numeric, event=numeric, school=alpha)
>
> I need to aggregate on the ID, selecting the last event and school factor.  Since I don't think spss allows for aggregating alpha variables whene they are not part of the break variable, I'm lost on how to get the aggregation done.
>
> Thanks in advance.
>
> David
>