|
Hi SPSS Listers:
Sorry about this long syntax. Any suggestions? Thanks. Amy **ICD9CM algorithm using HCUP 3.3 version of Elixhauser comorbidity (2008)**. **Set new variable to count=0 (rather than missing)**. COMPUTE chf=0. COMPUTE valve=0. COMPUTE pulmcirc=0. COMPUTE perivasc=0. COMPUTE htn=0. COMPUTE htncx=0. COMPUTE htnpreg=0. COMPUTE htnwochf =0. COMPUTE htnwchf=0. COMPUTE hrenworf=0. COMPUTE hrenwrf=0. COMPUTE hhrwohrf=0. COMPUTE hhrwchf=0. COMPUTE hhrwrf=0. COMPUTE hhrwhrf=0. COMPUTE ohtnpreg=0. COMPUTE para=0. COMPUTE neuro=0. COMPUTE chrnlung=0. COMPUTE dm=0. COMPUTE dmcx=0. COMPUTE hypothy=0. COMPUTE renlfail=0. COMPUTE liver=0. COMPUTE ulcer=0. COMPUTE aids=0. COMPUTE lymph=0. COMPUTE mets=0. COMPUTE tumor=0. COMPUTE arth=0. COMPUTE coag=0. COMPUTE obese=0. COMPUTE wghtloss=0. COMPUTE lytes=0. COMPUTE bldloss=0. COMPUTE anemdef=0. COMPUTE alcohol=0. COMPUTE drug=0. COMPUTE psych=0. COMPUTE depress=0. COMPUTE ECI=0. EXECUTE. **Create flag variables for each ICD9CM_code**. DO REPEAT dx=icd9cd TO icd9cd4. + if any(dx, '39891', '4280', '4281', '4289') chf = 1. + if any(dx, '09320', '09321', '09322', '09323', '09324', '3940', '3941', '3942', '3949', '3950', '3951', '3952', '3959', '3960', '3961', '3962', '3963', '3968', '3969', '3970', '3971', '3979', '4240', '4241', '4242', '4243', '42490', '42491', '42499', '7463', '7464', '7465', '7466', 'V422', 'V433') valve=1. + if any(dx, '41511', '41519', '4160', '4161', '4168', '4169', '4179') pulmcirc=1. + if any(dx, '4400', '4401', '44020', '44021', '44022', '44023', '44024', '44029', '44030', '44031', '44032', '4408', '4409', '44100', '44101', '44102', '44103', '4411', '4412', '4413', '4414', '4415', '4415', '4416', '4417', '4419', '4420', '4421', '4422', '4423', '44281', '44282', '44283', '44284', '44289', '4429', '4431', '44381', '44389', '4439', '44421', '44422', '4471', '449', '5571', '5579', 'V434') perivasc=1. + if any(dx, '4011', '4019', '64200', '64201', '64202', '64203', '64204') htn=1. + if any(dx, '4010', '4372') htncx=1. + if any(dx, '64220', '64221', '64222', '64223', '64224') htnpreg=1. + if any(dx, '40200', '40210', '40290', '40509', '40519', '40599') htnwochf=1. + if any(dx, '40201', '40211', '40291') htnwchf=1. + if any(dx, '40300', '40310', '40390', '40501', '40511', '40591', '64210', '64211', '64212', '64213', '64214') hrenworf=1. + if any(dx, '40301', '40311', '40391') hrenwrf=1. + if any(dx, '40400', '40410', '40490') hhrwohrf=1. + if any(dx, '40401', '40411', '40491') hhrwchf=1. + if any(dx, '40402', '40412', '40492') hhrwrf=1. + if any(dx, '40403', '40413', '40493') hhrwhrf=1. + if any(dx, '64270', '64271', '64272', '64273', '64274', '64290', '64291', '64292', '64293', '64294') ohtnpreg=1. + if any(dx, '34200', '34201', '34202', '34210', '34211', '34212', '34280', '34281', '34282', '34290', '34291', '34292', '3430', '3431', '3432', '3433', '3434', '3438', '3439', '34400', '34401', '34402', '34403', '34404', '34409', '3441', '3442', '34430', '34431', '34432', '34440', '34441', '34442', '3445', '34460', '34461', '34481', '34489', '3449', '43820', '43821', '43822', '43830', '43831', '43832', '43840', '43841', '43842', '43850', '43851', '43852', '43853') para=1. + if any(dx, '3300', '3301', '3302', '3303', '3308', '3309', '3310', '3311', '3312', '3313', '3314', '3317', '33181', '33189', '3319', '3320', '3334', '3335', '3337', '33371', '33372', '33379', '33385', '33394', '3340', '3341', '3342', '3343', '3344', '3348', '3349', '3350', '33510', '33511', '33519', '33520', '33521', '33522', '33523', '33524', '33529', '3358', '3359', '3380', '340', '3411', '3418', '3419', '34500', '34501', '34510', '34511', '3452', '3453', '34540', '34541', '34550', '34551', '34560', '34561', '34570', '34571', '34580', '34581', '34590', '34591', '3470', '34700', '34701', '34710', '34711', '64940', '64941', '64942', '64943', '64944', '7687', '7803', '78031', '78032', '78039', '78097', '7843') neuro=1. + if any(dx, '490', '4910', '4911', '49120', '49121', '4918', '4919', '4920', '4928', '49300', '49301', '49302', '49310', '49311', '49312', '49320', '49321', '49322', '49390', '49391', '49392', '4940', '4941', '4950', '4951', '4952', '4953', '4954', '4955', '4956', '4957', '4958', '4959', '496', '500', '501', '502', '503', '504', '505', '5064') chrnlung=1. + if any(dx, '25000', '25001', '25002', '25003', '25010', '25011', '25012', '25013', '25020', '25021', '25022', '25023', '25030', '25031', '25032', '25033', '64800', '64801', '64802', '64803', '64804') dm=1. + if any(dx, '25040', '25041', '25042', '25043', '25050', '25051', '25052', '25053', '25060', '25061', '25062', '25063', '25070', '25071', '25072', '25073', '25080', '25081', '25082', '25083', '25090', '25091', '25092', '25093', '7751') dmcx=1. + if any(dx, '243', '2440', '2441', '2442', '2448', '2449') hypothy=1. + if any(dx, '585', '5853', '5854', '5855', '5856', '5859', '586', 'V420', 'V451', 'V560', 'V561', 'V562', 'V5631', 'V5632', 'V568') renlfail=1. + if any(dx, '07022', '07023', '07032', '07033', '07044', '07054', '4560', '4561', '45620', '45621', '5710', '5712', '5713', '57140', '57141', '57149', '5715', '5716', '5718', '5719', '5723', '5728', 'V427') liver=1. + if any(dx, '53141', '53151', '53161', '53170', '53171', '53191', '53241', '53251', '53261', '53270', '53271', '53291', '53341', '53351', '53361', '53370', '53371', '53391', '53441', '53451', '53461', '53470', '53471', '53491') ulcer=1. + if any(dx, '042', '0420', '0421', '0422', '0429', '0430', '0431', '0433', '0439', '0440', '0449') aids=1. + if any(dx, '20000', '20001', '20002', '20003', '20004', '20005', '20006', '20007', '20008', '20010', '20011', '20012', '20013', '20014', '20015', '20016', '20017', '20018', '20020', '20021', '20022', '20023', '20024', '20025', '20026', '20027', '20028', '20080', '20081', '20082', '20083', '20084', '20085', '20086', '20087', '20088', '20100', '20101', '20102', '20103', '20104', '20105', '20106', '20107', '20108', '20110', '20111', '20112', '20113', '20114', '20115', '20116', '20117', '20118', '20120', '20121', '20122', '20123', '20124', '20125', '20126', '20127', '20128', '20140', '20141', '20142', '20143', '20144', '20145', '20146', '20147', '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', '20171', '20178', '20190', '20191', '20192', '20193', '20194', '20195', '20196', '20197', '20198', '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', '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', '20300', '20301', '2038', '20380', '20381', '2386', '2733') lymph=1. + if any(dx, '1960', '1961', '1962', '1963', '1965', '1966', '1968', '1969', '1970', '1971', '1972', '1973', '1974', '1975', '1976', '1977', '1978', '1980', '1981', '1982', '1983', '1984', '1985', '1986', '1987', '19881', '19882', '19889', '1990', '1991', '7895', '78951') mets=1. + if any(dx= '1400', '1401', '1403', '1404', '1405', '1406', '1408', '1409', '1411', '1412', '1413', '1414', '1415', '1416', '1418', '1419', '1420', '1421', '1422', '1428', '1429', '1430', '1431', '1438', '1439', '1440', '1441', '1448', '1449', '1450', '1451', '1452', '1453', '1454', '1455', '1456', '1458', '1459', '1460', '1461', '1462', '1463', '1464', '1465', '1466', '1467', '1468', '1469', '1470', '1471', '1472', '1473', '1478', '1479', '1480', '1481', '1482', '1483', '1488', '1489', '1490', '1491', '1498', '1499', '1500', '1501', '1502', '1503', '1504', '1505', '1508', '1509', '1510', '1511', '1512', '1513', '1514', '1515', '1516', '1518', '1519', '1520', '1521', '1522', '1523', '1528', '1529', '1530', '1531', '1532', '1533', '1534', '1535', '1536', '1537', '1538', '1539', '1540', '1541', '1542', '1543', '1548', '1550', '1551', '1552', '1560', '1561', '1562', '1568', '1569', '1570', '1571', '1572', '1573', '1574', '1578', '1579', '1580', '1588', '1589', '1590', '1591', '1598', '1599', '1600', '1601', '1602', '1603', '1604', '1605', '1608', '1609', '1610', '1611', '1612', '1613', '1618', '1619', '1620', '1622', '1623', '1624', '1625', '1628', '1629', '1630', '1631', '1638', '1639', '1640', '1641', '1642', '1643', '1648', '1649', '1650', '1658', '1659', '1700', '1701', '1702', '1703', '1704', '1705', '1706', '1707', '1708', '1709', '1710', '1712', '1713', '1714', '1715', '1716', '1717', '1718', '1719', '1720', '1721', '1722', '1723', '1724', '1725', '1726', '1727', '1728', '1729', '1740', '1741', '1742', '1743', '1744', '1745', '1746', '1748', '1749', '1750', '1759', '179', '1800', '1801', '1808', '1809', '181', '1820', '1821', '1828', '1830', '1832', '1833', '1834', '1835', '1838', '1839', '1840', '1841', '1842', '1843', '1844', '1848', '1849', '185', '1860', '1869', '1871', '1872', '1873', '1874', '1875', '1876', '1877', '1878', '1879', '1880', '1881', '1882', '1883', '1884', '1885', '1886', '1887', '1888', '1889', '1890', '1891', '1892', '1893', '1894', '1898', '1899', '1900', '1901', '1902', '1903', '1904', '1905', '1906', '1907', '1908', '1910', '1911', '1912', '1913', '1914', '1915', '1916', '1917', '1918', '1919', '1920', '1921', '1922', '1923', '1928', '1929', '193', '1940', '1941', '1943', '1944', '1945', '1946', '1948', '1949', '1950', '1950', '1951'. '1952', '1953', '1954', '1955', '1958', '2580', '25801', '25802', '25803') tumor=1. + if any(dx, '7010', '7100', '7101', '7102', '7103', '7104', '7105', '7108', '7109', '7140', '7141', '7142', '71430', '71431', '71432', '71433', '7144', '71481', '71489', '7149', '7200', '7201', '7202', '72081', '72089', '7209', '725') arth=1. + if any(dx, '2860', '2861', '2862', '2863', '2864', '2865', '2866', '2867', '2869', '2871', '2873', '2874', '2875', '64390', '64391', '64393') coag=1. + if any(dx, '2780', '27800', '27801', '64910', '64911', '64912', '64913', '64914', 'V8530', 'V8531', 'V8532', 'V8533', 'V8534', 'V8535', 'V8536', 'V8537', 'V8538', 'V8539', 'V854', 'V8554', '79391') obese=1. + if any(dx, '260', '261', '262', '2630', '2631', '2632', '2638', '2639', '78321', '78322') wghtloss=1. + if any(dx, '2760', '2761', '2762', '2763', '2764', '2765', '2766', '2767', '2768', '2769') lytes=1. + if any(dx, '2800', '64820', '64821', '64822', '64823', '64824') bldloss=1. + if any(dx, '2801', '2808', '2809', '2810', '2811', '2812', '2813', '2814', '2818', '2819', '28521', '28522', '28529', '2859') anemdef=1. + if any(dx, '2910', '2911', '2912', '2913', '2915', '2918', '29181', '29182', '29189', '2919', '30300', '30301', '30302', '30303', '30390', '30391', '30392', '30393', '30500', '30501', '30502', '30503') alcohol=1. + if any(dx, '2920', '29282', '29283', '29284', '29289', '2929', '30400', '30401', '30402', '30403', '30410', '30411', '30412', '30413', '30420', '30421', '30423', '30430', '3041', '30432', '30433', '30440', '30441', '30442', '30443', '30450', '30451', '30452', '30453', '30460', '30461', '30462', '30463', '30470', '30471', '30472', '30473', '30480', '30481', '30482', '30483', '30490', '30491', '30492', '30493', '30520', '30521', '30522', '30523', '30530', '30531', '30532', '30533', '30540', '30541', '30542', '30543', '30550', '30551', '30552', '30553', '30560', '30561', '30562', '30563', '30570', '30571', '30572', '30573', '30580', '30581', '30582', '30583', '30590', '30591', '30592', '30593', '64830', '64831', '64832', '64833', '64834') drug=1. + if any(dx, '29500', '29501', '29502', '29503', '29504', '29505', '29510', '29511', '29512', '29513', '29514', '29515', '29520', '29521', '29522', '29523', '29524', '29525', '29530', '29531', '29532', '29533', '29534', '29535', '29540', '29541', '29542', '29543', '29544', '29545', '29550', '29551', '29552', '29553', '29554', '29555', '29560', '29561', '29562', '29563', '29564', '29565', '29570', '29571', '29572', '29573', '29574', '29575', '29580', '29581', '29582', '29583', '29584', '29585', '29590', '29591', '29592', '29593', '29594', '29595', '29600', '29601', '29602', '29603', '29604', '29605', '29606', '29610', '29611', '29612', '29613', '29614', '29615', '29616', '29620', '29621', '29622', '29623', '29624', '29625', '29626', '29630', '29631', '29632', '29633', '29634', '29635', '29636', '29640', '29641', '29642', '29643', '29644', '29645', '29646', '29650', '29651', '29652', '29653', '29654', '29655', '29656', '29660', '29661', '29662', '29663', '29664', '29665', '29666', '2967', '29680', '29681', '29682', '29689', '29690', '29699', '2970', '2971', '2972', '2973', '2978', '2979', '2980', '2981', '2982', '2983', '2984', '2988', '2989', '29910', '29911') psych=1. + if any(dx, '3004', '30112', '3090', '3091', '311') depress=1. END REPEAT. **Create one variable reflecting comorbidity**. if chf=1 ECI=1. if valve=1 ECI=1. if pulmcirc=1 ECI=1. if perivasc=1 ECI=1. if htn=1 ECI=1. if htncx=1 ECI=1. if htnpreg=1 ECI=1. if htnwochf=1 ECI=1. if htnwchf=1 ECI=1. if hrenworf=1 ECI=1. if hrenwrf=1 ECI=1. if hhrwohrf=1 ECI=1. if hhrwchf=1 ECI=1. if hhrwrf=1 ECI=1. if hhrwhrf=1 ECI=1. if ohtnpreg=1 ECI=1. if para=1 ECI=1. if neuro=1 ECI=1. if chrnlung=1 ECI=1. if dm=1 ECI=1. if dmcx=1 ECI=1. if hypothy=1 ECI=1. if renlfail=1 ECI=1. if liver=1 ECI=1. if ulcer=1 ECI=1. if aids=1 ECI=1. if lymph=1 ECI=0. if mets=1 ECI=0. if tumor=1 ECI=0. if arth=1 ECI=1. if coag=1 ECI=1. if obese=1 ECI=1. if wghtloss=1 ECI=1. if lytes=1 ECI=1. if bldloss=1 ECI=1. if anemdef=1 ECI=1. if alcohol=1 ECI=1. if drug=1 ECI=1. if psych=1 ECI=1. if depress=1 ECI=1. **Initialize hypertension, CHF, and renal comorbidity flags to 1 using the detail hypertension flags**. IF htnpreg = 1 htncx = 1. IF htnwochf = 1 htncx = 1. DO IF htnwchf = 1. COMPUTE htncx = 1. COMPUTE chf = 1. END IF. IF hrenworf = 1 THEN htncx = 1. Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. DO IF hrenwrf = 1. COMPUTE htncx = 1. COMPUTE renlfail = 1. END IF. IF hhrwohrf = 1 THEN htncx = 1. Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. DO IF hhrwchf = 1. COMPUTE htncx = 1. COMPUTE chf = 1. END IF. DO IF hhrwrf = 1. COMPUTE htncx = 1. COMPUTE renlfail = 1. END IF. DO IF hhrwhrf = 1. COMPUTE htncx = 1. COMPUTE chf = 1. COMPUTE renlfail = 1. END IF. IF ohtnpreg = 1 THEN htncx = 1. Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. **Set up code to only count the more severe comorbidity**. IF htncx = 1 htn = 0. IF mets = 1 tumor = 0. IF dmcx = 1 dm = 0. FREQUENCIES VARIABLES=chf valve pulmcirc perivasc htn htncx htnpreg htnwochf htnwhf hrenworf hrenwrf hhrwohrf hhrwchf hhrwrf hhrwhrf ohtnpreg para neuro chrnlung dm dmcx hypothy renlfail liver ulcer aids lymph mets tumor arth coag obese wghtloss lytes bldloss anemdef alcohol drug psych depress ECI /ORDER= ANALYSIS . Warnings Text: htnwhf An undefined variable name, or a scratch or system variable was specified in a variable list which accepts only standard variables. Check spelling and verify the existence of this variable. 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 |
|
Sorry to add and resend one more error that I cannot figure out.
Amy ---------- Forwarded Message ----------- From: "Suh-Ing Amy Hsieh" <[hidden email]> To: [hidden email]. Sent: Thu, 30 Oct 2008 19:44:06 -0400 Subject: Errors of comorbidity's syntax Hi SPSS Listers: Sorry about this long syntax. Any suggestions? Thanks. Amy **ICD9CM algorithm using HCUP 3.3 version of Elixhauser comorbidity (2008)**. **Set new variable to count=0 (rather than missing)**. COMPUTE chf=0. COMPUTE valve=0. COMPUTE pulmcirc=0. COMPUTE perivasc=0. COMPUTE htn=0. COMPUTE htncx=0. COMPUTE htnpreg=0. COMPUTE htnwochf =0. COMPUTE htnwchf=0. COMPUTE hrenworf=0. COMPUTE hrenwrf=0. COMPUTE hhrwohrf=0. COMPUTE hhrwchf=0. COMPUTE hhrwrf=0. COMPUTE hhrwhrf=0. COMPUTE ohtnpreg=0. COMPUTE para=0. COMPUTE neuro=0. COMPUTE chrnlung=0. COMPUTE dm=0. COMPUTE dmcx=0. COMPUTE hypothy=0. COMPUTE renlfail=0. COMPUTE liver=0. COMPUTE ulcer=0. COMPUTE aids=0. COMPUTE lymph=0. COMPUTE mets=0. COMPUTE tumor=0. COMPUTE arth=0. COMPUTE coag=0. COMPUTE obese=0. COMPUTE wghtloss=0. COMPUTE lytes=0. COMPUTE bldloss=0. COMPUTE anemdef=0. COMPUTE alcohol=0. COMPUTE drug=0. COMPUTE psych=0. COMPUTE depress=0. COMPUTE ECI=0. EXECUTE. **Create flag variables for each ICD9CM_code**. DO REPEAT dx=icd9cd TO icd9cd4. + if any(dx, '39891', '4280', '4281', '4289') chf = 1. + if any(dx, '09320', '09321', '09322', '09323', '09324', '3940', '3941', '3942', '3949', '3950', '3951', '3952', '3959', '3960', '3961', '3962', '3963', '3968', '3969', '3970', '3971', '3979', '4240', '4241', '4242', '4243', '42490', '42491', '42499', '7463', '7464', '7465', '7466', 'V422', 'V433') valve=1. + if any(dx, '41511', '41519', '4160', '4161', '4168', '4169', '4179') pulmcirc=1. + if any(dx, '4400', '4401', '44020', '44021', '44022', '44023', '44024', '44029', '44030', '44031', '44032', '4408', '4409', '44100', '44101', '44102', '44103', '4411', '4412', '4413', '4414', '4415', '4415', '4416', '4417', '4419', '4420', '4421', '4422', '4423', '44281', '44282', '44283', '44284', '44289', '4429', '4431', '44381', '44389', '4439', '44421', '44422', '4471', '449', '5571', '5579', 'V434') perivasc=1. + if any(dx, '4011', '4019', '64200', '64201', '64202', '64203', '64204') htn=1. + if any(dx, '4010', '4372') htncx=1. + if any(dx, '64220', '64221', '64222', '64223', '64224') htnpreg=1. + if any(dx, '40200', '40210', '40290', '40509', '40519', '40599') htnwochf=1. + if any(dx, '40201', '40211', '40291') htnwchf=1. + if any(dx, '40300', '40310', '40390', '40501', '40511', '40591', '64210', '64211', '64212', '64213', '64214') hrenworf=1. + if any(dx, '40301', '40311', '40391') hrenwrf=1. + if any(dx, '40400', '40410', '40490') hhrwohrf=1. + if any(dx, '40401', '40411', '40491') hhrwchf=1. + if any(dx, '40402', '40412', '40492') hhrwrf=1. + if any(dx, '40403', '40413', '40493') hhrwhrf=1. + if any(dx, '64270', '64271', '64272', '64273', '64274', '64290', '64291', '64292', '64293', '64294') ohtnpreg=1. + if any(dx, '34200', '34201', '34202', '34210', '34211', '34212', '34280', '34281', '34282', '34290', '34291', '34292', '3430', '3431', '3432', '3433', '3434', '3438', '3439', '34400', '34401', '34402', '34403', '34404', '34409', '3441', '3442', '34430', '34431', '34432', '34440', '34441', '34442', '3445', '34460', '34461', '34481', '34489', '3449', '43820', '43821', '43822', '43830', '43831', '43832', '43840', '43841', '43842', '43850', '43851', '43852', '43853') para=1. + if any(dx, '3300', '3301', '3302', '3303', '3308', '3309', '3310', '3311', '3312', '3313', '3314', '3317', '33181', '33189', '3319', '3320', '3334', '3335', '3337', '33371', '33372', '33379', '33385', '33394', '3340', '3341', '3342', '3343', '3344', '3348', '3349', '3350', '33510', '33511', '33519', '33520', '33521', '33522', '33523', '33524', '33529', '3358', '3359', '3380', '340', '3411', '3418', '3419', '34500', '34501', '34510', '34511', '3452', '3453', '34540', '34541', '34550', '34551', '34560', '34561', '34570', '34571', '34580', '34581', '34590', '34591', '3470', '34700', '34701', '34710', '34711', '64940', '64941', '64942', '64943', '64944', '7687', '7803', '78031', '78032', '78039', '78097', '7843') neuro=1. + if any(dx, '490', '4910', '4911', '49120', '49121', '4918', '4919', '4920', '4928', '49300', '49301', '49302', '49310', '49311', '49312', '49320', '49321', '49322', '49390', '49391', '49392', '4940', '4941', '4950', '4951', '4952', '4953', '4954', '4955', '4956', '4957', '4958', '4959', '496', '500', '501', '502', '503', '504', '505', '5064') chrnlung=1. + if any(dx, '25000', '25001', '25002', '25003', '25010', '25011', '25012', '25013', '25020', '25021', '25022', '25023', '25030', '25031', '25032', '25033', '64800', '64801', '64802', '64803', '64804') dm=1. + if any(dx, '25040', '25041', '25042', '25043', '25050', '25051', '25052', '25053', '25060', '25061', '25062', '25063', '25070', '25071', '25072', '25073', '25080', '25081', '25082', '25083', '25090', '25091', '25092', '25093', '7751') dmcx=1. + if any(dx, '243', '2440', '2441', '2442', '2448', '2449') hypothy=1. + if any(dx, '585', '5853', '5854', '5855', '5856', '5859', '586', 'V420', 'V451', 'V560', 'V561', 'V562', 'V5631', 'V5632', 'V568') renlfail=1. + if any(dx, '07022', '07023', '07032', '07033', '07044', '07054', '4560', '4561', '45620', '45621', '5710', '5712', '5713', '57140', '57141', '57149', '5715', '5716', '5718', '5719', '5723', '5728', 'V427') liver=1. + if any(dx, '53141', '53151', '53161', '53170', '53171', '53191', '53241', '53251', '53261', '53270', '53271', '53291', '53341', '53351', '53361', '53370', '53371', '53391', '53441', '53451', '53461', '53470', '53471', '53491') ulcer=1. + if any(dx, '042', '0420', '0421', '0422', '0429', '0430', '0431', '0433', '0439', '0440', '0449') aids=1. + if any(dx, '20000', '20001', '20002', '20003', '20004', '20005', '20006', '20007', '20008', '20010', '20011', '20012', '20013', '20014', '20015', '20016', '20017', '20018', '20020', '20021', '20022', '20023', '20024', '20025', '20026', '20027', '20028', '20080', '20081', '20082', '20083', '20084', '20085', '20086', '20087', '20088', '20100', '20101', '20102', '20103', '20104', '20105', '20106', '20107', '20108', '20110', '20111', '20112', '20113', '20114', '20115', '20116', '20117', '20118', '20120', '20121', '20122', '20123', '20124', '20125', '20126', '20127', '20128', '20140', '20141', '20142', '20143', '20144', '20145', '20146', '20147', '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', '20171', '20178', '20190', '20191', '20192', '20193', '20194', '20195', '20196', '20197', '20198', '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', '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', '20300', '20301', '2038', '20380', '20381', '2386', '2733') lymph=1. + if any(dx, '1960', '1961', '1962', '1963', '1965', '1966', '1968', '1969', '1970', '1971', '1972', '1973', '1974', '1975', '1976', '1977', '1978', '1980', '1981', '1982', '1983', '1984', '1985', '1986', '1987', '19881', '19882', '19889', '1990', '1991', '7895', '78951') mets=1. + if any(dx= '1400', '1401', '1403', '1404', '1405', '1406', '1408', '1409', '1411', '1412', '1413', '1414', '1415', '1416', '1418', '1419', '1420', '1421', '1422', '1428', '1429', '1430', '1431', '1438', '1439', '1440', '1441', '1448', '1449', '1450', '1451', '1452', '1453', '1454', '1455', '1456', '1458', '1459', '1460', '1461', '1462', '1463', '1464', '1465', '1466', '1467', '1468', '1469', '1470', '1471', '1472', '1473', '1478', '1479', '1480', '1481', '1482', '1483', '1488', '1489', '1490', '1491', '1498', '1499', '1500', '1501', '1502', '1503', '1504', '1505', '1508', '1509', '1510', '1511', '1512', '1513', '1514', '1515', '1516', '1518', '1519', '1520', '1521', '1522', '1523', '1528', '1529', '1530', '1531', '1532', '1533', '1534', '1535', '1536', '1537', '1538', '1539', '1540', '1541', '1542', '1543', '1548', '1550', '1551', '1552', '1560', '1561', '1562', '1568', '1569', '1570', '1571', '1572', '1573', '1574', '1578', '1579', '1580', '1588', '1589', '1590', '1591', '1598', '1599', '1600', '1601', '1602', '1603', '1604', '1605', '1608', '1609', '1610', '1611', '1612', '1613', '1618', '1619', '1620', '1622', '1623', '1624', '1625', '1628', '1629', '1630', '1631', '1638', '1639', '1640', '1641', '1642', '1643', '1648', '1649', '1650', '1658', '1659', '1700', '1701', '1702', '1703', '1704', '1705', '1706', '1707', '1708', '1709', '1710', '1712', '1713', '1714', '1715', '1716', '1717', '1718', '1719', '1720', '1721', '1722', '1723', '1724', '1725', '1726', '1727', '1728', '1729', '1740', '1741', '1742', '1743', '1744', '1745', '1746', '1748', '1749', '1750', '1759', '179', '1800', '1801', '1808', '1809', '181', '1820', '1821', '1828', '1830', '1832', '1833', '1834', '1835', '1838', '1839', '1840', '1841', '1842', '1843', '1844', '1848', '1849', '185', '1860', '1869', '1871', '1872', '1873', '1874', '1875', '1876', '1877', '1878', '1879', '1880', '1881', '1882', '1883', '1884', '1885', '1886', '1887', '1888', '1889', '1890', '1891', '1892', '1893', '1894', '1898', '1899', '1900', '1901', '1902', '1903', '1904', '1905', '1906', '1907', '1908', '1910', '1911', '1912', '1913', '1914', '1915', '1916', '1917', '1918', '1919', '1920', '1921', '1922', '1923', '1928', '1929', '193', '1940', '1941', '1943', '1944', '1945', '1946', '1948', '1949', '1950', '1950', '1951'. '1952', '1953', '1954', '1955', '1958', '2580', '25801', '25802', '25803') tumor=1. + if any(dx, '7010', '7100', '7101', '7102', '7103', '7104', '7105', '7108', '7109', '7140', '7141', '7142', '71430', '71431', '71432', '71433', '7144', '71481', '71489', '7149', '7200', '7201', '7202', '72081', '72089', '7209', '725') arth=1. + if any(dx, '2860', '2861', '2862', '2863', '2864', '2865', '2866', '2867', '2869', '2871', '2873', '2874', '2875', '64390', '64391', '64393') coag=1. + if any(dx, '2780', '27800', '27801', '64910', '64911', '64912', '64913', '64914', 'V8530', 'V8531', 'V8532', 'V8533', 'V8534', 'V8535', 'V8536', 'V8537', 'V8538', 'V8539', 'V854', 'V8554', '79391') obese=1. + if any(dx, '260', '261', '262', '2630', '2631', '2632', '2638', '2639', '78321', '78322') wghtloss=1. + if any(dx, '2760', '2761', '2762', '2763', '2764', '2765', '2766', '2767', '2768', '2769') lytes=1. + if any(dx, '2800', '64820', '64821', '64822', '64823', '64824') bldloss=1. + if any(dx, '2801', '2808', '2809', '2810', '2811', '2812', '2813', '2814', '2818', '2819', '28521', '28522', '28529', '2859') anemdef=1. + if any(dx, '2910', '2911', '2912', '2913', '2915', '2918', '29181', '29182', '29189', '2919', '30300', '30301', '30302', '30303', '30390', '30391', '30392', '30393', '30500', '30501', '30502', '30503') alcohol=1. + if any(dx, '2920', '29282', '29283', '29284', '29289', '2929', '30400', '30401', '30402', '30403', '30410', '30411', '30412', '30413', '30420', '30421', '30423', '30430', '3041', '30432', '30433', '30440', '30441', '30442', '30443', '30450', '30451', '30452', '30453', '30460', '30461', '30462', '30463', '30470', '30471', '30472', '30473', '30480', '30481', '30482', '30483', '30490', '30491', '30492', '30493', '30520', '30521', '30522', '30523', '30530', '30531', '30532', '30533', '30540', '30541', '30542', '30543', '30550', '30551', '30552', '30553', '30560', '30561', '30562', '30563', '30570', '30571', '30572', '30573', '30580', '30581', '30582', '30583', '30590', '30591', '30592', '30593', '64830', '64831', '64832', '64833', '64834') drug=1. + if any(dx, '29500', '29501', '29502', '29503', '29504', '29505', '29510', '29511', '29512', '29513', '29514', '29515', '29520', '29521', '29522', '29523', '29524', '29525', '29530', '29531', '29532', '29533', '29534', '29535', '29540', '29541', '29542', '29543', '29544', '29545', '29550', '29551', '29552', '29553', '29554', '29555', '29560', '29561', '29562', '29563', '29564', '29565', '29570', '29571', '29572', '29573', '29574', '29575', '29580', '29581', '29582', '29583', '29584', '29585', '29590', '29591', '29592', '29593', '29594', '29595', '29600', '29601', '29602', '29603', '29604', '29605', '29606', '29610', '29611', '29612', '29613', '29614', '29615', '29616', '29620', '29621', '29622', '29623', '29624', '29625', '29626', '29630', '29631', '29632', '29633', '29634', '29635', '29636', '29640', '29641', '29642', '29643', '29644', '29645', '29646', '29650', '29651', '29652', '29653', '29654', '29655', '29656', '29660', '29661', '29662', '29663', '29664', '29665', '29666', '2967', '29680', '29681', '29682', '29689', '29690', '29699', '2970', '2971', '2972', '2973', '2978', '2979', '2980', '2981', '2982', '2983', '2984', '2988', '2989', '29910', '29911') psych=1. + if any(dx, '3004', '30112', '3090', '3091', '311') depress=1. END REPEAT. Error # 4007 in column 18. Text: .>The expression is incomplete. Check for missing operands, invalid operators, unmatched parentheses or excessive string length. This command not executed. **Create one variable reflecting comorbidity**. if chf=1 ECI=1. if valve=1 ECI=1. if pulmcirc=1 ECI=1. if perivasc=1 ECI=1. if htn=1 ECI=1. if htncx=1 ECI=1. if htnpreg=1 ECI=1. if htnwochf=1 ECI=1. if htnwchf=1 ECI=1. if hrenworf=1 ECI=1. if hrenwrf=1 ECI=1. if hhrwohrf=1 ECI=1. if hhrwchf=1 ECI=1. if hhrwrf=1 ECI=1. if hhrwhrf=1 ECI=1. if ohtnpreg=1 ECI=1. if para=1 ECI=1. if neuro=1 ECI=1. if chrnlung=1 ECI=1. if dm=1 ECI=1. if dmcx=1 ECI=1. if hypothy=1 ECI=1. if renlfail=1 ECI=1. if liver=1 ECI=1. if ulcer=1 ECI=1. if aids=1 ECI=1. if lymph=1 ECI=0. if mets=1 ECI=0. if tumor=1 ECI=0. if arth=1 ECI=1. if coag=1 ECI=1. if obese=1 ECI=1. if wghtloss=1 ECI=1. if lytes=1 ECI=1. if bldloss=1 ECI=1. if anemdef=1 ECI=1. if alcohol=1 ECI=1. if drug=1 ECI=1. if psych=1 ECI=1. if depress=1 ECI=1. **Initialize hypertension, CHF, and renal comorbidity flags to 1 using the detail hypertension flags**. IF htnpreg = 1 htncx = 1. IF htnwochf = 1 htncx = 1. DO IF htnwchf = 1. COMPUTE htncx = 1. COMPUTE chf = 1. END IF. IF hrenworf = 1 THEN htncx = 1. Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. DO IF hrenwrf = 1. COMPUTE htncx = 1. COMPUTE renlfail = 1. END IF. IF hhrwohrf = 1 THEN htncx = 1. Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. DO IF hhrwchf = 1. COMPUTE htncx = 1. COMPUTE chf = 1. END IF. DO IF hhrwrf = 1. COMPUTE htncx = 1. COMPUTE renlfail = 1. END IF. DO IF hhrwhrf = 1. COMPUTE htncx = 1. COMPUTE chf = 1. COMPUTE renlfail = 1. END IF. IF ohtnpreg = 1 THEN htncx = 1. Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. **Set up code to only count the more severe comorbidity**. IF htncx = 1 htn = 0. IF mets = 1 tumor = 0. IF dmcx = 1 dm = 0. FREQUENCIES VARIABLES=chf valve pulmcirc perivasc htn htncx htnpreg htnwochf htnwhf hrenworf hrenwrf hhrwohrf hhrwchf hhrwrf hhrwhrf ohtnpreg para neuro chrnlung dm dmcx hypothy renlfail liver ulcer aids lymph mets tumor arth coag obese wghtloss lytes bldloss anemdef alcohol drug psych depress ECI /ORDER= ANALYSIS . Warnings Text: htnwhf An undefined variable name, or a scratch or system variable was specified in a variable list which accepts only standard variables. Check spelling and verify the existence of this variable. This command not executed. ------- End of Forwarded Message ------- ===================== 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 |
|
Amy,
>> '1951'. '1952', '1953', '1954', '1955', '1958', '2580', I agree. This line is an error. >>Error # 4007 in column 18. Text: .>The expression is incomplete. Check for missing operands, invalid operators, unmatched parentheses or excessive string length. This command not executed. >>IF hrenworf = 1 THEN htncx = 1. >>Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. >>IF hhrwohrf = 1 THEN htncx = 1. >>Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. >>IF ohtnpreg = 1 THEN htncx = 1. >>Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. These are all left over SAS code conversion problems. Spss does not use a 'then' keyword in an if or do if structure. Take 'then' out. >>FREQUENCIES VARIABLES=chf valve pulmcirc perivasc htn htncx htnpreg htnwochf htnwhf hrenworf hrenwrf hhrwohrf hhrwchf hhrwrf hhrwhrf ohtnpreg para neuro chrnlung dm dmcx hypothy renlfail liver ulcer aids lymph mets tumor arth coag obese wghtloss lytes bldloss anemdef alcohol drug psych depress ECI /ORDER= ANALYSIS . >>Warnings Text: htnwhf An undefined variable name, or a scratch or system variable was specified in a variable list which accepts only standard variables. Check spelling and verify the existence of this variable. This has to be a typo error as 'htnwhf' does not appear anywhere in the previously listed code. Gene Maguin ===================== 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 |
|
Htnwhf is htnwchf in the creation syntax.
Also it seems like the ECI calculation could be done more simply with a max() statement or a sum()>1. These two could be consolidated with: compute htncx=(max(htnpreg,htnwochf)). IF htnpreg = 1 htncx = 1. IF htnwochf = 1 htncx = 1. This command should be IF (hrenworf=1) htncx=1. IF hrenworf = 1 THEN htncx = 1. But it looks like you really want to expand compute htncx=(max(htnpreg,htnwochf)). To include the full list of items that would mean htncx should be 1 compute htncx=(max(htnpreg,htnwochf,hrenworf,...)). Melissa -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gene Maguin Sent: Friday, October 31, 2008 8:32 AM To: [hidden email] Subject: Re: [SPSSX-L] Errors of comorbidity's syntax_adding 1 more problems Amy, >> '1951'. '1952', '1953', '1954', '1955', '1958', '2580', I agree. This line is an error. >>Error # 4007 in column 18. Text: .>The expression is incomplete. >>Check for missing operands, invalid operators, unmatched parentheses or excessive string length. This command not executed. >>IF hrenworf = 1 THEN htncx = 1. >>Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. >>IF hhrwohrf = 1 THEN htncx = 1. >>Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. >>IF ohtnpreg = 1 THEN htncx = 1. >>Error # 4382 in column 22. Text: htncx An equals sign was not found when expected after a target variable in a COMPUTE command. This command not executed. These are all left over SAS code conversion problems. Spss does not use a 'then' keyword in an if or do if structure. Take 'then' out. >>FREQUENCIES VARIABLES=chf valve pulmcirc perivasc htn htncx htnpreg htnwochf htnwhf hrenworf hrenwrf hhrwohrf hhrwchf hhrwrf hhrwhrf ohtnpreg para neuro chrnlung dm dmcx hypothy renlfail liver ulcer aids lymph mets tumor arth coag obese wghtloss lytes bldloss anemdef alcohol drug psych depress ECI /ORDER= ANALYSIS . >>Warnings Text: htnwhf An undefined variable name, or a scratch or system variable was specified in a variable list which accepts only standard variables. Check spelling and verify the existence of this variable. This has to be a typo error as 'htnwhf' does not appear anywhere in the previously listed code. Gene Maguin ===================== 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 PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance. ===================== 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 |
|
In reply to this post by Maguin, Eugene
Thank you for all your help. After fixing those errors, it shows one error
again. How do I revise it? Appreciate again. Amy + if any(dx, '29500', '29501', '29502', '29503', '29504', '29505', '29510', '29511', '29512', '29513', '29514', '29515', '29520', '29521', '29522', '29523', '29524', '29525', '29530', '29531', '29532', '29533', '29534', '29535', '29540', '29541', '29542', '29543', '29544', '29545', '29550', '29551', '29552', '29553', '29554', '29555', '29560', '29561', '29562', '29563', '29564', '29565', '29570', '29571', '29572', '29573', '29574', '29575', '29580', '29581', '29582', '29583', '29584', '29585', '29590', '29591', '29592', '29593', '29594', '29595', '29600', '29601', '29602', '29603', '29604', '29605', '29606', '29610', '29611', '29612', '29613', '29614', '29615', '29616', '29620', '29621', '29622', '29623', '29624', '29625', '29626', '29630', '29631', '29632', '29633', '29634', '29635', '29636', '29640', '29641', '29642', '29643', '29644', '29645', '29646', '29650', '29651', '29652', '29653', '29654', '29655', '29656', '29660', '29661', '29662', '29663', '29664', '29665', '29666', '2967', '29680', '29681', '29682', '29689', '29690', '29699', '2970', '2971', '2972', '2973', '2978', '2979', '2980', '2981', '2982', '2983', '2984', '2988', '2989', '29910', '29911') psych=1. + if any(dx, '3004', '30112', '3090', '3091', '311') depress=1. END REPEAT. Error # 4325 in column 37. Text: ) The arguments to the ANY and RANGE functions must be either all strings (or>string expressions) or all numeric variables (or numeric expressions). This command not executed. On Fri, 31 Oct 2008 09:32:11 -0400, Gene Maguin wrote > Amy, > > >> '1951'. '1952', '1953', '1954', '1955', '1958', '2580', > > I agree. This line is an error. > > >>Error # 4007 in column 18. Text: .>The expression is incomplete. Check > for > missing operands, invalid operators, unmatched parentheses or excessive > string length. This command not executed. > > >>IF hrenworf = 1 THEN htncx = 1. > >>Error # 4382 in column 22. Text: htncx > An equals sign was not found when expected after a target variable > in a COMPUTE command. This command not executed. > > >>IF hhrwohrf = 1 THEN htncx = 1. > >>Error # 4382 in column 22. Text: htncx > An equals sign was not found when expected after a target variable > in a COMPUTE command. This command not executed. > > >>IF ohtnpreg = 1 THEN htncx = 1. > >>Error # 4382 in column 22. Text: htncx > An equals sign was not found when expected after a target variable > in a COMPUTE command. This command not executed. > > These are all left over SAS code conversion problems. Spss does not > use a 'then' keyword in an if or do if structure. Take 'then' out. > > >>FREQUENCIES > VARIABLES=chf valve pulmcirc perivasc htn htncx htnpreg htnwochf htnwhf > hrenworf hrenwrf hhrwohrf hhrwchf hhrwrf hhrwhrf ohtnpreg para neuro > chrnlung dm dmcx hypothy renlfail liver ulcer aids lymph mets tumor arth > coag obese wghtloss lytes bldloss anemdef alcohol drug psych depress > ECI /ORDER= ANALYSIS . > > >>Warnings > Text: htnwhf > An undefined variable name, or a scratch or system variable was > specified in a variable list which accepts only standard variables. > Check spelling and verify the existence of this variable. > > This has to be a typo error as 'htnwhf' does not appear anywhere in the > previously listed code. > > Gene Maguin > > ===================== > 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 |
| Free forum by Nabble | Edit this page |
