|
Hi listers:
Could someone fix the problem for me? Many thanks. Amy Hsieh **ICD-9-CM Diagnostic Coding algorithms for selecting hematologic malignancies**. **Set new variable to count=0 (rather than missing)**. compute nhl=0. compute hd=0. compute mm=0. compute pcl=0. compute ipn=0. compute mds=0. compute acll=0. compute cll=0. compute acml =0. compute cml=0. compute acl=0. compute other=0. compute gs=0. compute hm_type=0. execute. **Create flag variables for each type of procedure**. Do REPEAT dx = icd9cd TO icd9cd4. VECTOR dx = icd9cd TO icd9cd4. LOOP #d = 1 to 5. + IF (dx= '20020', '20021', '20022', '20023', '20024', '20025', '20026' , '20027', '20028', '20080', '20081', '20082', '20083', '20084', '20085', '20086', '20087', '20088', '20200', '20201', '20202', '20203', '20204', '20205', '20206', '20207', '20208', '20210', '20211', '20212', '20213', '20214', '20215', '20216', '20217', '20218', '20220', '20221', '20222', '20223', '20224', '20225', '20226', '20227', '20228', '20230', '20231', '20232', '20233', '20234', '20235', '20236', '20237', '20238', '20240', '20241', '20242', '20243', '20244', '20245', '20246', '20247', '20248', '20250', '20251', '20252', '20253', '20254', '20255', '20256', '20257', '20258', '20260' , '20261', '20262', '20263', '20264', '20265', '20266', '20267', '20268', '20280', '20281', '20282', '20283', '20284', '20285', '20286', '20287', '20288', '20290', '20291', '20292', '20293', '20294', '20295', '20296', '20297', '20298') nhl=1. + IF (dx= '20148', '20150', '20151', '20152', '20153', '20154', '20155', '20156', '20157', '20158', '20160', '20161', '20162', '20163', '20164', '20165', '20166', '20167', '20168', '20170', '20171', '20172', '20173', '20174', '20175', '20176', '20177', '20178', '20190', '20191', '20192', '20193', '20194', '20195', '20196', '20197', '20198') hd=1. + IF (dx= '20300', '20301') mm=1. + IF (dx= '20310', '20311') pcl=1. + IF (dx= '20380', '20381') ipn=1. + IF (dx= '20400', '20401') acll=1. + IF (dx= '20410', '20411') cll=1. + IF (dx= '20500', '20501', '20530', '20531', '20600', '20601') acml=1. + IF (dx= '20510', '20511') cml=1. + IF (dx= '20590', '20591', '20890') other=1. + IF (dx= '20800', '20801') acl=1. + IF (dx= '20530', '20531') gs=1. + IF (dx= '2387') mds=1. END REPEAT. END LOOP. EXECUTE. **Create one variable reflecting all BMT types **. IF nhl = 1 hm_type = 1. IF hd = 1 hm_type = 2. IF acll = 1 hm_type = 3. IF cll = 1 hm_type = 4. IF acml = 1 hm_type = 5. IF cml = 1 hm_type = 6. IF acl = 1 hm_type = 7. IF pcl = 1 hm_type = 8. IF other = 1 hm_type = 9. IF mm = 1 hm_type = 10. IF mds = 1 hm_type = 11. IF ipn = 1 hm_type = 12. IF gs = 1 hm_type = 13. FREQUENCIES VARIABLES = hm_type /ORDER = ANALYSIS. Error # 4026 in column 19. Text: , An expression contains a misplaced comma. Check the expression for omitted or extra operands, operators, and parentheses. Also check for a number specified with a comma as the decimal delimiter. Commas cannot be used as decimal delimiters in transformations. This command not executed. ===================== 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 |
|
At 02:05 PM 10/29/2008, Suh-Ing Amy Hsieh wrote that the code summarized below:
>[... initializations...] >Do REPEAT dx = icd9cd TO icd9cd4. >VECTOR dx = icd9cd TO icd9cd4. >LOOP #d = 1 to 5. >[... many tests omitted...] >+ IF (dx= '20300', '20301') mm=1. >+ IF (dx= '20310', '20311') pcl=1. >+ IF (dx= '20380', '20381') ipn=1. >+ IF (dx= '20400', '20401') acll=1. >+ IF (dx= '20410', '20411') cll=1. >+ IF (dx= '20500', '20501', '20530', '20531', '20600', '20601') acml=1. >+ IF (dx= '20510', '20511') cml=1. >+ IF (dx= '20590', '20591', '20890') other=1. >+ IF (dx= '20800', '20801') acl=1. >+ IF (dx= '20530', '20531') gs=1. >+ IF (dx= '2387') mds=1. >END REPEAT. >END LOOP. gives error message >Error # 4026 in column 19. Text: , >An expression contains a misplaced comma. Check the expression for omitted >or extra operands, operators, and parentheses. Also check for a number >specified with a comma as the decimal delimiter. Commas cannot be used as >decimal delimiters in transformations. This command not executed. You have three syntax errors. Together, they seem to have confused the SPSS syntax analyzer to where it couldn't give a clear error message. First, expressions like "(dx= '20300', '20301')" (or, of course, ones with more categories) are syntactically invalid. IF "dx" WERE A VARIABLE (see below), the correct equivalent form would be "ANY(dx,'20300','20301')" so the whole statement would be, + IF ANY(dx,'20300', '20301') mm=1. SECOND, in your code, "dx" is >not< a variable; it's a vector, and must be used only with an index: + IF ANY(dx(#d),'20300', '20301') mm=1. THIRD, you have both a LOOP and a DO REPEAT. SPSS appears to have no idea what to make of those, especially as they aren't nested properly: >Do REPEAT dx = icd9cd TO icd9cd4. >VECTOR dx = icd9cd TO icd9cd4. >LOOP #d = 1 to 5. >[... tests ...] >END REPEAT. >END LOOP. It's simplest to use DO REPEAT; do >not< use VECTOR or LOOP; and use ANY. Like this, though not tested (and note that now "dx" does not need an index): [... initializations...] Do REPEAT dx = icd9cd TO icd9cd4. [... many tests omitted...] + IF ANY(dx(#d),'20300', '20301') mm=1. [... further tests ...] END REPEAT. Finally, you have two EXECUTE statements. Neither is necessary, and they may slow your code significantly if your file is large. ===================== 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 |
| Free forum by Nabble | Edit this page |
