This needs to stay on-list as David Marso insists. -----Original Message----- I have now got the syntax to work, using the following: RANK FSP BY NEWWARD / NTILES(5) INTO NT5. SELECT IF NT5 = 1. AGGREGATE OUTFILE = '/temp/temp.sav'/BREAK NEWWARD /MeanFSP=MEAN(FSP) /MED=MEDIAN(FSP) However, this doesn't quite do what I need. This outputs the means for the ward and lowest quintile subset, which is correct, but the medians are also for the ward and lowest quintile subset, which isnt correct. I need to compare the mean for the ward and lowest quintile subset against the whole group at ward level. This may be because I have changed the syntax to make it work for me. I am not sure. To give some context, each case is a score achieved by a child on the Foundation Stage Profile. The calculation I am trying to attempt is to satisfy the requirements of National Indicator 92, the definition of which is: The gap between the median Early Years Foundation Stage Profile score of all children locally and the mean score of the lowest achieving 20% of children locally, as a percentage of the median score of all children locally. (see: Incidentally, I should have said I did an automatic recode on ward into NEWWARD as you suggested to make it numeric. Thanks. Tony Alderton Researcher for Early Years and Childcare Oakwood House Oakwood Park Maidstone ME16 8AE Tel: 01622 626614 Fax: 01622 762270 -----Original Message----- From: John F Hall [mailto:[hidden email]] Sent: 07 June 2011 20:01 To: Alderton, Tony - BSS BS Cc: [hidden email] Subject: FW: FW: Caculating means of lowest quintile for 283 wards Tony You have 15366 cases and 2 variables, FSP score and ward (electoral division). Ward is currently entered as a 6-character string in which the first 3 characters are constant for all cases, but it may be easier to work with numeric data. It's not quite clear what your quartiles are; are they cases or what? Can you be more precise as David requests? John John F Hall www.surveyresearch.weebly.com |
The list is free to join and is always full of interesting queries and valuable advice. From: [hidden email] [mailto:[hidden email]] Only one problem with that - I am not on that list, that's why I didn't get David's original posting to which he refers. Tony Alderton Researcher for Early Years and Childcare Oakwood House Oakwood Park Maidstone ME16 8AE Tel: 01622 626614 Fax: 01622 762270 From: John F Hall [mailto:[hidden email]] This needs to stay on-list as David Marso insists. -----Original Message----- I have now got the syntax to work, using the following: RANK FSP BY NEWWARD / NTILES(5) INTO NT5. SELECT IF NT5 = 1. AGGREGATE OUTFILE = '/temp/temp.sav'/BREAK NEWWARD /MeanFSP=MEAN(FSP) /MED=MEDIAN(FSP) However, this doesn't quite do what I need. This outputs the means for the ward and lowest quintile subset, which is correct, but the medians are also for the ward and lowest quintile subset, which isnt correct. I need to compare the mean for the ward and lowest quintile subset against the whole group at ward level. This may be because I have changed the syntax to make it work for me. I am not sure. To give some context, each case is a score achieved by a child on the Foundation Stage Profile. The calculation I am trying to attempt is to satisfy the requirements of National Indicator 92, the definition of which is: The gap between the median Early Years Foundation Stage Profile score of all children locally and the mean score of the lowest achieving 20% of children locally, as a percentage of the median score of all children locally. (see: Incidentally, I should have said I did an automatic recode on ward into NEWWARD as you suggested to make it numeric. Thanks. Tony Alderton Researcher for Early Years and Childcare Oakwood House Oakwood Park Maidstone ME16 8AE Tel: 01622 626614 Fax: 01622 762270 -----Original Message----- From: John F Hall [mailto:[hidden email]] Sent: 07 June 2011 20:01 To: Alderton, Tony - BSS BS Cc: [hidden email] Subject: FW: FW: Caculating means of lowest quintile for 283 wards Tony You have 15366 cases and 2 variables, FSP score and ward (electoral division). Ward is currently entered as a 6-character string in which the first 3 characters are constant for all cases, but it may be easier to work with numeric data. It's not quite clear what your quartiles are; are they cases or what? Can you be more precise as David requests? John John F Hall www.surveyresearch.weebly.com |
Administrator
|
In reply to this post by John F Hall
John,
Please post under existing threads rather than starting new ones each iteration. The corrective to the current issue is very simple. ** UNTESTED, but should do the deed **. RANK FSP BY NEWWARD / NTILES(5) INTO NT5. * Attach 'local' Median to file. AGGREGATE OUTFILE * / MODE=ADDNEWVARIABLES / BREAK NEWWARD / MED=MEDIAN(FSP). * Calculate Mean within each Quintile within each Ward. AGGREGATE OUTFILE * / BREAK NEWWARD NT5 / MEAN MED=MEAN(FSP MED). * Now blast everything but the lowest Quintile. SELECT IF NT5=1. AGGREGATE OUTFILE * /BREAK NEWWARD /MEAN MED=MAX(MEAN MED). *Nail in the coffin *. COMPUTE NI92Gap=(MED-MEAN)/MED * 100. -------
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Got a bit out of synch with all this. I've posted Tony to show him how to join the list. I'm only tying to help out someone in (grossly underfunded) public sector research and I do it for free (if it's something I know about). I promise to learn about AGGREGATE, but in more than 40 years of survey research I've never really needed it, apart from the two surveys I mentioned, Undergraduate Income and Expenditure (National Union of Students) and the British Crime Survey (Home Office) I know, I should get out more ( as Private Eye puts it) John F Hall -----Original Message----- John, Please post under existing threads rather than starting new ones each iteration. The corrective to the current issue is very simple. ** UNTESTED, but should do the deed **. RANK FSP BY NEWWARD / NTILES(5) INTO NT5. * Attach 'local' Median to file. AGGREGATE OUTFILE * / MODE=ADDNEWVARIABLES / BREAK NEWWARD / MED=MEDIAN(FSP). * Calculate Mean within each Quintile within each Ward. AGGREGATE OUTFILE * / BREAK NEWWARD NT5 / MEAN MED=MEAN(FSP MED). * Now blast everything but the lowest Quintile. SELECT IF NT5=1. AGGREGATE OUTFILE * /BREAK NEWWARD /MEAN MED=MAX(MEAN MED). *Nail in the coffin *. COMPUTE NI92Gap=(MED-MEAN)/MED * 100. ------- John F Hall wrote: > > This needs to stay on-list as David Marso insists. > > > > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] > Sent: 08 June 2011 11:07 > To: [hidden email] > Subject: RE: FW: Caculating means of lowest quintile for 283 wards > > > > I have now got the syntax to work, using the following: > > > > RANK FSP BY NEWWARD / NTILES(5) INTO NT5. > > SELECT IF NT5 = 1. > > AGGREGATE OUTFILE = '/temp/temp.sav'/BREAK NEWWARD /MeanFSP=MEAN(FSP) > /MED=MEDIAN(FSP) > > > > However, this doesn't quite do what I need. This outputs the means for the > ward and lowest quintile subset, which is correct, but the medians are > also > for the ward and lowest quintile subset, which isnt correct. I need to > compare the mean for the ward and lowest quintile subset against the whole > group at ward level. This may be because I have changed the syntax to make > it work for me. I am not sure. To give some context, each case is a score > achieved by a child on the Foundation Stage Profile. The calculation I am > trying to attempt is to satisfy the requirements of National Indicator 92, > the definition of which is: > > > > The gap between the median Early Years Foundation Stage Profile score of > all > children locally and the mean score of the lowest achieving 20% of > children > locally, as a percentage of the median score of all children locally. > (see: > > http://www.audit-commission.gov.uk/localgov/audit/nis/Pages/NI092Narrowingth > egapbetweenthelowestachieving20intheEarlyYearsFoundationStageProfileandthere > st.aspx) > > > > Incidentally, I should have said I did an automatic recode on ward into > NEWWARD as you suggested to make it numeric. > > > > > > Thanks. > > > > Tony Alderton > > Researcher for Early Years and Childcare > > Oakwood House > > Oakwood Park > > Maidstone > > ME16 8AE > > Tel: 01622 626614 > > Fax: 01622 762270 > > > > -----Original Message----- > > From: John F Hall [mailto:[hidden email]] > > Sent: 07 June 2011 20:01 > > To: Alderton, Tony - BSS BS > > Cc: [hidden email] > > Subject: FW: FW: Caculating means of lowest quintile for 283 wards > > > > Tony > > > > You have 15366 cases and 2 variables, FSP score and ward (electoral > division). Ward is currently entered as a 6-character string in which the > first 3 characters are constant for all cases, but it may be easier to > work > with numeric data. It's not quite clear what your quartiles are; are they > cases or what? Can you be more precise as David requests? > > > > John > > > > > > John F Hall > > > > > www.surveyresearch.weebly.com > -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/FW-FW-Caculating-means-of-lowest-quintile-for-283-wards-tp4469516p4469632.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 |