Convert Multipunch to Single One

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Convert Multipunch to Single One

Kunal
Suppose we have a Multipunch data for Q7 with codes Q7_1 to Q7_25. If a respondent codes 1 in any of the options from 1 to 25 then then individual option must be created there. For eg - Respid 5 coded 1 in Q7_1 Q7_3 and Q7_5 so total 3 single punch variables will be created Q7_1_temp Q7_3_temp and Q7_5_temp and data must be punched 1 in Q7_1_temp and 3 in Q7_3_temp and 5 in Q7_5_temp.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert Multipunch to Single One

Art Kendall
I am not sure I understand your question.

Is this correct?
You have a variable, that contains info for a check  all that apply question in a string, maybe something like this:

data list list/respid (f3) instring (a50).
begin data
5 "1,3,5"
22 "12, 3, 14, 25"
728 "25, 18, 1, 7, 11, 22, 6"
end data
list.

-----
or does the data for respid 5 looks like this
5 "Q7_1,Q7_3,Q7_5"

----
then you want 25 dichotomous (flag) variables (easier with a prefix than a suffix in variable names)
numeric tempQ7_1 to tempQ7_25 (f1).


Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert Multipunch to Single One

Jon Peck
In reply to this post by Kunal
I don't understand the question entirely, but
- you might want to search for multipunch in the Command Syntax Reference
- you might want to look at multiple response sets.

On Wed, May 24, 2017 at 12:03 PM, Kunal <[hidden email]> wrote:
Suppose we have a Multipunch data for Q7 with codes Q7_1 to Q7_25. If a
respondent codes 1 in any of the options from 1 to 25 then then individual
option must be created there. For eg - Respid 5 coded 1 in Q7_1 Q7_3 and
Q7_5 so total 3 single punch variables will be created Q7_1_temp Q7_3_temp
and Q7_5_temp and data must be punched 1 in Q7_1_temp and 3 in Q7_3_temp and
5 in Q7_5_temp.



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Convert-Multipunch-to-Single-One-tp5734250.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



--
Jon K Peck
[hidden email]

===================== 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
|  
Report Content as Inappropriate

Re: Convert Multipunch to Single One

Art Kendall
IIRC about the documentation it still has some mention about punch cards on which 2 variables would be punched in 1 column.

It is amazing how words stick around.  Do you put your lunch in the icebox?

My eSPSS says the OP means some way of entering multiple responses.
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert Multipunch to Single One

Jon Peck
Column binary format aka multiple values punched in a single column is still encountered from time to time, but it sounds like a standard multiple dichotomy set would be suitable here.

On Wed, May 24, 2017 at 1:28 PM, Art Kendall <[hidden email]> wrote:
IIRC about the documentation it still has some mention about punch cards on
which 2 variables would be punched in 1 column.

It is amazing how words stick around.  Do you put your lunch in the icebox?

My eSPSS says the OP means some way of entering multiple responses.



-----
Art Kendall
Social Research Consultants
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Convert-Multipunch-to-Single-One-tp5734250p5734259.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



--
Jon K Peck
[hidden email]

===================== 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
|  
Report Content as Inappropriate

Re: Convert Multipunch to Single One

Rich Ulrich
In reply to this post by Art Kendall

As I read it, he says that there are punches in 1, 3, and 5 (values 1, 3, 5) in column 1 in order to indicate "yes"

for variables numbered 1, 3, and 5.  That sounds like pure multipunch, if that is the right reading.


Googling showed me that there is also a proprietary version of multipunch that SPSS can't read - it being

proprietary and no one has paid licensing fees.


--

Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of Art Kendall <[hidden email]>
Sent: Wednesday, May 24, 2017 3:28:51 PM
To: [hidden email]
Subject: Re: Convert Multipunch to Single One
 
IIRC about the documentation it still has some mention about punch cards on
which 2 variables would be punched in 1 column.

It is amazing how words stick around.  Do you put your lunch in the icebox?

My eSPSS says the OP means some way of entering multiple responses.



-----
Art Kendall
Social Research Consultants
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Convert-Multipunch-to-Single-One-tp5734250p5734259.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
|  
Report Content as Inappropriate

Re: Convert Multipunch to Single One

David Marso
Administrator
In reply to this post by Kunal
I suspect we have an abuse of terminology here?
Please provide an exemplar of what the existing data look like and the desired result.

Kunal wrote
Suppose we have a Multipunch data for Q7 with codes Q7_1 to Q7_25. If a respondent codes 1 in any of the options from 1 to 25 then then individual option must be created there. For eg - Respid 5 coded 1 in Q7_1 Q7_3 and Q7_5 so total 3 single punch variables will be created Q7_1_temp Q7_3_temp and Q7_5_temp and data must be punched 1 in Q7_1_temp and 3 in Q7_3_temp and 5 in Q7_5_temp.
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
|  
Report Content as Inappropriate

Re: Convert Multipunch to Single One

Kunal
Sorry if my question is not clear

I just wanted to ask here suppose we have a select all that apply question (Multi punch questions) and respondent coded 1 in Q7_1 Q7_2, Q7_3,Q7_5 and Q7_10 code so I wanted that maximum 5 single punch variables will be created automatically as that respondent coded 1 (Selected) in 5 options.

So total 5 single puch variables must be created

In all these 10 variables

Q7_temp_1=1
Q7_temp_2=2
Q7_temp_3=3
Q7_temp_4=5
Q7_temp_5=10

Data is punched in these single coded variables upon their selection in multi punch questions.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert Multipunch to Single One

David Marso
Administrator
Adapt this to your purpose.
---

/*Begin data simulation /.
SET SEED=123456.
MATRIX.
SAVE MAKE(100,20,0)/OUTFILE */VARIABLES X01 TO X20.
END MATRIX.
DO REPEAT V=X01 TO X20.
COMPUTE V=RV.BERNOULLI(.2).
END REPEAT.
/*End data simulation /.


COMPUTE #Location=1.
VECTOR NewVars(5).
DO REPEAT Target=X01 TO X20 /SourceLocation= 1 TO 20 /##= #01 TO #20.
COMPUTE ##= SourceLocation.
+  DO IF Target AND  #Location LT 6.
+    COMPUTE NewVars ( #Location) =SourceLocation .
+    COMPUTE #Location=#Location + 1.
+  END IF.
END REPEAT.
FORMATS ALL ( F2.0) .
PRINT
   /#01 TO #20 (20(F2.0 , X))
  / X01 TO X20
  / NewVars1 TO NewVars5.
EXECUTE.


1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
 0  0  0  0  0  1  1  0  0  1  0  0  0  0  0  0  0  0  0  0
 6  7 10  .  .
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
 0  1  0  0  1  0  0  1  1  0  0  0  0  0  1  0  0  0  0  0
 2  5  8  9 15
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
 0  1  0  1  0  0  0  1  0  0  0  0  0  0  0  1  1  1  0  0
 2  4  8 16 17
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
 0  0  0  0  0  0  1  0  0  1  1  0  0  0  0  0  1  0  0  0
 7 10 11 17  .
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
 0  0  0  1  0  0  1  0  1  0  1  1  0  0  1  0  0  0  0  0
 4  7  9 11 12
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
 0  0  0  0  0  0  0  0  1  0  0  0  1  0  0  0  0  0  0  0
 9 13  .  .  .
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
 0  1  0  0  0  1  0  0  0  0  0  1  0  0  0  0  0  0  0  0
 2  6 12  .  .
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
 1  0  0  0  0  1  0  0  1  1  0  1  0  0  0  1  0  0  0  0
 1  6  9 10 12
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
 0  1  0  0  1  0  1  0  0  0  0  0  0  0  1  0  0  0  1  0
 2  5  7 15 19

etc...

On Thu, May 25, 2017 at 6:07 AM, Kunal [via SPSSX Discussion] <[hidden email]> wrote:
Sorry if my question is not clear

I just wanted to ask here suppose we have a select all that apply question (Multi punch questions) and respondent coded 1 in Q7_1 Q7_2, Q7_3,Q7_5 and Q7_10 code so I wanted that maximum 5 single punch variables will be created automatically as that respondent coded 1 (Selected) in 5 options.

So total 5 single puch variables must be created

In all these 10 variables

Q7_temp_1=1
Q7_temp_2=2
Q7_temp_3=3
Q7_temp_4=5
Q7_temp_5=10

Data is punched in these single coded variables upon their selection in multi punch questions.



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Convert-Multipunch-to-Single-One-tp5734250p5734268.html
To unsubscribe from Convert Multipunch to Single One, click here.
NAML

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
|  
Report Content as Inappropriate

Re: Convert Multipunch to Single One

Kunal
Thanks David it works.

Thanks  a lot for your help :)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert Multipunch to Single One

John F Hall
In reply to this post by Rich Ulrich

I’m currently having serious email problems migrating to a new computer, but there should be something on Nabble from johnfhall under Recovery of data from a binary file

 

In May 2014, when I was restoring a 1962 data set from UKDS (SN28  Runciman, Relative Deprivation and Social Justice: https://discover.ukdataservice.ac.uk/catalogue/?sn=28&type=Data%20catalogue ) Bob Walker sent me some syntax to read binary files http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=search_page&node=1068821&query=%22Recovery+of+data+from+a+binary+file%22&days=0

 

My page http://surveyresearch.weebly.com/sn-28-relative-deprivation-and-social-justice-1962-63.html  contains some information.  There’s quite a long Commentary on Relative Deprivation and Social Justice (pdf 47pp) http://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/sn_68_commentary_relative_deprivation_and_social_justice.pdf which includes the following:

 

[Extract]

 

I’m using the tedious method of reading one column at a time, but at least it works.

 

FILE HANDLE sn28

    /NAME='C:\Users\John\d2028.bin' /MODE=MULTIPUNCH.

data list file sn28

/1 serial 1-4 v105 to v120 5-20 (a).

list serial /cases 5.

freq v105 to v120.

 

What I’m not sure about is the number of records in the binary file, but it looks like there are eight: there may only be one..

 

From: Bob Walker [[hidden email]]
Sent: 15 May 2014 23:05

Without a valid codebook, it will be a bit of a guessing game, so I don’t envy you. The first few columns were typically set aside for a respondent ID and 79-80 for a card number, but your data file may not adhere to this. I’d only suggest that you experiment with MODE switches, for example /MODE=MULTIPUNCH vs. /MODE=EBCDIC (the old IBM standard) may yield different output and perhaps make that alignment process a little less tedious for you.

 

John F Hall (retired academic survey researcher)

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Rich Ulrich
Sent: Thursday, May 25, 2017 1:49 AM
To: [hidden email]
Subject: Re: Convert Multipunch to Single One

 

As I read it, he says that there are punches in 1, 3, and 5 (values 1, 3, 5) in column 1 in order to indicate "yes"

for variables numbered 1, 3, and 5.  That sounds like pure multipunch, if that is the right reading.

 

Googling showed me that there is also a proprietary version of multipunch that SPSS can't read - it being

proprietary and no one has paid licensing fees.

 

--

Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of Art Kendall <[hidden email]>
Sent: Wednesday, May 24, 2017 3:28:51 PM
To: [hidden email]
Subject: Re: Convert Multipunch to Single One

 

IIRC about the documentation it still has some mention about punch cards on
which 2 variables would be punched in 1 column.

It is amazing how words stick around.  Do you put your lunch in the icebox?

My eSPSS says the OP means some way of entering multiple responses.



-----
Art Kendall
Social Research Consultants
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Convert-Multipunch-to-Single-One-tp5734250p5734259.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

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