Creating new variable by using a merged one

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

bluecrey
Posts: 1
Joined: Wed Apr 20, 2016 3:12 pm

Creating new variable by using a merged one

Postby bluecrey » Wed Apr 20, 2016 3:40 pm

Hello

I am using the SPSS 22 Version and I wonder if someone could help me with the following problem.

I wanted to create a new variable by using variables employment and sex.
Since I didn't have all the employment informations in one variable, I had to merge the variable “actilu”(employed: yes/no) and “actitaux” (employment level: full, part, part) by taking the 'no' category from actilu and merging it with actitaux (1-full, 2-part, 3-part, 4-unemployed).

compute actitaux_actilu = actitaux.
IF (actilu = 2) actitaux_actilu = 4.

exe.

freq actitaux_actilu.


Out of the new variable I created dummy atypical employment (1=0) (2,3,4 =1) -> (0-typical) (1-atypical).

Now I want to create a new variable from atypical employment and sex.
I have woman (0-man, 1-woman) and atypical employment (0-typical, 1-atypical).
I want to do the following combination:
01, 10, 01, 00.

My question: Is this the right way to go?--->

compute C=$sysmis.
IF (woman=0 & atemployment=0) outsiderness=0.
IF (woman=0 & atemployment=1) outsiderness=1.
IF (woman=1 & atemployment=0) outsiderness=2.
IF (woman=1 & atemployment=1) outsiderness=3.
EXECUTE .

recode outsiderness (0=1) (1 thru 3 = 0) (else = sysmis) into maleinsider.
recode outsiderness (1=1) (0,2,3 = 0) (else = sysmis) into maleoutsider.
recode outsiderness (2=1) (0,1,3 = 0) (else = sysmis) into feminsider.
recode outsiderness (3=1) (0,1,2,= 0) (else = sysmis) into femoutsider.
exe.


I am new to SPSS so I'm quite unsure if this is correct...Can someone please help me with this?

Thank you!

Who is online

Users browsing this forum: No registered users and 1 guest

cron