Calculations on parts of data, based on conditions

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

RomanInDisguise
Posts: 3
Joined: Tue Feb 03, 2015 8:42 pm

Calculations on parts of data, based on conditions

Hi,

I am using this historical public (UK) database of a sample of 100k+ people, representative for British regions. I am trying to calculate the employment rate for those aged 16-64 both for the England nationally, and for all the English regions.

This requires me to first exclude those aged 16-64 (already have done). Then I have to divide the number of those who said they were "employed" (...those with values marked 0-3 in one particular column) by the total employable population to arrive at the employment rate for both England as a whole, and her seperate regions;

I'm new to SPSS and am having trouble knowing intuitively how this could be done? As I say, I'd like the English (I can't even do this yet), but - more challenging - I want to do separate calculations for each English region.

Any advice or assistance for a beginner would be most-appreciated!
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Calculations on parts of data, based on conditions

I am not sure what you try to achieve exactly, but here is some things that might be useful to you:

- Look into if-functions to create new variables, you can for instance create a variable that holds a 1 for all cases that meet your criterium.
- Via the "select cases" option you can do analyses only for certain cases. You can also combine commands here (e.g., age > 16 & age < 65 & (egion = 1 | region = 2)) gives you people older than 16, younger than 65,w ho live in region 1 or region 2. You can also first calculate a new var with the if-function and then use this to select certain cases.
- via the split file option, you can get output separately for groups (e.g., male/female or gender).

is this what you need?
RomanInDisguise
Posts: 3
Joined: Tue Feb 03, 2015 8:42 pm

Re: Calculations on parts of data, based on conditions

Hi,

Sorry for the belated response, and yes that was what I needed! I opted to take your second option and deleted all those cases which fell out of what I wanted to analyse.

I then just did a simple cross-tabulation to get regional figures, and copied the results of the cross-tabulation over to Excel to do the actual calculations on percentages in employment. I was initially trying to do everything in SPSS - including the calculations - but I found swapping between SPSS and Excel was the best option here.

Thanks again!

Who is online

Users browsing this forum: No registered users and 2 guests