Hello.
Sorry for the length of this message, but I have a data processing situation that I need to resolve using SPSS and I need help to figure out how to do it. I am hoping one of you reading this may be able to offer some suggestions. I have a data set of more than 100,000 cases. I have 415 variables that contain numeric codes that corresponds to specific technologies. When these technology variables were originally parsed out, a pair of variables were created, first a variable with the code numbers and then a variable with the text definition of the code numbers. Thus there were 830 total variables, named DATA_TECHNOLOGIES.1 (a code number variable), DATA_TECHNOLOGIES.2 (the text definitions corresponding to the codes), DATA_TECHNOLOGIES.3 (the next code number variable), DATA_TECHNOLOGIES.4 (the next text definitions variable), on out to DATA_TECHNOLOGIES.829 (code variable) and DATA_TECHNOLOGIES.830 (text variable). I have reordered my data file to put all 415 code variables at the end of the file in a continuous block (they are all the odd numbered technology variables). Not all these 415 technology variables are populated for every case (and some cases are not populated at all), but since the original data was parsed out from one data column into these variables, the first variables will have codes for the most cases and the data further out in the file will have fewer and fewer codes. I ran frequencies on the first 10 technology variables to develop a rough code list. Based on this code list of the technologies, I know that there could be more than 9,400 individual technologies mentioned across the 415 technology variables. Any given technology code could be listed in any of the 415 technology variables, there is no predefined order. The technology codes themselves are not sequential. The range of codes on my code list goes from a low of 65 up to 87339, but I would not be surprised if the code list is incomplete and there are some code numbers for which I will not have a listing (running frequencies on all 415 variables and combining the results into a code list is possible, I just haven’t taken the time to do it). But I should be able to find a code definition for any such “missing” value on the code list from the associated text variables that accompanied the code variables. My goal is to create one new dichotomous variable for every unique coded technology found in the 415 technology variables (thus adding 9,400+ variables to my data set). I have created syntax (see below) that will give me the first dichotomous variable I am looking for (I think it works, I’m trying to figure out how to double check it now), but manually updating this code for the 9,400 plus codes that I need to capture is not practical. I am hoping for a solution that will loop through the code variables, and perhaps a second loop through the codes in the code variables, to punch a new variable for every unique code encountered. As you can see in the syntax below, I am using the code number as an append to the newly created variable name to be sure I know which technology code the new variable represents. I am currently running SPSS version 25 (I have just over a week left on the 14-day trial—after which I have a commitment from my management to sign up for a month of subscription access during which I need to show the value of the software or lose access to it). I am open to suggestion as to how to proceed. Thanks for any and all help! My SYNTAX: ** Create Dichotomous Variable Data_Tech_Detect_65. COMPUTE Data_Tech_Detect_65 = 0. DO IF ( DATA_TECHNOLOGIES.1 = 65 OR DATA_TECHNOLOGIES.3 = 65 OR DATA_TECHNOLOGIES.5 = 65 OR DATA_TECHNOLOGIES.7 = 65 OR DATA_TECHNOLOGIES.9 = 65 OR DATA_TECHNOLOGIES.11 = 65 OR DATA_TECHNOLOGIES.13 = 65 OR DATA_TECHNOLOGIES.15 = 65 OR DATA_TECHNOLOGIES.17 = 65 OR DATA_TECHNOLOGIES.19 = 65 OR DATA_TECHNOLOGIES.21 = 65 OR DATA_TECHNOLOGIES.23 = 65 OR DATA_TECHNOLOGIES.25 = 65 OR DATA_TECHNOLOGIES.27 = 65 OR DATA_TECHNOLOGIES.29 = 65 OR DATA_TECHNOLOGIES.31 = 65 OR DATA_TECHNOLOGIES.33 = 65 OR DATA_TECHNOLOGIES.35 = 65 OR DATA_TECHNOLOGIES.37 = 65 OR DATA_TECHNOLOGIES.39 = 65 OR DATA_TECHNOLOGIES.41 = 65 OR DATA_TECHNOLOGIES.43 = 65 OR DATA_TECHNOLOGIES.45 = 65 OR DATA_TECHNOLOGIES.47 = 65 OR DATA_TECHNOLOGIES.49 = 65 OR DATA_TECHNOLOGIES.51 = 65 OR DATA_TECHNOLOGIES.53 = 65 OR DATA_TECHNOLOGIES.55 = 65 OR DATA_TECHNOLOGIES.57 = 65 OR DATA_TECHNOLOGIES.59 = 65 OR DATA_TECHNOLOGIES.61 = 65 OR DATA_TECHNOLOGIES.63 = 65 OR DATA_TECHNOLOGIES.65 = 65 OR DATA_TECHNOLOGIES.67 = 65 OR DATA_TECHNOLOGIES.69 = 65 OR DATA_TECHNOLOGIES.71 = 65 OR DATA_TECHNOLOGIES.73 = 65 OR DATA_TECHNOLOGIES.75 = 65 OR DATA_TECHNOLOGIES.77 = 65 OR DATA_TECHNOLOGIES.79 = 65 OR DATA_TECHNOLOGIES.81 = 65 OR DATA_TECHNOLOGIES.83 = 65 OR DATA_TECHNOLOGIES.85 = 65 OR DATA_TECHNOLOGIES.87 = 65 OR DATA_TECHNOLOGIES.89 = 65 OR DATA_TECHNOLOGIES.91 = 65 OR DATA_TECHNOLOGIES.93 = 65 OR DATA_TECHNOLOGIES.95 = 65 OR DATA_TECHNOLOGIES.97 = 65 OR DATA_TECHNOLOGIES.99 = 65 OR DATA_TECHNOLOGIES.101 = 65 OR DATA_TECHNOLOGIES.103 = 65 OR DATA_TECHNOLOGIES.105 = 65 OR DATA_TECHNOLOGIES.107 = 65 OR DATA_TECHNOLOGIES.109 = 65 OR DATA_TECHNOLOGIES.111 = 65 OR DATA_TECHNOLOGIES.113 = 65 OR DATA_TECHNOLOGIES.115 = 65 OR DATA_TECHNOLOGIES.117 = 65 OR DATA_TECHNOLOGIES.119 = 65 OR DATA_TECHNOLOGIES.121 = 65 OR DATA_TECHNOLOGIES.123 = 65 OR DATA_TECHNOLOGIES.125 = 65 OR DATA_TECHNOLOGIES.127 = 65 OR DATA_TECHNOLOGIES.129 = 65 OR DATA_TECHNOLOGIES.131 = 65 OR DATA_TECHNOLOGIES.133 = 65 OR DATA_TECHNOLOGIES.135 = 65 OR DATA_TECHNOLOGIES.137 = 65 OR DATA_TECHNOLOGIES.139 = 65 OR DATA_TECHNOLOGIES.141 = 65 OR DATA_TECHNOLOGIES.143 = 65 OR DATA_TECHNOLOGIES.145 = 65 OR DATA_TECHNOLOGIES.147 = 65 OR DATA_TECHNOLOGIES.149 = 65 OR DATA_TECHNOLOGIES.151 = 65 OR DATA_TECHNOLOGIES.153 = 65 OR DATA_TECHNOLOGIES.155 = 65 OR DATA_TECHNOLOGIES.157 = 65 OR DATA_TECHNOLOGIES.159 = 65 OR DATA_TECHNOLOGIES.161 = 65 OR DATA_TECHNOLOGIES.163 = 65 OR DATA_TECHNOLOGIES.165 = 65 OR DATA_TECHNOLOGIES.167 = 65 OR DATA_TECHNOLOGIES.169 = 65 OR DATA_TECHNOLOGIES.171 = 65 OR DATA_TECHNOLOGIES.173 = 65 OR DATA_TECHNOLOGIES.175 = 65 OR DATA_TECHNOLOGIES.177 = 65 OR DATA_TECHNOLOGIES.179 = 65 OR DATA_TECHNOLOGIES.181 = 65 OR DATA_TECHNOLOGIES.183 = 65 OR DATA_TECHNOLOGIES.185 = 65 OR DATA_TECHNOLOGIES.187 = 65 OR DATA_TECHNOLOGIES.189 = 65 OR DATA_TECHNOLOGIES.191 = 65 OR DATA_TECHNOLOGIES.193 = 65 OR DATA_TECHNOLOGIES.195 = 65 OR DATA_TECHNOLOGIES.197 = 65 OR DATA_TECHNOLOGIES.199 = 65 OR DATA_TECHNOLOGIES.201 = 65 OR DATA_TECHNOLOGIES.203 = 65 OR DATA_TECHNOLOGIES.205 = 65 OR DATA_TECHNOLOGIES.207 = 65 OR DATA_TECHNOLOGIES.209 = 65 OR DATA_TECHNOLOGIES.211 = 65 OR DATA_TECHNOLOGIES.213 = 65 OR DATA_TECHNOLOGIES.215 = 65 OR DATA_TECHNOLOGIES.217 = 65 OR DATA_TECHNOLOGIES.219 = 65 OR DATA_TECHNOLOGIES.221 = 65 OR DATA_TECHNOLOGIES.223 = 65 OR DATA_TECHNOLOGIES.225 = 65 OR DATA_TECHNOLOGIES.227 = 65 OR DATA_TECHNOLOGIES.229 = 65 OR DATA_TECHNOLOGIES.231 = 65 OR DATA_TECHNOLOGIES.233 = 65 OR DATA_TECHNOLOGIES.235 = 65 OR DATA_TECHNOLOGIES.237 = 65 OR DATA_TECHNOLOGIES.239 = 65 OR DATA_TECHNOLOGIES.241 = 65 OR DATA_TECHNOLOGIES.243 = 65 OR DATA_TECHNOLOGIES.245 = 65 OR DATA_TECHNOLOGIES.247 = 65 OR DATA_TECHNOLOGIES.249 = 65 OR DATA_TECHNOLOGIES.251 = 65 OR DATA_TECHNOLOGIES.253 = 65 OR DATA_TECHNOLOGIES.255 = 65 OR DATA_TECHNOLOGIES.257 = 65 OR DATA_TECHNOLOGIES.259 = 65 OR DATA_TECHNOLOGIES.261 = 65 OR DATA_TECHNOLOGIES.263 = 65 OR DATA_TECHNOLOGIES.265 = 65 OR DATA_TECHNOLOGIES.267 = 65 OR DATA_TECHNOLOGIES.269 = 65 OR DATA_TECHNOLOGIES.271 = 65 OR DATA_TECHNOLOGIES.273 = 65 OR DATA_TECHNOLOGIES.275 = 65 OR DATA_TECHNOLOGIES.277 = 65 OR DATA_TECHNOLOGIES.279 = 65 OR DATA_TECHNOLOGIES.281 = 65 OR DATA_TECHNOLOGIES.283 = 65 OR DATA_TECHNOLOGIES.285 = 65 OR DATA_TECHNOLOGIES.287 = 65 OR DATA_TECHNOLOGIES.289 = 65 OR DATA_TECHNOLOGIES.291 = 65 OR DATA_TECHNOLOGIES.293 = 65 OR DATA_TECHNOLOGIES.295 = 65 OR DATA_TECHNOLOGIES.297 = 65 OR DATA_TECHNOLOGIES.299 = 65 OR DATA_TECHNOLOGIES.301 = 65 OR DATA_TECHNOLOGIES.303 = 65 OR DATA_TECHNOLOGIES.305 = 65 OR DATA_TECHNOLOGIES.307 = 65 OR DATA_TECHNOLOGIES.309 = 65 OR DATA_TECHNOLOGIES.311 = 65 OR DATA_TECHNOLOGIES.313 = 65 OR DATA_TECHNOLOGIES.315 = 65 OR DATA_TECHNOLOGIES.317 = 65 OR DATA_TECHNOLOGIES.319 = 65 OR DATA_TECHNOLOGIES.321 = 65 OR DATA_TECHNOLOGIES.323 = 65 OR DATA_TECHNOLOGIES.325 = 65 OR DATA_TECHNOLOGIES.327 = 65 OR DATA_TECHNOLOGIES.329 = 65 OR DATA_TECHNOLOGIES.331 = 65 OR DATA_TECHNOLOGIES.333 = 65 OR DATA_TECHNOLOGIES.335 = 65 OR DATA_TECHNOLOGIES.337 = 65 OR DATA_TECHNOLOGIES.339 = 65 OR DATA_TECHNOLOGIES.341 = 65 OR DATA_TECHNOLOGIES.343 = 65 OR DATA_TECHNOLOGIES.345 = 65 OR DATA_TECHNOLOGIES.347 = 65 OR DATA_TECHNOLOGIES.349 = 65 OR DATA_TECHNOLOGIES.351 = 65 OR DATA_TECHNOLOGIES.353 = 65 OR DATA_TECHNOLOGIES.355 = 65 OR DATA_TECHNOLOGIES.357 = 65 OR DATA_TECHNOLOGIES.359 = 65 OR DATA_TECHNOLOGIES.361 = 65 OR DATA_TECHNOLOGIES.363 = 65 OR DATA_TECHNOLOGIES.365 = 65 OR DATA_TECHNOLOGIES.367 = 65 OR DATA_TECHNOLOGIES.369 = 65 OR DATA_TECHNOLOGIES.371 = 65 OR DATA_TECHNOLOGIES.373 = 65 OR DATA_TECHNOLOGIES.375 = 65 OR DATA_TECHNOLOGIES.377 = 65 OR DATA_TECHNOLOGIES.379 = 65 OR DATA_TECHNOLOGIES.381 = 65 OR DATA_TECHNOLOGIES.383 = 65 OR DATA_TECHNOLOGIES.385 = 65 OR DATA_TECHNOLOGIES.387 = 65 OR DATA_TECHNOLOGIES.389 = 65 OR DATA_TECHNOLOGIES.391 = 65 OR DATA_TECHNOLOGIES.393 = 65 OR DATA_TECHNOLOGIES.395 = 65 OR DATA_TECHNOLOGIES.397 = 65 OR DATA_TECHNOLOGIES.399 = 65 OR DATA_TECHNOLOGIES.401 = 65 OR DATA_TECHNOLOGIES.403 = 65 OR DATA_TECHNOLOGIES.405 = 65 OR DATA_TECHNOLOGIES.407 = 65 OR DATA_TECHNOLOGIES.409 = 65 OR DATA_TECHNOLOGIES.411 = 65 OR DATA_TECHNOLOGIES.413 = 65 OR DATA_TECHNOLOGIES.415 = 65 OR DATA_TECHNOLOGIES.417 = 65 OR DATA_TECHNOLOGIES.419 = 65 OR DATA_TECHNOLOGIES.421 = 65 OR DATA_TECHNOLOGIES.423 = 65 OR DATA_TECHNOLOGIES.425 = 65 OR DATA_TECHNOLOGIES.427 = 65 OR DATA_TECHNOLOGIES.429 = 65 OR DATA_TECHNOLOGIES.431 = 65 OR DATA_TECHNOLOGIES.433 = 65 OR DATA_TECHNOLOGIES.435 = 65 OR DATA_TECHNOLOGIES.437 = 65 OR DATA_TECHNOLOGIES.439 = 65 OR DATA_TECHNOLOGIES.441 = 65 OR DATA_TECHNOLOGIES.443 = 65 OR DATA_TECHNOLOGIES.445 = 65 OR DATA_TECHNOLOGIES.447 = 65 OR DATA_TECHNOLOGIES.449 = 65 OR DATA_TECHNOLOGIES.451 = 65 OR DATA_TECHNOLOGIES.453 = 65 OR DATA_TECHNOLOGIES.455 = 65 OR DATA_TECHNOLOGIES.457 = 65 OR DATA_TECHNOLOGIES.459 = 65 OR DATA_TECHNOLOGIES.461 = 65 OR DATA_TECHNOLOGIES.463 = 65 OR DATA_TECHNOLOGIES.465 = 65 OR DATA_TECHNOLOGIES.467 = 65 OR DATA_TECHNOLOGIES.469 = 65 OR DATA_TECHNOLOGIES.471 = 65 OR DATA_TECHNOLOGIES.473 = 65 OR DATA_TECHNOLOGIES.475 = 65 OR DATA_TECHNOLOGIES.477 = 65 OR DATA_TECHNOLOGIES.479 = 65 OR DATA_TECHNOLOGIES.481 = 65 OR DATA_TECHNOLOGIES.483 = 65 OR DATA_TECHNOLOGIES.485 = 65 OR DATA_TECHNOLOGIES.487 = 65 OR DATA_TECHNOLOGIES.489 = 65 OR DATA_TECHNOLOGIES.491 = 65 OR DATA_TECHNOLOGIES.493 = 65 OR DATA_TECHNOLOGIES.495 = 65 OR DATA_TECHNOLOGIES.497 = 65 OR DATA_TECHNOLOGIES.499 = 65 OR DATA_TECHNOLOGIES.501 = 65 OR DATA_TECHNOLOGIES.503 = 65 OR DATA_TECHNOLOGIES.505 = 65 OR DATA_TECHNOLOGIES.507 = 65 OR DATA_TECHNOLOGIES.509 = 65 OR DATA_TECHNOLOGIES.511 = 65 OR DATA_TECHNOLOGIES.513 = 65 OR DATA_TECHNOLOGIES.515 = 65 OR DATA_TECHNOLOGIES.517 = 65 OR DATA_TECHNOLOGIES.519 = 65 OR DATA_TECHNOLOGIES.521 = 65 OR DATA_TECHNOLOGIES.523 = 65 OR DATA_TECHNOLOGIES.525 = 65 OR DATA_TECHNOLOGIES.527 = 65 OR DATA_TECHNOLOGIES.529 = 65 OR DATA_TECHNOLOGIES.531 = 65 OR DATA_TECHNOLOGIES.533 = 65 OR DATA_TECHNOLOGIES.535 = 65 OR DATA_TECHNOLOGIES.537 = 65 OR DATA_TECHNOLOGIES.539 = 65 OR DATA_TECHNOLOGIES.541 = 65 OR DATA_TECHNOLOGIES.543 = 65 OR DATA_TECHNOLOGIES.545 = 65 OR DATA_TECHNOLOGIES.547 = 65 OR DATA_TECHNOLOGIES.549 = 65 OR DATA_TECHNOLOGIES.551 = 65 OR DATA_TECHNOLOGIES.553 = 65 OR DATA_TECHNOLOGIES.555 = 65 OR DATA_TECHNOLOGIES.557 = 65 OR DATA_TECHNOLOGIES.559 = 65 OR DATA_TECHNOLOGIES.561 = 65 OR DATA_TECHNOLOGIES.563 = 65 OR DATA_TECHNOLOGIES.565 = 65 OR DATA_TECHNOLOGIES.567 = 65 OR DATA_TECHNOLOGIES.569 = 65 OR DATA_TECHNOLOGIES.571 = 65 OR DATA_TECHNOLOGIES.573 = 65 OR DATA_TECHNOLOGIES.575 = 65 OR DATA_TECHNOLOGIES.577 = 65 OR DATA_TECHNOLOGIES.579 = 65 OR DATA_TECHNOLOGIES.581 = 65 OR DATA_TECHNOLOGIES.583 = 65 OR DATA_TECHNOLOGIES.585 = 65 OR DATA_TECHNOLOGIES.587 = 65 OR DATA_TECHNOLOGIES.589 = 65 OR DATA_TECHNOLOGIES.591 = 65 OR DATA_TECHNOLOGIES.593 = 65 OR DATA_TECHNOLOGIES.595 = 65 OR DATA_TECHNOLOGIES.597 = 65 OR DATA_TECHNOLOGIES.599 = 65 OR DATA_TECHNOLOGIES.601 = 65 OR DATA_TECHNOLOGIES.603 = 65 OR DATA_TECHNOLOGIES.605 = 65 OR DATA_TECHNOLOGIES.607 = 65 OR DATA_TECHNOLOGIES.609 = 65 OR DATA_TECHNOLOGIES.611 = 65 OR DATA_TECHNOLOGIES.613 = 65 OR DATA_TECHNOLOGIES.615 = 65 OR DATA_TECHNOLOGIES.617 = 65 OR DATA_TECHNOLOGIES.619 = 65 OR DATA_TECHNOLOGIES.621 = 65 OR DATA_TECHNOLOGIES.623 = 65 OR DATA_TECHNOLOGIES.625 = 65 OR DATA_TECHNOLOGIES.627 = 65 OR DATA_TECHNOLOGIES.629 = 65 OR DATA_TECHNOLOGIES.631 = 65 OR DATA_TECHNOLOGIES.633 = 65 OR DATA_TECHNOLOGIES.635 = 65 OR DATA_TECHNOLOGIES.637 = 65 OR DATA_TECHNOLOGIES.639 = 65 OR DATA_TECHNOLOGIES.641 = 65 OR DATA_TECHNOLOGIES.643 = 65 OR DATA_TECHNOLOGIES.645 = 65 OR DATA_TECHNOLOGIES.647 = 65 OR DATA_TECHNOLOGIES.649 = 65 OR DATA_TECHNOLOGIES.651 = 65 OR DATA_TECHNOLOGIES.653 = 65 OR DATA_TECHNOLOGIES.655 = 65 OR DATA_TECHNOLOGIES.657 = 65 OR DATA_TECHNOLOGIES.659 = 65 OR DATA_TECHNOLOGIES.661 = 65 OR DATA_TECHNOLOGIES.663 = 65 OR DATA_TECHNOLOGIES.665 = 65 OR DATA_TECHNOLOGIES.667 = 65 OR DATA_TECHNOLOGIES.669 = 65 OR DATA_TECHNOLOGIES.671 = 65 OR DATA_TECHNOLOGIES.673 = 65 OR DATA_TECHNOLOGIES.675 = 65 OR DATA_TECHNOLOGIES.677 = 65 OR DATA_TECHNOLOGIES.679 = 65 OR DATA_TECHNOLOGIES.681 = 65 OR DATA_TECHNOLOGIES.683 = 65 OR DATA_TECHNOLOGIES.685 = 65 OR DATA_TECHNOLOGIES.687 = 65 OR DATA_TECHNOLOGIES.689 = 65 OR DATA_TECHNOLOGIES.691 = 65 OR DATA_TECHNOLOGIES.693 = 65 OR DATA_TECHNOLOGIES.695 = 65 OR DATA_TECHNOLOGIES.697 = 65 OR DATA_TECHNOLOGIES.699 = 65 OR DATA_TECHNOLOGIES.701 = 65 OR DATA_TECHNOLOGIES.703 = 65 OR DATA_TECHNOLOGIES.705 = 65 OR DATA_TECHNOLOGIES.707 = 65 OR DATA_TECHNOLOGIES.709 = 65 OR DATA_TECHNOLOGIES.711 = 65 OR DATA_TECHNOLOGIES.713 = 65 OR DATA_TECHNOLOGIES.715 = 65 OR DATA_TECHNOLOGIES.717 = 65 OR DATA_TECHNOLOGIES.719 = 65 OR DATA_TECHNOLOGIES.721 = 65 OR DATA_TECHNOLOGIES.723 = 65 OR DATA_TECHNOLOGIES.725 = 65 OR DATA_TECHNOLOGIES.727 = 65 OR DATA_TECHNOLOGIES.729 = 65 OR DATA_TECHNOLOGIES.731 = 65 OR DATA_TECHNOLOGIES.733 = 65 OR DATA_TECHNOLOGIES.735 = 65 OR DATA_TECHNOLOGIES.737 = 65 OR DATA_TECHNOLOGIES.739 = 65 OR DATA_TECHNOLOGIES.741 = 65 OR DATA_TECHNOLOGIES.743 = 65 OR DATA_TECHNOLOGIES.745 = 65 OR DATA_TECHNOLOGIES.747 = 65 OR DATA_TECHNOLOGIES.749 = 65 OR DATA_TECHNOLOGIES.751 = 65 OR DATA_TECHNOLOGIES.753 = 65 OR DATA_TECHNOLOGIES.755 = 65 OR DATA_TECHNOLOGIES.757 = 65 OR DATA_TECHNOLOGIES.759 = 65 OR DATA_TECHNOLOGIES.761 = 65 OR DATA_TECHNOLOGIES.763 = 65 OR DATA_TECHNOLOGIES.765 = 65 OR DATA_TECHNOLOGIES.767 = 65 OR DATA_TECHNOLOGIES.769 = 65 OR DATA_TECHNOLOGIES.771 = 65 OR DATA_TECHNOLOGIES.773 = 65 OR DATA_TECHNOLOGIES.775 = 65 OR DATA_TECHNOLOGIES.777 = 65 OR DATA_TECHNOLOGIES.779 = 65 OR DATA_TECHNOLOGIES.781 = 65 OR DATA_TECHNOLOGIES.783 = 65 OR DATA_TECHNOLOGIES.785 = 65 OR DATA_TECHNOLOGIES.787 = 65 OR DATA_TECHNOLOGIES.789 = 65 OR DATA_TECHNOLOGIES.791 = 65 OR DATA_TECHNOLOGIES.793 = 65 OR DATA_TECHNOLOGIES.795 = 65 OR DATA_TECHNOLOGIES.797 = 65 OR DATA_TECHNOLOGIES.799 = 65 OR DATA_TECHNOLOGIES.801 = 65 OR DATA_TECHNOLOGIES.803 = 65 OR DATA_TECHNOLOGIES.805 = 65 OR DATA_TECHNOLOGIES.807 = 65 OR DATA_TECHNOLOGIES.809 = 65 OR DATA_TECHNOLOGIES.811 = 65 OR DATA_TECHNOLOGIES.813 = 65 OR DATA_TECHNOLOGIES.815 = 65 OR DATA_TECHNOLOGIES.817 = 65 OR DATA_TECHNOLOGIES.819 = 65 OR DATA_TECHNOLOGIES.821 = 65 OR DATA_TECHNOLOGIES.823 = 65 OR DATA_TECHNOLOGIES.825 = 65 OR DATA_TECHNOLOGIES.827 = 65 OR DATA_TECHNOLOGIES.829 = 65 ). COMPUTE Data_Tech_Detect_65 = 1. ELSE. COMPUTE Data_Tech_Detect_65 = 0. END IF. VARIABLE LABELS Data_Tech_Detect_65 "Data Technology Detected (Item 65 -- Kissmetrics)". EXECUTE. ===================== 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 |
Rather than searching, the infinitely faster procedure is to do the assignments directly. But I do want to
suggest that you look at your eventual ends, and find something different to do. "9500 variables" are
seldom a useful starting set.
That is - directly - initialize all of them to zero, and set the ones that occur, using VECTOR in each of the two ways it can be used, to make new variables and to describe existing variables.
VECTOR Data_Tech_Detect( 1 to 9500) . VECTOR Data_Technologies= Data_Technologies_1 to Data_Technologies_839.
It is not clear what you did to rearrange variables. My line above is correct if you did rearrange with the original names, so that consecutive variables do not have consecutive names.
I think I would have renamed my original 1-830 into Tech001 to Tech415, TechNam001 to TechNam415, to provide data so that the VECTOR is visibly of the right dimension.
[untested] RECODE Data_Tech_Detect_1 to Data_Tech_Detect_9500(ELSE=0). LOOP for #i= 1 to 415 . COMPUTE Data_Tech_Detect(Data_Technologies(#i)) = 1.
End Loop. * * * ALSO * * * As to your original code, those hundreds of lines in your example can be replaced by one COMPUTE Data_Tech_Detect_65 = ANY(65, Data_Technologies_1 to Data_Technologies_839).
ANY(VorC, VorC_list) returns 0 or 1 for "No" or "Yes", describing whether the variable or constant
"VorC" has any match in the list of variables or constants, "VorC_list. It is a very useful function.
-- Rich Ulrich
From: SPSSX(r) Discussion <[hidden email]> on behalf of Launce Weber <[hidden email]>
Sent: Wednesday, September 5, 2018 1:37:51 PM To: [hidden email] Subject: Data Processing Help - Data Technologies Hello.
Sorry for the length of this message, but I have a data processing situation that I need to resolve using SPSS and I need help to figure out how to do it. I am hoping one of you reading this may be able to offer some suggestions. I have a data set of more than 100,000 cases. I have 415 variables that contain numeric codes that corresponds to specific technologies. When these technology variables were originally parsed out, a pair of variables were created, first a variable with the code numbers and then a variable with the text definition of the code numbers. Thus there were 830 total variables, named DATA_TECHNOLOGIES.1 (a code number variable), DATA_TECHNOLOGIES.2 (the text definitions corresponding to the codes), DATA_TECHNOLOGIES.3 (the next code number variable), DATA_TECHNOLOGIES.4 (the next text definitions variable), on out to DATA_TECHNOLOGIES.829 (code variable) and DATA_TECHNOLOGIES.830 (text variable). I have reordered my data file to put all 415 code variables at the end of the file in a continuous block (they are all the odd numbered technology variables). Not all these 415 technology variables are populated for every case (and some cases are not populated at all), but since the original data was parsed out from one data column into these variables, the first variables will have codes for the most cases and the data further out in the file will have fewer and fewer codes. I ran frequencies on the first 10 technology variables to develop a rough code list. Based on this code list of the technologies, I know that there could be more than 9,400 individual technologies mentioned across the 415 technology variables. Any given technology code could be listed in any of the 415 technology variables, there is no predefined order. The technology codes themselves are not sequential. The range of codes on my code list goes from a low of 65 up to 87339, but I would not be surprised if the code list is incomplete and there are some code numbers for which I will not have a listing (running frequencies on all 415 variables and combining the results into a code list is possible, I just haven’t taken the time to do it). But I should be able to find a code definition for any such “missing” value on the code list from the associated text variables that accompanied the code variables. My goal is to create one new dichotomous variable for every unique coded technology found in the 415 technology variables (thus adding 9,400+ variables to my data set). I have created syntax (see below) that will give me the first dichotomous variable I am looking for (I think it works, I’m trying to figure out how to double check it now), but manually updating this code for the 9,400 plus codes that I need to capture is not practical. I am hoping for a solution that will loop through the code variables, and perhaps a second loop through the codes in the code variables, to punch a new variable for every unique code encountered. As you can see in the syntax below, I am using the code number as an append to the newly created variable name to be sure I know which technology code the new variable represents. I am currently running SPSS version 25 (I have just over a week left on the 14-day trial—after which I have a commitment from my management to sign up for a month of subscription access during which I need to show the value of the software or lose access to it). I am open to suggestion as to how to proceed. Thanks for any and all help! My SYNTAX: ** Create Dichotomous Variable Data_Tech_Detect_65. COMPUTE Data_Tech_Detect_65 = 0. DO IF ( DATA_TECHNOLOGIES.1 = 65 OR DATA_TECHNOLOGIES.3 = 65 OR DATA_TECHNOLOGIES.5 = 65 OR DATA_TECHNOLOGIES.7 = 65 OR DATA_TECHNOLOGIES.9 = 65 OR DATA_TECHNOLOGIES.11 = 65 OR DATA_TECHNOLOGIES.13 = 65 OR DATA_TECHNOLOGIES.15 = 65 OR DATA_TECHNOLOGIES.17 = 65 OR DATA_TECHNOLOGIES.19 = 65 OR DATA_TECHNOLOGIES.21 = 65 OR DATA_TECHNOLOGIES.23 = 65 OR DATA_TECHNOLOGIES.25 = 65 OR DATA_TECHNOLOGIES.27 = 65 OR DATA_TECHNOLOGIES.29 = 65 OR DATA_TECHNOLOGIES.31 = 65 OR DATA_TECHNOLOGIES.33 = 65 OR DATA_TECHNOLOGIES.35 = 65 OR DATA_TECHNOLOGIES.37 = 65 OR DATA_TECHNOLOGIES.39 = 65 OR DATA_TECHNOLOGIES.41 = 65 OR DATA_TECHNOLOGIES.43 = 65 OR DATA_TECHNOLOGIES.45 = 65 OR DATA_TECHNOLOGIES.47 = 65 OR DATA_TECHNOLOGIES.49 = 65 OR DATA_TECHNOLOGIES.51 = 65 OR DATA_TECHNOLOGIES.53 = 65 OR DATA_TECHNOLOGIES.55 = 65 OR DATA_TECHNOLOGIES.57 = 65 OR DATA_TECHNOLOGIES.59 = 65 OR DATA_TECHNOLOGIES.61 = 65 OR DATA_TECHNOLOGIES.63 = 65 OR DATA_TECHNOLOGIES.65 = 65 OR DATA_TECHNOLOGIES.67 = 65 OR DATA_TECHNOLOGIES.69 = 65 OR DATA_TECHNOLOGIES.71 = 65 OR DATA_TECHNOLOGIES.73 = 65 OR DATA_TECHNOLOGIES.75 = 65 OR DATA_TECHNOLOGIES.77 = 65 OR DATA_TECHNOLOGIES.79 = 65 OR DATA_TECHNOLOGIES.81 = 65 OR DATA_TECHNOLOGIES.83 = 65 OR DATA_TECHNOLOGIES.85 = 65 OR DATA_TECHNOLOGIES.87 = 65 OR DATA_TECHNOLOGIES.89 = 65 OR DATA_TECHNOLOGIES.91 = 65 OR DATA_TECHNOLOGIES.93 = 65 OR DATA_TECHNOLOGIES.95 = 65 OR DATA_TECHNOLOGIES.97 = 65 OR DATA_TECHNOLOGIES.99 = 65 OR DATA_TECHNOLOGIES.101 = 65 OR DATA_TECHNOLOGIES.103 = 65 OR DATA_TECHNOLOGIES.105 = 65 OR DATA_TECHNOLOGIES.107 = 65 OR DATA_TECHNOLOGIES.109 = 65 OR DATA_TECHNOLOGIES.111 = 65 OR DATA_TECHNOLOGIES.113 = 65 OR DATA_TECHNOLOGIES.115 = 65 OR DATA_TECHNOLOGIES.117 = 65 OR DATA_TECHNOLOGIES.119 = 65 OR DATA_TECHNOLOGIES.121 = 65 OR DATA_TECHNOLOGIES.123 = 65 OR DATA_TECHNOLOGIES.125 = 65 OR DATA_TECHNOLOGIES.127 = 65 OR DATA_TECHNOLOGIES.129 = 65 OR DATA_TECHNOLOGIES.131 = 65 OR DATA_TECHNOLOGIES.133 = 65 OR DATA_TECHNOLOGIES.135 = 65 OR DATA_TECHNOLOGIES.137 = 65 OR DATA_TECHNOLOGIES.139 = 65 OR DATA_TECHNOLOGIES.141 = 65 OR DATA_TECHNOLOGIES.143 = 65 OR DATA_TECHNOLOGIES.145 = 65 OR DATA_TECHNOLOGIES.147 = 65 OR DATA_TECHNOLOGIES.149 = 65 OR DATA_TECHNOLOGIES.151 = 65 OR DATA_TECHNOLOGIES.153 = 65 OR DATA_TECHNOLOGIES.155 = 65 OR DATA_TECHNOLOGIES.157 = 65 OR DATA_TECHNOLOGIES.159 = 65 OR DATA_TECHNOLOGIES.161 = 65 OR DATA_TECHNOLOGIES.163 = 65 OR DATA_TECHNOLOGIES.165 = 65 OR DATA_TECHNOLOGIES.167 = 65 OR DATA_TECHNOLOGIES.169 = 65 OR DATA_TECHNOLOGIES.171 = 65 OR DATA_TECHNOLOGIES.173 = 65 OR DATA_TECHNOLOGIES.175 = 65 OR DATA_TECHNOLOGIES.177 = 65 OR DATA_TECHNOLOGIES.179 = 65 OR DATA_TECHNOLOGIES.181 = 65 OR DATA_TECHNOLOGIES.183 = 65 OR DATA_TECHNOLOGIES.185 = 65 OR DATA_TECHNOLOGIES.187 = 65 OR DATA_TECHNOLOGIES.189 = 65 OR DATA_TECHNOLOGIES.191 = 65 OR DATA_TECHNOLOGIES.193 = 65 OR DATA_TECHNOLOGIES.195 = 65 OR DATA_TECHNOLOGIES.197 = 65 OR DATA_TECHNOLOGIES.199 = 65 OR DATA_TECHNOLOGIES.201 = 65 OR DATA_TECHNOLOGIES.203 = 65 OR DATA_TECHNOLOGIES.205 = 65 OR DATA_TECHNOLOGIES.207 = 65 OR DATA_TECHNOLOGIES.209 = 65 OR DATA_TECHNOLOGIES.211 = 65 OR DATA_TECHNOLOGIES.213 = 65 OR DATA_TECHNOLOGIES.215 = 65 OR DATA_TECHNOLOGIES.217 = 65 OR DATA_TECHNOLOGIES.219 = 65 OR DATA_TECHNOLOGIES.221 = 65 OR DATA_TECHNOLOGIES.223 = 65 OR DATA_TECHNOLOGIES.225 = 65 OR DATA_TECHNOLOGIES.227 = 65 OR DATA_TECHNOLOGIES.229 = 65 OR DATA_TECHNOLOGIES.231 = 65 OR DATA_TECHNOLOGIES.233 = 65 OR DATA_TECHNOLOGIES.235 = 65 OR DATA_TECHNOLOGIES.237 = 65 OR DATA_TECHNOLOGIES.239 = 65 OR DATA_TECHNOLOGIES.241 = 65 OR DATA_TECHNOLOGIES.243 = 65 OR DATA_TECHNOLOGIES.245 = 65 OR DATA_TECHNOLOGIES.247 = 65 OR DATA_TECHNOLOGIES.249 = 65 OR DATA_TECHNOLOGIES.251 = 65 OR DATA_TECHNOLOGIES.253 = 65 OR DATA_TECHNOLOGIES.255 = 65 OR DATA_TECHNOLOGIES.257 = 65 OR DATA_TECHNOLOGIES.259 = 65 OR DATA_TECHNOLOGIES.261 = 65 OR DATA_TECHNOLOGIES.263 = 65 OR DATA_TECHNOLOGIES.265 = 65 OR DATA_TECHNOLOGIES.267 = 65 OR DATA_TECHNOLOGIES.269 = 65 OR DATA_TECHNOLOGIES.271 = 65 OR DATA_TECHNOLOGIES.273 = 65 OR DATA_TECHNOLOGIES.275 = 65 OR DATA_TECHNOLOGIES.277 = 65 OR DATA_TECHNOLOGIES.279 = 65 OR DATA_TECHNOLOGIES.281 = 65 OR DATA_TECHNOLOGIES.283 = 65 OR DATA_TECHNOLOGIES.285 = 65 OR DATA_TECHNOLOGIES.287 = 65 OR DATA_TECHNOLOGIES.289 = 65 OR DATA_TECHNOLOGIES.291 = 65 OR DATA_TECHNOLOGIES.293 = 65 OR DATA_TECHNOLOGIES.295 = 65 OR DATA_TECHNOLOGIES.297 = 65 OR DATA_TECHNOLOGIES.299 = 65 OR DATA_TECHNOLOGIES.301 = 65 OR DATA_TECHNOLOGIES.303 = 65 OR DATA_TECHNOLOGIES.305 = 65 OR DATA_TECHNOLOGIES.307 = 65 OR DATA_TECHNOLOGIES.309 = 65 OR DATA_TECHNOLOGIES.311 = 65 OR DATA_TECHNOLOGIES.313 = 65 OR DATA_TECHNOLOGIES.315 = 65 OR DATA_TECHNOLOGIES.317 = 65 OR DATA_TECHNOLOGIES.319 = 65 OR DATA_TECHNOLOGIES.321 = 65 OR DATA_TECHNOLOGIES.323 = 65 OR DATA_TECHNOLOGIES.325 = 65 OR DATA_TECHNOLOGIES.327 = 65 OR DATA_TECHNOLOGIES.329 = 65 OR DATA_TECHNOLOGIES.331 = 65 OR DATA_TECHNOLOGIES.333 = 65 OR DATA_TECHNOLOGIES.335 = 65 OR DATA_TECHNOLOGIES.337 = 65 OR DATA_TECHNOLOGIES.339 = 65 OR DATA_TECHNOLOGIES.341 = 65 OR DATA_TECHNOLOGIES.343 = 65 OR DATA_TECHNOLOGIES.345 = 65 OR DATA_TECHNOLOGIES.347 = 65 OR DATA_TECHNOLOGIES.349 = 65 OR DATA_TECHNOLOGIES.351 = 65 OR DATA_TECHNOLOGIES.353 = 65 OR DATA_TECHNOLOGIES.355 = 65 OR DATA_TECHNOLOGIES.357 = 65 OR DATA_TECHNOLOGIES.359 = 65 OR DATA_TECHNOLOGIES.361 = 65 OR DATA_TECHNOLOGIES.363 = 65 OR DATA_TECHNOLOGIES.365 = 65 OR DATA_TECHNOLOGIES.367 = 65 OR DATA_TECHNOLOGIES.369 = 65 OR DATA_TECHNOLOGIES.371 = 65 OR DATA_TECHNOLOGIES.373 = 65 OR DATA_TECHNOLOGIES.375 = 65 OR DATA_TECHNOLOGIES.377 = 65 OR DATA_TECHNOLOGIES.379 = 65 OR DATA_TECHNOLOGIES.381 = 65 OR DATA_TECHNOLOGIES.383 = 65 OR DATA_TECHNOLOGIES.385 = 65 OR DATA_TECHNOLOGIES.387 = 65 OR DATA_TECHNOLOGIES.389 = 65 OR DATA_TECHNOLOGIES.391 = 65 OR DATA_TECHNOLOGIES.393 = 65 OR DATA_TECHNOLOGIES.395 = 65 OR DATA_TECHNOLOGIES.397 = 65 OR DATA_TECHNOLOGIES.399 = 65 OR DATA_TECHNOLOGIES.401 = 65 OR DATA_TECHNOLOGIES.403 = 65 OR DATA_TECHNOLOGIES.405 = 65 OR DATA_TECHNOLOGIES.407 = 65 OR DATA_TECHNOLOGIES.409 = 65 OR DATA_TECHNOLOGIES.411 = 65 OR DATA_TECHNOLOGIES.413 = 65 OR DATA_TECHNOLOGIES.415 = 65 OR DATA_TECHNOLOGIES.417 = 65 OR DATA_TECHNOLOGIES.419 = 65 OR DATA_TECHNOLOGIES.421 = 65 OR DATA_TECHNOLOGIES.423 = 65 OR DATA_TECHNOLOGIES.425 = 65 OR DATA_TECHNOLOGIES.427 = 65 OR DATA_TECHNOLOGIES.429 = 65 OR DATA_TECHNOLOGIES.431 = 65 OR DATA_TECHNOLOGIES.433 = 65 OR DATA_TECHNOLOGIES.435 = 65 OR DATA_TECHNOLOGIES.437 = 65 OR DATA_TECHNOLOGIES.439 = 65 OR DATA_TECHNOLOGIES.441 = 65 OR DATA_TECHNOLOGIES.443 = 65 OR DATA_TECHNOLOGIES.445 = 65 OR DATA_TECHNOLOGIES.447 = 65 OR DATA_TECHNOLOGIES.449 = 65 OR DATA_TECHNOLOGIES.451 = 65 OR DATA_TECHNOLOGIES.453 = 65 OR DATA_TECHNOLOGIES.455 = 65 OR DATA_TECHNOLOGIES.457 = 65 OR DATA_TECHNOLOGIES.459 = 65 OR DATA_TECHNOLOGIES.461 = 65 OR DATA_TECHNOLOGIES.463 = 65 OR DATA_TECHNOLOGIES.465 = 65 OR DATA_TECHNOLOGIES.467 = 65 OR DATA_TECHNOLOGIES.469 = 65 OR DATA_TECHNOLOGIES.471 = 65 OR DATA_TECHNOLOGIES.473 = 65 OR DATA_TECHNOLOGIES.475 = 65 OR DATA_TECHNOLOGIES.477 = 65 OR DATA_TECHNOLOGIES.479 = 65 OR DATA_TECHNOLOGIES.481 = 65 OR DATA_TECHNOLOGIES.483 = 65 OR DATA_TECHNOLOGIES.485 = 65 OR DATA_TECHNOLOGIES.487 = 65 OR DATA_TECHNOLOGIES.489 = 65 OR DATA_TECHNOLOGIES.491 = 65 OR DATA_TECHNOLOGIES.493 = 65 OR DATA_TECHNOLOGIES.495 = 65 OR DATA_TECHNOLOGIES.497 = 65 OR DATA_TECHNOLOGIES.499 = 65 OR DATA_TECHNOLOGIES.501 = 65 OR DATA_TECHNOLOGIES.503 = 65 OR DATA_TECHNOLOGIES.505 = 65 OR DATA_TECHNOLOGIES.507 = 65 OR DATA_TECHNOLOGIES.509 = 65 OR DATA_TECHNOLOGIES.511 = 65 OR DATA_TECHNOLOGIES.513 = 65 OR DATA_TECHNOLOGIES.515 = 65 OR DATA_TECHNOLOGIES.517 = 65 OR DATA_TECHNOLOGIES.519 = 65 OR DATA_TECHNOLOGIES.521 = 65 OR DATA_TECHNOLOGIES.523 = 65 OR DATA_TECHNOLOGIES.525 = 65 OR DATA_TECHNOLOGIES.527 = 65 OR DATA_TECHNOLOGIES.529 = 65 OR DATA_TECHNOLOGIES.531 = 65 OR DATA_TECHNOLOGIES.533 = 65 OR DATA_TECHNOLOGIES.535 = 65 OR DATA_TECHNOLOGIES.537 = 65 OR DATA_TECHNOLOGIES.539 = 65 OR DATA_TECHNOLOGIES.541 = 65 OR DATA_TECHNOLOGIES.543 = 65 OR DATA_TECHNOLOGIES.545 = 65 OR DATA_TECHNOLOGIES.547 = 65 OR DATA_TECHNOLOGIES.549 = 65 OR DATA_TECHNOLOGIES.551 = 65 OR DATA_TECHNOLOGIES.553 = 65 OR DATA_TECHNOLOGIES.555 = 65 OR DATA_TECHNOLOGIES.557 = 65 OR DATA_TECHNOLOGIES.559 = 65 OR DATA_TECHNOLOGIES.561 = 65 OR DATA_TECHNOLOGIES.563 = 65 OR DATA_TECHNOLOGIES.565 = 65 OR DATA_TECHNOLOGIES.567 = 65 OR DATA_TECHNOLOGIES.569 = 65 OR DATA_TECHNOLOGIES.571 = 65 OR DATA_TECHNOLOGIES.573 = 65 OR DATA_TECHNOLOGIES.575 = 65 OR DATA_TECHNOLOGIES.577 = 65 OR DATA_TECHNOLOGIES.579 = 65 OR DATA_TECHNOLOGIES.581 = 65 OR DATA_TECHNOLOGIES.583 = 65 OR DATA_TECHNOLOGIES.585 = 65 OR DATA_TECHNOLOGIES.587 = 65 OR DATA_TECHNOLOGIES.589 = 65 OR DATA_TECHNOLOGIES.591 = 65 OR DATA_TECHNOLOGIES.593 = 65 OR DATA_TECHNOLOGIES.595 = 65 OR DATA_TECHNOLOGIES.597 = 65 OR DATA_TECHNOLOGIES.599 = 65 OR DATA_TECHNOLOGIES.601 = 65 OR DATA_TECHNOLOGIES.603 = 65 OR DATA_TECHNOLOGIES.605 = 65 OR DATA_TECHNOLOGIES.607 = 65 OR DATA_TECHNOLOGIES.609 = 65 OR DATA_TECHNOLOGIES.611 = 65 OR DATA_TECHNOLOGIES.613 = 65 OR DATA_TECHNOLOGIES.615 = 65 OR DATA_TECHNOLOGIES.617 = 65 OR DATA_TECHNOLOGIES.619 = 65 OR DATA_TECHNOLOGIES.621 = 65 OR DATA_TECHNOLOGIES.623 = 65 OR DATA_TECHNOLOGIES.625 = 65 OR DATA_TECHNOLOGIES.627 = 65 OR DATA_TECHNOLOGIES.629 = 65 OR DATA_TECHNOLOGIES.631 = 65 OR DATA_TECHNOLOGIES.633 = 65 OR DATA_TECHNOLOGIES.635 = 65 OR DATA_TECHNOLOGIES.637 = 65 OR DATA_TECHNOLOGIES.639 = 65 OR DATA_TECHNOLOGIES.641 = 65 OR DATA_TECHNOLOGIES.643 = 65 OR DATA_TECHNOLOGIES.645 = 65 OR DATA_TECHNOLOGIES.647 = 65 OR DATA_TECHNOLOGIES.649 = 65 OR DATA_TECHNOLOGIES.651 = 65 OR DATA_TECHNOLOGIES.653 = 65 OR DATA_TECHNOLOGIES.655 = 65 OR DATA_TECHNOLOGIES.657 = 65 OR DATA_TECHNOLOGIES.659 = 65 OR DATA_TECHNOLOGIES.661 = 65 OR DATA_TECHNOLOGIES.663 = 65 OR DATA_TECHNOLOGIES.665 = 65 OR DATA_TECHNOLOGIES.667 = 65 OR DATA_TECHNOLOGIES.669 = 65 OR DATA_TECHNOLOGIES.671 = 65 OR DATA_TECHNOLOGIES.673 = 65 OR DATA_TECHNOLOGIES.675 = 65 OR DATA_TECHNOLOGIES.677 = 65 OR DATA_TECHNOLOGIES.679 = 65 OR DATA_TECHNOLOGIES.681 = 65 OR DATA_TECHNOLOGIES.683 = 65 OR DATA_TECHNOLOGIES.685 = 65 OR DATA_TECHNOLOGIES.687 = 65 OR DATA_TECHNOLOGIES.689 = 65 OR DATA_TECHNOLOGIES.691 = 65 OR DATA_TECHNOLOGIES.693 = 65 OR DATA_TECHNOLOGIES.695 = 65 OR DATA_TECHNOLOGIES.697 = 65 OR DATA_TECHNOLOGIES.699 = 65 OR DATA_TECHNOLOGIES.701 = 65 OR DATA_TECHNOLOGIES.703 = 65 OR DATA_TECHNOLOGIES.705 = 65 OR DATA_TECHNOLOGIES.707 = 65 OR DATA_TECHNOLOGIES.709 = 65 OR DATA_TECHNOLOGIES.711 = 65 OR DATA_TECHNOLOGIES.713 = 65 OR DATA_TECHNOLOGIES.715 = 65 OR DATA_TECHNOLOGIES.717 = 65 OR DATA_TECHNOLOGIES.719 = 65 OR DATA_TECHNOLOGIES.721 = 65 OR DATA_TECHNOLOGIES.723 = 65 OR DATA_TECHNOLOGIES.725 = 65 OR DATA_TECHNOLOGIES.727 = 65 OR DATA_TECHNOLOGIES.729 = 65 OR DATA_TECHNOLOGIES.731 = 65 OR DATA_TECHNOLOGIES.733 = 65 OR DATA_TECHNOLOGIES.735 = 65 OR DATA_TECHNOLOGIES.737 = 65 OR DATA_TECHNOLOGIES.739 = 65 OR DATA_TECHNOLOGIES.741 = 65 OR DATA_TECHNOLOGIES.743 = 65 OR DATA_TECHNOLOGIES.745 = 65 OR DATA_TECHNOLOGIES.747 = 65 OR DATA_TECHNOLOGIES.749 = 65 OR DATA_TECHNOLOGIES.751 = 65 OR DATA_TECHNOLOGIES.753 = 65 OR DATA_TECHNOLOGIES.755 = 65 OR DATA_TECHNOLOGIES.757 = 65 OR DATA_TECHNOLOGIES.759 = 65 OR DATA_TECHNOLOGIES.761 = 65 OR DATA_TECHNOLOGIES.763 = 65 OR DATA_TECHNOLOGIES.765 = 65 OR DATA_TECHNOLOGIES.767 = 65 OR DATA_TECHNOLOGIES.769 = 65 OR DATA_TECHNOLOGIES.771 = 65 OR DATA_TECHNOLOGIES.773 = 65 OR DATA_TECHNOLOGIES.775 = 65 OR DATA_TECHNOLOGIES.777 = 65 OR DATA_TECHNOLOGIES.779 = 65 OR DATA_TECHNOLOGIES.781 = 65 OR DATA_TECHNOLOGIES.783 = 65 OR DATA_TECHNOLOGIES.785 = 65 OR DATA_TECHNOLOGIES.787 = 65 OR DATA_TECHNOLOGIES.789 = 65 OR DATA_TECHNOLOGIES.791 = 65 OR DATA_TECHNOLOGIES.793 = 65 OR DATA_TECHNOLOGIES.795 = 65 OR DATA_TECHNOLOGIES.797 = 65 OR DATA_TECHNOLOGIES.799 = 65 OR DATA_TECHNOLOGIES.801 = 65 OR DATA_TECHNOLOGIES.803 = 65 OR DATA_TECHNOLOGIES.805 = 65 OR DATA_TECHNOLOGIES.807 = 65 OR DATA_TECHNOLOGIES.809 = 65 OR DATA_TECHNOLOGIES.811 = 65 OR DATA_TECHNOLOGIES.813 = 65 OR DATA_TECHNOLOGIES.815 = 65 OR DATA_TECHNOLOGIES.817 = 65 OR DATA_TECHNOLOGIES.819 = 65 OR DATA_TECHNOLOGIES.821 = 65 OR DATA_TECHNOLOGIES.823 = 65 OR DATA_TECHNOLOGIES.825 = 65 OR DATA_TECHNOLOGIES.827 = 65 OR DATA_TECHNOLOGIES.829 = 65 ). COMPUTE Data_Tech_Detect_65 = 1. ELSE. COMPUTE Data_Tech_Detect_65 = 0. END IF. VARIABLE LABELS Data_Tech_Detect_65 "Data Technology Detected (Item 65 -- Kissmetrics)". EXECUTE. ===================== 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 |
I would underscore Rich's comment, " I do want to suggest that you look at your eventual ends, and find something different to do. "9500 variables" are seldom a useful starting set. " This sounds like a very awkward way to arrange the data. Maybe something better can be suggested if you can explain your goals. On Wed, Sep 5, 2018 at 12:15 PM Rich Ulrich <[hidden email]> wrote:
|
Administrator
|
In reply to this post by Launce Weber
Please provide a description of the desired outcome of this data processing
exercise. What do you think you can do with those 9000 or more dummy variables? I am 99.99% certain that you are completely off track with your current approach. ----- 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?" -- 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
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?" |
Administrator
|
In reply to this post by Rich Ulrich
Close Rich but broken..
VECTOR Data_Tech_Detect( 9500,F1) . VECTOR Data_Technologies= Data_Technologies_1 to Data_Technologies_839. "I think I would have renamed my original 1-830 into Tech001 to Tech415, TechNam001 to TechNam415, to provide data so that the VECTOR is visibly of the right dimension. " Ditto! [untested] RECODE Data_Tech_Detect_1 to Data_Tech_Detect_9500(ELSE=0). LOOP #i= 1 to 415 . COMPUTE Data_Tech_Detect(Data_Technologies(#i)) = 1. End LOOP. Need to do the "text field" also Rich Ulrich wrote > Rather than searching, the infinitely faster procedure is to do the > assignments directly. But I do want to > > suggest that you look at your eventual ends, and find something different > to do. "9500 variables" are > > seldom a useful starting set. > > > That is - directly - initialize all of them to zero, and set the ones that > occur, using VECTOR in each of the > > two ways it can be used, to make new variables and to describe existing > variables. > > VECTOR Data_Tech_Detect( 1 to 9500) . > > VECTOR Data_Technologies= Data_Technologies_1 to Data_Technologies_839. > > > It is not clear what you did to rearrange variables. My line above is > correct if you did rearrange with > > the original names, so that consecutive variables do not have consecutive > names. > > > I think I would have renamed my original 1-830 into Tech001 to Tech415, > TechNam001 to TechNam415, > > to provide data so that the VECTOR is visibly of the right dimension. > > > [untested] > > RECODE Data_Tech_Detect_1 to Data_Tech_Detect_9500(ELSE=0). > > LOOP for #i= 1 to 415 . > > COMPUTE Data_Tech_Detect(Data_Technologies(#i)) = 1. > > End Loop. > > * * * ALSO * * * > > As to your original code, those hundreds of lines in your example can be > replaced by one > > COMPUTE Data_Tech_Detect_65 = ANY(65, Data_Technologies_1 to > Data_Technologies_839). > > > ANY(VorC, VorC_list) returns 0 or 1 for "No" or "Yes", describing > whether the variable or constant > > "VorC" has any match in the list of variables or constants, "VorC_list. > It is a very useful function. > > > -- > > Rich Ulrich > > > > SNIP long post. ----- 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?" -- 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
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?" |
Free forum by Nabble | Edit this page |