Generate combined codebook

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Generate combined codebook

Javier Figueroa
Hello SPSS Experts

Before worrying about the doubt that arises, I would like to wish many exams in their activities and thank them for taking a few moments to try to solve the problems that present me in the use of this excellent statistical program.

I have a database 233,353 records, there are multiple questions and answers sinples, my problem is with the multiple answer I would like to combine the answers and then generate a variable with that result. Former.

Structure of the database

id = no. of the questionnaire identifier
p21 = Buy a tour package? Si = 1, No = 2.
p21a = How much does the tour package cost? Values
p21b1 = Does the package include international shipping? Yes = 1, No = p21b2 = Does the package include national transport? Si = 1, No = 2.
p21b3 = Does the package include accommodation? Si = 1, No = 2.
p21b4 = Does the package include food? Si = 1, No = 2.
p21b5 = Does the Tour package include Tours? Si = 1, No = 2.

I would like to have as a result to have all possible combinations as well as
VARIABLE LEBELS result 'Services that includes tourist package'.
1 'All (international transport, national transport, lodging, food, excursions)'
2 International transport, national transport
3 International Transport, Accommodation

Database example

DATA LIST /id 1 p21 5-5 p21a 6-14 p21b1 15-15 p21b2 16-16 p21b3 17-17 p21b4 18-18 p21b5 19-19.
1   1  245000 11111
2   1   35000 12112
3   1   30000 11122
4   1   25000 11111
5   2  
6   1   18000 22111
7   2  
8   2 
9   1   35000 21112

VARIABLE LABELS id 'Id Cuestionario'.
VARIABLE LABELS p21 '¿Adquirio paquete turistico?'.
1   Si
2   No.
VARIABLE LABELS p21a '¿Cuanto le costo el paquete turistico?'.
VARIABLE LABELS p21b1 '¿El paquete turistico incluye transporte internacional?'.
VALUE LABELS p21b1 to p21b5
1   Si
2   No.
VARIABLE LABELS p21b2 '¿El paquete turistico incluye transporte nacional?'.
VARIABLE LABELS p21b3 '¿El paquete turistico incluye Alojamiento?'.
VARIABLE LABELS p21b4 '¿El paquete turistico incluye Alimentación?'.
VARIABLE LABELS p21b5 '¿El paquete turistico incluye Tours?'.


I thank you in advance for your attention and again wish you many successes in your activities.

Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184

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