Date: Thu, 1 Nov 2007 13:04:08 -0400
Reply-To: Björn Türoque <donald.asay82@gmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Björn Türoque <donald.asay82@gmail.com>
Subject: Re: Aggregate to get the Average Number of Courses Per Student
Per Semester
In-Reply-To: <2c55fecd0711010831lad5016fof06fc586a4fa4c79@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Thanks everyone for your help, I have been looking into it, and it appears a
lag function will accomplish what I am Looking for. I am sure there is a way
to do it with aggregate, but lag will do it and It works. In essence I
needed to replace the extra 4s with system missing if they are in the same
semester and within the same individual.Then when I aggregate the average I
get the average number of courses per semester as a variable.
On 11/1/07, Björn Türoque <donald.asay82@gmail.com> wrote:
>
> Perhaps I was not clear in my initial e-mail, the variable courses per
> semester is a variable that tells you how many courses the individual took
> in the current semester. So when an individual takes 4 courses in a semester
> each individual course enrollment has the value 4 saved by it. I really just
> want to get a new variable with the average number of courses per person per
> semester, when I currently run aggregate with a sum, the value gives me the
> average of all of the individual courses, thus that 4 gets averaged in 4
> times making the average higher. Any suggestions.
>
>
>
>
>
>
> On 11/1/07, Marks, Jim <Jim.Marks@lodgenet.com > wrote:
> >
> > Try:
> >
> > MEANS semesterCode BY coursesPerSemester.
> >
> > As ViAnn notes, this will analyse the data not transform it.
> >
> > --jim
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU ] On Behalf
> > Of Björn Türoque
> > Sent: Thursday, November 01, 2007 8:26 AM
> > To: SPSSX-L@LISTSERV.UGA.EDU
> > Subject: Aggregate to get the Average Number of Courses Per Student Per
> > Semester
> >
> > Hi everyone,
> >
> > I have been working with a dataset that details each individual course
> > enrolment, and I am trying to figure out the average number of enrolments
> > per person per semester. To accomplish this I have been Aggregating the data
> > with StudentID and SemesterCode as break variables. This gives me data like
> > this:
> >
> > StudentID SemesterCode CoursesPerSemester
> > 1468434 20041 4
> > 1468434 20041 4
> > 1468434 20041 4
> > 1468434 20041 4
> > 1468434 20042 1
> > 1468434 20043 1
> > 1123581 20041 2
> > 1123581 20041 2
> > 1123581 20042 3
> > 1123581 20042 3
> > 1123581 20042 3
> > 1234567 20042 1
> > 1234567 20043 2
> > 1234567 20043 2
> >
> > If I then take the average, or agregate the average of the data above by
> > person, I get an incorrect measure as the computer is averaging all of the
> > above numbers, instead of treating each semster individually. I want to get
> > the computer to agregate the data so it reports the average number of
> > courses per person per semester. Any help would be appreciated.
> >
> > =====================
> > To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU
> > (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
> > LISTSERV@LISTSERV.UGA.EDU (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
> >
>
>
>
> --
> Björn Türoque
> Some people are just born to rock!
--
Björn Türoque
Some people are just born to rock!
====================To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (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
|