FW: FW: Caculating means of lowest quintile for 283 wards

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

FW: FW: Caculating means of lowest quintile for 283 wards

John F Hall
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

[hidden email]
www.surveyresearch.weebly.com





-----Original Message-----
From: David Marso [mailto:[hidden email]]
Sent: 07 June 2011 19:14
To: John F Hall
Subject: Re: FW: Caculating means of lowest quintile for 283 wards

Hi John,
  Best to keep this on the list (in fact I insist on that).
Perhaps Tony can describe "how it doesn't work".
What syntax does he actually use.
What are his actual variable names?
Error messages?
David

On Tue, Jun 7, 2011 at 1:03 PM, John F Hall <[hidden email]> wrote:
> David
>
> This is off-list as Tony has attached a small *.sav file.  I'll have a
look

> at it, but I'm sure you are better qualified.  As I said, I've never used
> AGGREGATE myself.
>
> John
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: 07 June 2011 11:57
> To: [hidden email]
> Subject: RE: Caculating means of lowest quintile for 283 wards
>
> David's syntax below doesn't seem to work for me, but then I am not an
> expert by any means in syntax. I don't have David's e-mail address either
to
> mail him directly. I am attaching a copy of the SPSS file I have created
> with the data. Would it be possible for you or David to actually enter and
> save the correct syntax for me. Terrible cheek I know, but I cant just
seem

> to make this work. Sorry.
>
>
> 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: 01 June 2011 08:34
> To: [hidden email]
> Cc: Alderton, Tony - BSS BS
> Subject: RE: Caculating means of lowest quintile for 283 wards
>
> I've never personally used AGGREGATE (except indirectly via my then
computer
> wizard Jim Ring on the British Crime Survey and the Undergraduate Income
and
> Expenditure survey) but can follow the logic of David's syntax.  One
query:

> what happens to the data in cases where NT5 > 1 ?  I know Tony only needs
> the results for NT = 1, but the old advisor in me says he may well need to
> generalise the process for later analyses.
>
>
> John F Hall
>
> [hidden email]
> www.surveyresearch.weebly.com
>
>
>
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> David Marso
> Sent: 31 May 2011 18:58
> To: [hidden email]
> Subject: Re: Caculating means of lowest quintile for 283 wards
>
> Not necessary to do anything manually here.
> As I hinted in my post to the original thread.
> RANK:  See NTILES function and BY subcommand.
> Untested...
> RANK VARIABLES=var / BY ward / NTILES(5) / INTO NT5.
> SELECT IF NT5=1.
> AGGREGATE OUTFILE * /MODE=ADDVARIABLES/ BREAK ward /Meanvar=MEAN(var)
> /Median=MEDIAN(var).
> Substituting your variable of interest for var .
>
>
>
> John F Hall wrote:
>>
>> Tony
>>
>>
>>
>> I'm sure someone on the SPSSX list will come up with a solution in
>> syntax, macro or Python for your problem.  It will probably entail
>> trapping SPSS output for re-input to another procedure in an iterative
>
>> process to find the cutting points for each of the 283 wards.  The DO
>> REPEAT command doesn't allow analysis, only transformations.  There
>> doesn't seem to be any direct syntax for checking if any one case
>> falls in the lowest quintile of eg FPS short of using TEMP and SELECT
>> IF 283 times to find the cutting points for each ward.
>>
>>
>>
>> Temp .
>>
>> Select if ward =  .
>>
>> Freq fps / format notable /ntiles 5 .
>>
>>
>>
>> At least you can highlight this and just keep changing the ward code
>> for each run, but it's still quite laborious!
>>
>>
>>
>> You may have a decision to make if the cutting point falls within a
>> score rather than between two scores.  I'm happy to help off-list as
>> far as I can with any other problems and there are more than 400 pages
>
>> of SPSS syntax tutorials on my site.
>>
>>
>>
>>
>>
>> John F Hall
>>
>>
>>
>>  &lt;mailto:[hidden email]&gt; [hidden email]
>>
>>  &lt;http://surveyresearch.weebly.com/&gt;
>> www.surveyresearch.weebly.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> From: [hidden email] [mailto:[hidden email]]
>>
>>
>>
>>
>> I am wondering if anyone has a useful piece of SPSS syntax I could use
>
>> for the following piece of analysis I need to undertake.
>>
>>
>>
>> I need to calculate the difference between the median score of the FSP
>
>> score and the mean score of the lowest achieving 20% in FSP for each
>> ward code.
>> It
>> is , of course, an easy matter to do this for the whole of my county,
>> although even that requires some manual manipulation. I simply produce
>
>> a frequency table showing the median, then export this into Excel and
>> perform the calculation required manually. I really dont want to do
>> that for 283 wards! I am hoping someone can advise how this could be
>> done electronically.
>>
>>
>>
>> Thanks very much.
>>
>>
>>
>> Tony Alderton
>>
>> Researcher for Early Years and Childcare
>>
>> Oakwood House
>>
>> Oakwood Park
>>
>> Maidstone
>>
>> ME16 8AE
>>
>> Tel: 01622 626614
>>
>> Fax: 01622 762270
>>
>
>
> --
> View this message in context:
> http://spssx-discussion.1045642.n5.nabble.com/Caculating-means-of-lowest
> -qui
> ntile-for-283-wards-tp4442528p4442640.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
>
>

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: FW: FW: Caculating means of lowest quintile for 283 wards

David Marso
Administrator
OK, I'm breaking my own F'n Rules by responding to this!!!
Everyone, ALL Questions follow up ON LIST and *DO NOT* forward me crap offlist!
BAD FORM! User lists are for everyone and not for private consulting issues.
That means you especially John Hall.. BTW, you really need to learn AGGREGATE!!!
What part of 'untested' and RTFM failed to register.
RE original-Too many slashes and RANK is uber-retarded WRT string vars on BY ;-0
---
SORT CASES BY WARD.
autorecode ward /into rward.
RANK VARIABLES=fsp  BY rward / NTILES(5)  INTO NT5.
sort cases by rward nt5 fsp.
AGGREGATE OUTFILE crap / BREAK rward nt5/Meanvar=MEAN(fsp) /Median=MEDIAN(fsp).
MATCH FILES /file * / TABLE crap / BY rWARD nt5.
IF $CASENUM=1 OR LAG(WARD) <> WARD XXX=1.
FREQ XXX.
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?"