Need Syntax for Combining Data from 3 Vars into One-Orig Vars were Contingency Questions

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

Need Syntax for Combining Data from 3 Vars into One-Orig Vars were Contingency Questions

JanM1
Using SPSS V 16 at the moment. Have situation in dissertation data that I
need to resolve before I can proceed. Situation follows.
Have VAR named ROLE (that people answering survey picked from the beginning,
which determined the questions they would see for the rest of the survey.
The ROLE responses were: Student (1) Faculty (2) Field Instructor (3)
Have VA named STRESPONSE (which represents responses to an opinion question
with YES/NO options (coded 1, 2) that only Students answered.
Have VAR named FARESPONSE (which represents responses to the same opinion
question with YES/NO options that only Faculty answered.  
Have VAR named FIRESPONSE (which represents responses to the same opinion
question with YES/NO options that only Field Instructors answered.
 
I need to get the answers from all three of those variables into a single
variable - yet to be created - and named OPINION which will also have the
same YES/NO options.
That variable should end up with having the data from  all 3 of the other
variables in it, and mapped to the role that each subject chose at the
beginning.  
This is a situation that occurs throughout my survey so I will need to apply
the solution to multiple situations. THANK YOU THANK YOU THANK YOU in
advance!! I realize I created a headache for myself by having these
questions listed separately. I should have had one, that everyone answered.



--
Sent from: http://spssx-discussion.1045642.n5.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
Reply | Threaded
Open this post in threaded view
|

Re: Need Syntax for Combining Data from 3 Vars into One-Orig Vars were Contingency Questions

Rich Ulrich

David Marso and I each answered this in the Usenet group, where your example

used Gender rather than Role.


His answer uses MAX rather than SUM.1 which I used -- 

COMPUTE  OPINION= MAX(stresponse, firesponse, faresponse).


--

Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of JanM1 <[hidden email]>
Sent: Saturday, February 3, 2018 3:14:35 PM
To: [hidden email]
Subject: Need Syntax for Combining Data from 3 Vars into One-Orig Vars were Contingency Questions
 
Using SPSS V 16 at the moment. Have situation in dissertation data that I
need to resolve before I can proceed. Situation follows.
Have VAR named ROLE (that people answering survey picked from the beginning,
which determined the questions they would see for the rest of the survey.
The ROLE responses were: Student (1) Faculty (2) Field Instructor (3)
Have VA named STRESPONSE (which represents responses to an opinion question
with YES/NO options (coded 1, 2) that only Students answered.
Have VAR named FARESPONSE (which represents responses to the same opinion
question with YES/NO options that only Faculty answered. 
Have VAR named FIRESPONSE (which represents responses to the same opinion
question with YES/NO options that only Field Instructors answered.
 
I need to get the answers from all three of those variables into a single
variable - yet to be created - and named OPINION which will also have the
same YES/NO options.
That variable should end up with having the data from  all 3 of the other
variables in it, and mapped to the role that each subject chose at the
beginning. 
This is a situation that occurs throughout my survey so I will need to apply
the solution to multiple situations. THANK YOU THANK YOU THANK YOU in
advance!! I realize I created a headache for myself by having these
questions listed separately. I should have had one, that everyone answered.



--
Sent from: http://spssx-discussion.1045642.n5.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: Need Syntax for Combining Data from 3 Vars into One-Orig Vars were Contingency Questions

John F Hall

Here's an alternative solution using MULT RESPONSE

 

mult response groups

            rolegroups (stresponse, firesponse, faresponse (1,2)).

 

Tested example based on national survey (Urban GB: dataset7) replicated simultaneously in two towns (Stoke-on-Trent:datataset2 and Sunderland: dataset3): new variables sexbg sexstoke and sexsund created from sex to mirror same problem.

 

add files file = dataset7 /file = dataset2 /file = dataset3

    /keep sample sex sexgb sexstoke sexsund.

 

freq sample sex to sexsund.

sample

 

Frequency

Percent

Valid Percent

Cumulative Percent

Valid

Urban GB

753

30.3

30.3

30.3

Stoke

966

38.8

38.8

69.1

Sunderland

770

30.9

30.9

100.0

Total

2489

100.0

100.0

 

Sex of respondent

 

 

Frequency

Percent

Valid Percent

Cumulative Percent

 

Valid

Men

1169

47.0

47.0

47.0

 

Women

1320

53.0

53.0

100.0

 

Total

2489

100.0

100.0

 

 

sexgb

 

 

Frequency

Percent

Valid Percent

Cumulative Percent

 

Valid

Men

442

17.8

45.8

45.8

 

Women

524

21.1

54.2

100.0

 

Total

966

38.8

100.0

 

 

Missing

System

1523

61.2

 

 

 

Total

2489

100.0

 

 

 

sexstoke

 

 

Frequency

Percent

Valid Percent

Cumulative Percent

 

Valid

Men

389

15.6

51.7

51.7

 

Women

364

14.6

48.3

100.0

 

Total

753

30.3

100.0

 

 

Missing

System

1736

69.7

 

 

 

Total

2489

100.0

 

 

 

sexsund

 

 

Frequency

Percent

Valid Percent

Cumulative Percent

 

Valid

Men

338

13.6

43.9

43.9

 

Women

432

17.4

56.1

100.0

 

Total

770

30.9

100.0

 

 

Missing

System

1719

69.1

 

 

 

Total

2489

100.0

 

 

 

 

mult response groups = sexgroups (sexgb sexstoke sexsund (1,2))

/freq sexgroups.

sexgroups Frequencies

 

Responses

Percent of Cases

N

Percent

sexgroupsa

Men

1169

47.0%

47.0%

Women

1320

53.0%

53.0%

Total

2489

100.0%

100.0%

a. Group

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Rich Ulrich
Sent: 03 February 2018 22:49
To: [hidden email]
Subject: Re: Need Syntax for Combining Data from 3 Vars into One-Orig Vars were Contingency Questions

 

David Marso and I each answered this in the Usenet group, where your example

used Gender rather than Role.

 

His answer uses MAX rather than SUM.1 which I used -- 

COMPUTE  OPINION= MAX

 

--

Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of JanM1 <[hidden email]>
Sent: Saturday, February 3, 2018 3:14:35 PM
To:
[hidden email]
Subject: Need Syntax for Combining Data from 3 Vars into One-Orig Vars were Contingency Questions

 

Using SPSS V 16 at the moment. Have situation in dissertation data that I
need to resolve before I can proceed. Situation follows.
Have VAR named ROLE (that people answering survey picked from the beginning,
which determined the questions they would see for the rest of the survey.
The ROLE responses were: Student (1) Faculty (2) Field Instructor (3)
Have VA named STRESPONSE (which represents responses to an opinion question
with YES/NO options (coded 1, 2) that only Students answered.
Have VAR named FARESPONSE (which represents responses to the same opinion
question with YES/NO options that only Faculty answered. 
Have VAR named FIRESPONSE (which represents responses to the same opinion
question with YES/NO options that only Field Instructors answered.
 
I need to get the answers from all three of those variables into a single
variable - yet to be created - and named OPINION which will also have the
same YES/NO options.
That variable should end up with having the data from  all 3 of the other
variables in it, and mapped to the role that each subject chose at the
beginning. 
This is a situation that occurs throughout my survey so I will need to apply
the solution to multiple situations. THANK YOU THANK YOU THANK YOU in
advance!! I realize I created a headache for myself by having these
questions listed separately. I should have had one, that everyone answered.



--
Sent from: http://spssx-discussion.1045642.n5.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

===================== 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