Caculating means of lowest quintile for 283 wards

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

Caculating means of lowest quintile for 283 wards

John F Hall

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

 

[hidden email]

www.surveyresearch.weebly.com

 

 

 

 

From: [hidden email] [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

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Caculating means of lowest quintile for 283 wards

David Marso
Administrator
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



 <mailto:[hidden email]> [hidden email]

 <http://surveyresearch.weebly.com/> 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
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?"
Reply | Threaded
Open this post in threaded view
|

Re: Caculating means of lowest quintile for 283 wards

John F Hall
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: Caculating means of lowest quintile for 283 wards

David Marso
Administrator
Try it and see ;-)
Personally I'd skip the SELECT and add NT5 as an additional variable in the BREAK (obtain MEAN and MEDIAN for each quintile.

John F Hall wrote
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
>
>
>
>  <mailto:[hidden email]> [hidden email]
>
>  <http://surveyresearch.weebly.com/> 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
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?"