AHEAD Wave 1 Documentation


[Appendix A] [Appendix B] [End of document] [Table of Contents]


Appendix A - Expanded Codes

[Census Region] [Religious Preference] [Hispanic Type] [Where Cancer Start]
[Health Condition (numeric)] [Health Condition (alpha)] [Occupation]
[HH Member Numbers] [Non-Resident Person/Helper Nums] [Additional Person/Helper Nums]


CENSUS REGION (Division)

Region 1 - Northeast Region 3 - South Division 1 - New England Division 5 - South Atlantic Maine Delaware New Hampshire Maryland Vermont District of Columbia Massachusetts Virginia Rhode Island West Virginia Connecticut North Carolina South Carolina Division 2 - Middle Atlantic Georgia Florida New York New Jersey Division 6 - East South Central Pennsylvania Kentucky Tennessee Region 2 - North Central Alabama Mississippi Division 3 - East North Central Division 7 - West South Central Ohio Indiana Arkansas Illinois Louisiana Michigan Oklahoma Wisconsin Texas Division 4 - West North Central Region 4 - West Minnesota Division 8 - Mountain Iowa Missouri Montana North Dakota Idaho South Dakota Wyoming Nebraska Colorado Kansas New Mexico Arizona Utah Nevada Division 9 - Pacific Washington Oregon California

RELIGIOUS PREFERENCE CODE V134

"7. OTHER SPECIFY" was recoded to V134 codes when possible: 1. PROTESTANT - A.M.E, Amish, Anglican, Assembly of God, Baptist, Brethren, Christian, Christian Reformed, Church of Christ, Church of God, Church of God in Christ, Church of the Brethren, Congregational, Disciples of Christ, Dutch Reformed, Episcopalian, Evangelical and Reformed, Evangelican United Brethren, Free Methodist, Free Will Baptist, Holiness, Lutheran, Mennonite, Methodist, Missionary, Nazarene, Pentecostal, Plymouth Brethren, Presbyterian, Primitive Baptist, Reformed, Salvation Army, Seventh Day Adventist, Southern Baptist, United Brethren, United Church of Christ 2. CATHOLIC - Roman Catholic, Greek Rite Catholic, Greek Orthodox, Russian Orthodox, Rumanian Orthodox, Serbian Orthodox 3. JEWISH 4. NO PREFERENCE; Agnostic, Atheist 7. OTHER - any denomination/sect/religion not listed above, and specifically Bahai, Buddhist, Hindu, Muslim

TYPE OF HISPANIC CODE V141

01. MEXICAN AMERICAN/CHICANO 02. PUERTO RICAN 03. CUBAN AMERICAN 04. Spain 05. Central America: Belize, Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua, Panama 06. South American (any): Columbia, Peru, Brazil, Venezuela, Chile 07. Dominican Republic 97. Still OTHER .D DK .R NA . INAP, NOT HISPANIC IN V140

WHERE CANCER START CODE V231

Use format Q231F. 01. "Abdomen" - NFS 02. Adrenal gland 03. "Arm" - NFS 04. "Back" - NFS 05. Bladder 06. "Blood" - NFS 07. Bone; cartilage 08. Bone marrow 09. Brain; astrocytoma 10. Breast 11. Bronchia; bronchus 12. Bowel 13. Cervix 12. Colon 14. Ear 15. Endometrium 16. Esophagus 17. "Extremities" - NFS 18. Eye 19. "Face" - NFS 20. "Female organs" - NFS 21. Gallbladder 22. Gastrointestinal 23. "Head" - NFS 24. Hip 25. Hodgkins 26. Jaw 27. Kidney; renal 28. Larynx; vocal cords 29. "Leg" - NFS 06. Leukemia 30. Lip 31. Liver 11. Lung; "chest" - NFS 32. Lymph nodes/glands; "glands behind the ear"; "nodes"; lymphoma (except 25) 33. Melanoma 95. Metastasized; "all over" 34. Mouth; oral 08. Myeloma (multiple) 35. "Neck" - NFS 36. Nose; nasal 37. Ovary 38. Pancreas; ampulla of Vater 39. "Pelvis" - NFS 40. Penis 41. Prostate 12. Rectum 33. Skin - melanoma; black mole 42. Skin - basal cell 43. Skin - other or NA which (include any body part with skin cancer) 44. Spine 45. Spleen 46. Stomach 47. Testicles 48. Throat 49. Thyroid; goiter on neck 50. Tongue 51. Trachea 52. Urethra/ureter 15. Uterus/womb 53. Vagina 54. Vulva; labia 97. Other .D DK .R NA . INAP, NOT HAVE CANCER

HEALTH CONDITION MASTER CODE V295A1,V295A2

Use format HEALTHF. Cancers and tumors; skin conditions 101. Cancer--any site or type; leukemia; Hodgkin's disease; melanomas; "tumors" if specified as malignant 102. Tumors, cysts or growths (exc. 101); "polyps" 103. Skin conditions--any mention exc. cancer (101) or tumor (102); dermatitis; eczema; "rashes"; Paget's disease Musculoskeletal system and connective tissue 111. Arthritis; rheumatism; bursitis 112. Back/neck/spine problems: chronic stiffness, deformity or pain; disc problems; scoliosis; spinal bifida; "bad back" 113. Stiffness, deformity, numbness or chronic pain in foot, leg, arm or hand; "bad knee"/hip problems; hip replacement 114. Missing legs, feet, arms, hands, or fingers (from amputation or congenital deformity) 115. Paralysis--any mention (incl. from polio) 116. Hernias; hiatal hernia 117. Muscular dystrophy 119. Other musculoskeletal or connective tissue problems; lupus; osteoporosis; pinched nerve; carpal tunnel syndrome; carpel tunnel syndrome; fibrositis Heart, circulatory and blood conditions 121. Heart problems: heart attack (coronary) or failure; arteriosclerosis; aneurysms; heart deformities; angina; "bad heart"; congestive heart disease 122. High blood pressure (hypertension) 123. Stroke; cerebral hemorrhage or accident 124. Blood disorders: anemia; hemophilia; polycythemia; "bad blood"; toxemia 129. Other circulatory problems; phlebitis, clots, embolisms; varicose veins; hemorrhoids; low blood pressure Respiratory system conditions 131. Allergies; hayfever; sinusitis; tonsillitis 132. Asthma 133. Bronchitis; pneumonia; "acute upper respiratory problems" 134. Emphysema 139. Other respiratory problems; tuberculosis Endocrine, metabolic and nutritional conditions 141. Diabetes 142. Thyroid trouble; goiter 143. Cystic fibrosis 144. Nutritional problems; weight problems; eating disorders; high cholesterol 149. Other endocrine/metabolic problems; pancreatitis; pituitary problems; Addison's disease Digestive system (stomach, liver, gallbladder, kidney, bladder) 151. Stomach and intestinal conditions: ulcers; colitis; gastritis; diverticulosis; appendicitis; Chron's disease; "stomach pains" 152. Liver conditions: cirrhosis; hepatitis 153. Kidney conditions: kidney stones; kidney failure (incl. dialysis) 154. Gallbladder conditions 155. Bladder conditions [except 156]; urinary infections 156. Urinary incontinence; urinary loss/leakage; problems with bladder control [90MESA] 159. Other digestive system problems Neurological and sensory conditions 161. Blindness or vision problems: glaucoma; cataracts; detached retina 162. Deafness, hearing loss or other ear conditions 163. Multiple sclerosis; cerebral palsy; epilepsy; Parkinson's; ALS; "seizures"; neuropathy 164. Speech conditions--any mention: congenital speech defects; stuttering 165. Mental retardation; learning disabilities; Down syndrome 169. Other neurological/sensory problems; sciatica; "headaches"; "dizziness"; "blackouts"; "brain damage"--NFS; meningitis; "memory loss" Reproductive system and prostate conditions 171. Pregnancy and childbirth problems; miscarriage; stillbirth; RHfactor 172. Infertility; sterilization; vasectomy; tubal ligation 173. Prostate conditions 179. Other problems of reproductive system; hysterectomy; ovarian problems; PMS; menopause Emotional and psychological conditions 181. Alcoholism 182. Drug abuse, addiction 183. Other severe psychological conditions: (chronic) depression; schizophrenia; mania; paranoia; autism; psychosis 189. Other emotional and psychological problems; "mental problems"; "nerves"; "nervous breakdown" Miscellaneous 191. Alzheimer's disease; "senility" 192. Dental and gum conditions--any mention 193. Acute infectious diseases; flu, colds, fever, mumps, etc. 194. Injuries and traumas: broken bones; pulled muscles; strains; tendon damage; burns, lacerations; concussion; side effects/conditions due to surgery 195. Sleep disorders; sleep apnea; narcolepsy 196. Immune system disorders; HIV positive; AIDS; ARC Other symptoms 595. Old age; "everything wore out" 596. Lack of energy/strength; (chronic) fatigue--n.e.c. 597. "Aches and pains"--NFS 997. Other health condition . NO HEALTH PROBLEM OR NO 2ND MENTION

HEALTH CONDITION ALPHABETIC LIST V295A1,V295A2

Use format HEALTHF. 597. Aches and pains 149. Acromegaly 133. Acute upper respiratory diseases 149. Addison's disease 196. AIDS 181. Alcoholism 131. Allergies 103. Alopecia 191. Alzheimer's disease 114. Amputation of limbs 124. Anemia 121. Aneurysm 121. Angina 183. Anxiety 151. Appendectomy 151. Appendicitis 121. Arterial blockage 121. Arteries, hardening 121. Arteriosclerosis 111. Arthritis 132. Asthma 194. Back injuries 112. Back, bad 189. Behavioral problems 102. Benign tumors 183. Bipolar depression 171. Birth of child 139. Black lung 155. Bladder conditions 161. Blindness 129. Blood clots 124. Blood disorders, specific 124. Blood disorders, NFS 194. Bones, broken/damaged from injuries/accidents 151. Bowel, irritable 194. Brain damage, from injuries/accidents 169. "Brain damage," NFS 139. Breathing problems 133. Bronchitis 194. Burns 111. Bursitis 121. Bypass surgery 101. Cancer 101. Carcinoma 119. Carpal tunnel syndrome 161. Cataracts 163. Cerebral palsy 997. Chest pains 171. Childbirth 171. Childbirth, hemorrhaging from 171. Childbirth, complications from 144. Cholesterol, high 129. "Circulation" 129. Circulatory system, other specific 152. Cirrhosis 193. Colds 151. Colitis 151. Colostomy 194. Concussions 121. Congestive heart disease 161. Conjunctivitis 121. Coronary 151. Crohn's disease 143. Cystic fibrosis 155. Cystitis 102. Cysts 162. Deafness 183. Depression 103. Dermatitis 161. Detached retina 141. Diabetes 153. Dialysis 112. Disc, slipped 112. Disc, worn 151. Diverticulosis 182. Drug addiction 182. Drug dependence 179. Dysmenorrhea 162. Ear conditions, all 144. Eating disorders 103. Eczema 134. Emphysema 179. Endometriosis 151. Enteritis 163. Epilepsy 171. Episiotomy 161. Eye conditions, NFS 596. Fatigue (chronic); lack of energy/strength 179. Female problems 193. "Fever" 119. Fibrositis 193. "Flu" 154. Gallbladder conditions 154. Gallbladder, removal 154. Gallstones 151. Gastritis 161. Glaucoma 149. Gout 149. Gland problem 102. "Growths" 179. Gynecological problems, NFS 142. Goiter 131. Hayfever 162. Hearing, loss of 121. Heart attack 121. Heart bypass surgery 121. Heart condition, NFS 121. Heart deformities, congenital 121. Heart murmurs 121. Heart valve blockage 121. Heart valve prolapse 121. Heart valve replacement 124. Hemophilia 129. Hemorrhoids 152. Hepatitis 116. Hernia, hiatal 122. High blood pressure 141. High blood sugar 113. Hip problem/replacement 196. HIV positive 149. Hormone problems 149. Hyperpituitarism 122. Hypertension 149. Hypoglycemia 179. Hysterectomy 151. Ileitis 193. "Infection" 172. Infertility 193. Influenza 194. Injuries, accidental 189. Insomnia 151. Intestinal conditions 151. Irritable bowel conditions 152. Jaundice 153. Kidney failure 153. Kidney removal 153. Kidney stones 113. Knee, bad 194. Lacerations 164. Laryngectomy 189. Learning disabilities 101. Leukemia 152. Liver conditions 142. Low blood sugar 119. Lupus 101. Malignant tumors 183. Manic-depression 193. Measles 101. Melanoma 101. Melanoma, removal 169. Memory loss 162. Meniere's disease 169. Meningitis 179. Menopause 179. Menstrual periods, painful 189. Mental health problem, vague 189. Mental problems 165. Mental retardation 169. Migraines 171. Miscarriage 121. Mitral valve prolapse 102. Mole removal 193. Mononucleosis 163. Multiple sclerosis 193. Mumps 117. Muscular dystrophy 119. Myasthenia gravis 121. Myocardial infarction 121. Myocardial schemia 195. Narcolepsy 194. Neck injuries 153. Nephritis 119. Nerve, pinched 189. Nerves, bad 189. Nervous breakdown 189. Nervous condition 119. Neuritis 163. Neuropathy 144. Obesity 144. Overweight 119. Osteoporosis 595. Old age 103. Paget's disease 149. Pancreatitis 183. Panic attacks 163. Parkinson's disease 151. Peritonitis 129. Phlebitis 139. Pleurisy 133. Pneumonia 115. Polio 124. Polycythemia 102. Polyps 179. Premenstrual syndrome (P.M.S.) 173. Prostate conditions 103. Psoriasis 189. Psychosis 194. Pulled muscle 103. Rash, skin 179. Reproductive organs, removal of (exc. for cancer, tumors) 133. Respiratory diseases, acute upper 161. Retina, detached 161. Retina, torn 121. Rheumatic heart disease 111. Rheumatism 193. Rubella 139. Sarcoidosis 169. Sciatica/sciatic nerve problem 112. Scoliosis 163. "Seizures" 191. Senility 169. "Shaky hands" 169. Shingles 124. Sickle cell anemia 131. Sinusitis 194. Skull bone injuries 194. Skull fracture 195. Sleep apnea 164. Speech conditions, all 164. Speech impediment 194. Spinal cord damage, from injuries/accident 194. Sprain 171. Stillbirth 151. Stomach conditions 151. Stomach pains 151. Stomach, removal 193. Strep throat 123. Stroke 164. Stuttering 172. Sterilization 142. Thyroid problems 131. Tonsillitis 124. Toxemia 139. Tuberculosis 102. Tumors, benign 101. Tumor, malignant (or cancerous) 102. Tumor, NA whether malignant or benign 172. Tubal ligation 172. Tubes tied 151. Ulcerative colitis 151. Ulcers, stomach (peptic or duodenal) 103. Ulcers, skin 156. Urinary incontinence 155. Urinary infections 172. Vasectomy 129. Varicose veins 193. "Virus," NFS 161. Vision problems, NFS 144. Vitamin deficiency 102. Warts 144. Weight problems

SRC 2-DIGIT OCCUPATION CODE (Adapted from 1980 U.S. Census Occupation Code)

Use format OCCF. for all occupation variables (1) PROFESSIONAL, TECHNICAL AND KINDRED WORKERS 10. Physicians--medical, psychiatric and osteopathic; dentists 11. Other Medical and Paramedical (exc. health technicians--see chiropractors, optometrists, pharmacists, veterinarians, dieticians, registered nurses, etc. 12. Accountants; Auditors 13. Teachers, except College 14. Teachers, College; Social Scientists; Librarians 15. Architects; Chemists; Engineers; Physical and Biological Scientists 16. Technicians: Computer programmers and analysts, health, engineering, science and other technicians, designers, radio and television announcers, etc. 17. Public Advisors: Personnel and labor relations workers, clergy and other religious workers, social and recreation workers, editors and reporters, public relations persons, etc. 18. Judges; Lawyers 19. Other professional, technical and kindred workers (2) MANAGERS, OFFICIALS AND PROPRIETORS (EXCEPT FARM) 20. Not self-employed; employee of own corporation 31. Self-employed--unincorporated businesses (3) CLERICAL AND KINDRED WORKERS 40. Secretaries, stenographers, typists 41. Other Clerical Workers: bank tellers, bookkeepers, cashiers, estimators & investigators, mail carriers, payroll & postal clerks, shipping & receiving clerks, stock clerks, etc. (4) SALES WORKERS 45. Demonstrators, hucksters and peddlers, insurance and real estate agents and brokers, sales representatives & sales clerks, etc. (5) CRAFTSMEN, FOREMEN AND KINDRED WORKERS 50. Foremen, n.e.c., except craft 51. Craftsmen, craft foremen and supervisors 52. Government protective service workers: firemen, guards, policemen, etc. (6) OPERATIVES AND KINDRED WORKERS 61. Transport equipment operatives: bus drivers, conductors, deliverymen and routemen, fork lift and tow motor operators, taxicab drivers, truck drivers, etc. 62. Operatives, except transport (7) LABORERS AND FARM FOREMEN 70. Unskilled laborers--non-farm 71. Farm laborers and foremen (8) SERVICE WORKERS 73. Private household workers 75. Other service workers: maids, cleaners, janitors, bartenders, cooks, waiters, nursing aides, practical nurses, barbers, babysitters (exc. 73), beauticians, etc. (9) FARMERS AND FARM MANAGERS 80. Farmers (owners and tenants) and farm managers MISCELLANEOUS GROUPS 55. Members of Armed Forces 99. Occupation DK, NA

AHEAD Household Member Person and Helper Numbers

+-----------------+----|-----------------------------------------------+-----+ |Household member |PN |BRELATEP | HN | +=================+====+===============================================+=====+ |1st Household |410 |1-Child, Relative, or Other | 411 | |member and their | +-----------------------------------------------+-----+ |spouse | |2-Spouse of (Child, Relative, or Other) | 412 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 413 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 414 | +=================+====+===============================================+=====+ |2nd Household |420 |1-Child, Relative, or Other | 421 | |member and their | +-----------------------------------------------+-----+ |spouse | |2-Spouse of (Child, Relative, or Other) | 422 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 423 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 424 | +=================+====+===============================================+=====+ |3rd Household |430 |1-Child, Relative, or Other | 431 | |member and their | +-----------------------------------------------+-----+ |spouse | |2-Spouse of (Child, Relative, or Other) | 432 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 433 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 434 | +=================+====+===============================================+=====+ |4th Household |440 |1-Child, Relative, or Other | 441 | |member and their | +-----------------------------------------------+-----+ |spouse | |2-Spouse of (Child, Relative, or Other) | 442 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 443 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 444 | +=================+====+===============================================+=====+ |5th Household |450 |1-Child, Relative, or Other | 451 | |member and their | +-----------------------------------------------+-----+ |spouse | |2-Spouse of (Child, Relative, or Other) | 452 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 453 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 454 | +=================+====+===============================================+=====+ |6th Household |460 |1-Child, Relative, or Other | 461 | |member and their | +-----------------------------------------------+-----+ |spouse | |2-Spouse of (Child, Relative, or Other) | 462 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 463 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 464 | +=================+====+===============================================+=====+ |7th Household |470 |1-Child, Relative, or Other | 471 | |member and their | +-----------------------------------------------+-----+ |spouse | |2-Spouse of (Child, Relative, or Other) | 472 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 473 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 474 | +=================+====+===============================================+=====+ |8th Household |480 |1-Child, Relative, or Other | 481 | |member and their | +-----------------------------------------------+-----+ |spouse | |2-Spouse of (Child, Relative, or Other) | 482 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 483 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 484 | +=================+====+===============================================+=====+ |9th Household |490 |1-Child, Relative, or Other | 491 | |member and their | +-----------------------------------------------+-----+ |spouse | |2-Spouse of (Child, Relative, or Other) | 492 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 493 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 494 | +=================+====+===============================================+=====+ |10th Household |500 |1-Child, Relative, or Other | 501 | |member and their | +-----------------------------------------------+-----+ |spouse | |2-Spouse of (Child, Relative, or Other) | 502 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 503 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 504 | +=================+====+===============================================+=====+

AHEAD Non-Resident Children Person and Helper Numbers

+-----------------+----|-----------------------------------------------+-----+ |Household member |PN |BRELATEP | HN | +=================+====+===============================================+=====+ |1st Non-Resident |120 |1-Child | 121 | |child and their | +-----------------------------------------------+-----+ |family | |2-Spouse of Child | 122 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 123 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 124 | +=================+====+===============================================+=====+ |2nd Non-Resident |130 |1-Child | 131 | |child and their | +-----------------------------------------------+-----+ |family | |2-Spouse of Child | 132 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 133 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 134 | +=================+====+===============================================+=====+ |3rd Non-Resident |140 |1-Child | 141 | |child and their | +-----------------------------------------------+-----+ |family | |2-Spouse of Child | 142 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 143 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 144 | +=================+====+===============================================+=====+ |4th Non-Resident |150 |1-Child | 151 | |child and their | +-----------------------------------------------+-----+ |family | |2-Spouse of Child | 152 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 153 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 154 | +=================+====+===============================================+=====+ |5th Non-Resident |160 |1-Child | 161 | |child and their | +-----------------------------------------------+-----+ |family | |2-Spouse of Child | 162 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 163 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 164 | +=================+====+===============================================+=====+ |6th Non-Resident |170 |1-Child | 171 | |child and their | +-----------------------------------------------+-----+ |family | |2-Spouse of Child | 172 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 173 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 174 | +=================+====+===============================================+=====+ |7th Non-Resident |180 |1-Child | 181 | |child and their | +-----------------------------------------------+-----+ |family | |2-Spouse of Child | 182 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 183 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 184 | +=================+====+===============================================+=====+ |8th Non-Resident |190 |1-Child | 191 | |child and their | +-----------------------------------------------+-----+ |family | |2-Spouse of Child | 192 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 193 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 194 | +=================+====+===============================================+=====+ |9th Non-Resident |200 |1-Child | 201 | |child and their | +-----------------------------------------------+-----+ |family | |2-Spouse of Child | 202 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 203 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 204 | +=================+====+===============================================+=====+ |10th Non-Resident|210 |1-Child | 211 | |child and their | +-----------------------------------------------+-----+ |family | |2-Spouse of Child | 212 | | | +-----------------------------------------------+-----+ | | |3-1st Grandchild (Great/Great-Great) or Spouse | 213 | | | +-----------------------------------------------+-----+ | | |4-2nd Grandchild (Great/Great-Great) or Spouse | 214 | +=================+====+===============================================+=====+

Additional Person and Helper Numbers

+-----------------+----+-----------------------------------------------+-----+ |Person |PN |BRELATEP | HN | +=================+====+===============================================+=====+ |Spouse of |020 |1-Spouse of Respondent | 021 | |respondent | | | | +=================+====+===============================================+=====+ |Deceased Child |100 |- | - | +=================+====+===============================================+=====+ |All Children |110 |1-Child of Respondent | 111 | +=================+====+===============================================+=====+ |"Not on List" |820 |1-Relative, Group or Other Individual | 821 | |Helper | +-----------------------------------------------+-----+ | | |3-Grandhild (Great/Great-Great) or Spouse | 823 | +=================+====+===============================================+=====+ |"Not on List" |830 |1-Relative, Group or Other Individual | 831 | |Helper | +-----------------------------------------------+-----+ | | |3-Grandhild (Great/Great-Great) or Spouse | 833 | +=================+====+===============================================+=====+ |"Not on List" |840 |1-Relative, Group or Other Individual | 841 | |Helper | +-----------------------------------------------+-----+ | | |3-Grandhild (Great/Great-Great) or Spouse | 843 | +=================+====+===============================================+=====+ |"Not on List" |850 |1-Relative, Group or Other Individual | 851 | |Helper | +-----------------------------------------------+-----+ | | |3-Grandhild (Great/Great-Great) or Spouse | 853 | +=================+====+===============================================+=====+ |"Not on List" |860 |1-Relative, Group or Other Individual | 861 | |Helper | +-----------------------------------------------+-----+ | | |3-Grandhild (Great/Great-Great) or Spouse | 863 | +=================+====+===============================================+=====+ |"Not on List" |870 |1-Relative, Group or Other Individual | 871 | |Helper | +-----------------------------------------------+-----+ | | |3-Grandhild (Great/Great-Great) or Spouse | 873 | +=================+====+===============================================+=====+ |"Not on List" |880 |1-Relative, Group or Other Individual | 881 | |Helper | +-----------------------------------------------+-----+ | | |3-Grandhild (Great/Great-Great) or Spouse | 883 | +=================+====+===============================================+=====+ |"Not on List" |890 |1-Relative, Group or Other Individual | 891 | |Helper | +-----------------------------------------------+-----+ | | |3-Grandhild (Great/Great-Great) or Spouse | 893 | +=================+====+===============================================+=====+ |"Not on List" |900 |1-Relative, Group or Other Individual | 901 | |Helper | +-----------------------------------------------+-----+ | | |3-Grandhild (Great/Great-Great) or Spouse | 903 | +=================+====+===============================================+=====+

Appendix B - Recodes for Creating Expanded Person Variables

Note: See Codebook, Section D

*-------------------------------------------------------------------*
|   APPENDX.SAS:   A merge that adds variables to the child/other   |
|       household member records, including whether the child       |
|       provided help with each of the six ADLs, with IADLs, or     |
|       money management, whether child provides help with paying   |
|       for medical expenses, whether the child is included         |
|       in the will(s) of parents, whether the child has received   |
|       financial assistance of various types.   Information        |
|       is taken from all four files.                               |
|                                                                   |
|                                                                   |
|     This setup combines variables about household members with    |
|     those about non-coresident children when appropriate.  The    |
|     revised variables are as follows:                             |
|                                                                   |
|          RELATE_F, Relationship to female respondent              |
|          RELATE_M, Relationship to male respondent                |
|             - replace V418, V421, V443, and V445                  |
|          SEXP, Sex of child/other household member                |
|             - replaces V417 and V422                              |
|          AGEP, Age of child/other household member                |
|             - replaces V422 and V446/V447                         |
|          EDUCP, Education of child/other household member         |
|             - replaces V423 and V449                              |
|          MARSTATP, Marital status of child/other household member |
|             - replaces V419 and V444                              |
|          NUMKIDSP, Number of children of child/other household    |
|                    member                                         |
|             - replaces V429 and V450                              |
|          AGESPP, Age of spouse of child/other household           |
|                    member                                         |
|             - replaces V487 and V459                              |
|          EDUCSPP, Education of spouse of child/other household    |
|                    member                                         |
|             - replaces V430 and V460                              |
|          WORKP, Work status of child/other household member       |
|             - replaces V480 and V451                              |
|          WORKSPP, Work status of spouse of child/other household  |
|                    member                                         |
|             - replaces V488 and V461                              |
|          V481C, MD category for D11, household member earnings    |
|             - replaces V483, V484, and V485                       |
|          V489C, MD category for D18, earnings of the spouse of    |
|                    of other household member                      |
|             - replaces V491, V492, and                            |
|          V458C, category for D30-D32, household earnings for      |
|                    child living elsewhere                         |
|             - replaces V456, V457, and V458                       |
|                                                                   |
|                                                                   |
|   The following variables are created based on the respondents'   |
|     reports of who (if anyone) helps them with ADLs and IADLs.    |
|     Separate variables indicate help provided by the child or     |
|     other household member to a female and to a male respondent.  |
|     For children not co-residing with the respondent, the help    |
|     may be given by the child him- or herself, OR by his or her   |
|     spouse, OR by one of his or her children (i.e., by a          |
|     grandchild of the respondent).  For other household members,  |
|     the help may be given by either spouse in a couple, but       |
|     help by their children (i.e., by grandchildren of the         |
|     respondent) cannot always be identified accurately.           |
|     First, variables are created for each of six ADLs, with any   |
|     of four IADLs, and with managing money:                       |
|                                                                   |
|       - V775HF, Help to female R with walking                     |
|       - V775HM, Help to male R with walking                       |
|       - V783HF, Help to female R with bathing                     |
|       - V783HM, Help to male R with bathing                       |
|       - V791HF, Help to female R with dressing                    |
|       - V791HM, Help to male R with dressing                      |
|       - V799HF, Help to female R with eating                      |
|       - V799HM, Help to male R with eating                        |
|       - V805HF, Help to female R with getting in/out of bed       |
|       - V805HM, Help to male R with getting in/out of bed         |
|       - V823HF, Help to female R with toileting                   |
|       - V823HM, Help to male R with toileting                     |
|       - V913HF, First helper with IADLs for female R              |
|       - V913HM, First helper with IADLs for male R                |
|       - V924HF, Second helper with IADLs for female R             |
|       - V924HM, Second helper with IADLs for male R               |
|       - V950HF, Help to female R with managing money              |
|       - V950HM, Help to male R with managing money                |
|                                                                   |
|     There are also counts for the number of ADLs and total ADLs   |
|       plus IADLs for which help is given.  In addition to the     |
|       separate counts for female and male respondents there are   |
|       also variables that combine the counts from both            |
|       respondents, in the case of couples:                        |
|                                                                   |
|       - ADLHELPF, Number of ADLs with which female respondent     |
|            is helped by the child/other household member          |
|       - ADLHELPM, Number of ADLs with which male respondent       |
|            is helped by the child/other household member          |
|       - ADLHELPT, Number of ADLs with which any respondent        |
|            is helped by the child/other household member          |
|       - IADLHLPF, Whether the child/hh member helps the female    |
|            respondent with any of four IADLs                      |
|       - IADLHLPM, Whether the child/hh member helps the male      |
|            respondent with any of four IADLs                      |
|       - IADLHLPT, Whether the child/hh member helps any           |
|            respondent with any of four IADLs                      |
|       - ALLHELPF, Sum of ADLHELPF + IADLHLPF + V950HF, so         |
|            whether child/other household member provides any type |
|            of help to female R                                    |
|       - ALLHELPM, Sum of ADLHELPM + IADLHLPM + V950HM, so         |
|            whether child/other household member provides any type |
|            of help to male R                                      |
|       - ALLHELPT, Sum of ADLHELPT + IADLHLPT + V950HT, so         |
|            whether child/other household member provides any type |
|            of help to any R                                       |
|     Then there is a summary variable that describes who provides  |
|     help to both male and female respondents:                     |
|                                                                   |
|       - WHOHELPT, where each digit before the decimal specifies   |
|         a helper for a male respondent, and each digit AFTER the  |
|         decimal specifies a helper for a female respondent.       |
|         The digits correspond to the codes for the variable       |
|         RELATEP -- that is, "1" indicates the child him- or       |
|         herself, "2" indicates the spouse of the child, and       |
|         "3" or "4" indicates a child of the child.                |
|                                                                   |
|     The following variables accumulate information about the      |
|       amount of time spent helping the respondent(s), whether     |
|       they are paid for that help and if so whether Medicare      |
|       helps pay, and the amount paid, accumulating across         |
|       helpers associated with each child/other hh member.         |
|                                                                   |
|       - TIMEHELP, total time spent helping either R, per week     |
|       - MDTIMEHL, count of helpers for which time per week is     |
|            missing                                                |
|       - PAIDHELP, count of helpers who are paid for their help    |
|       - MEDCHELP, count of paid helpers for which Medicare pays   |
|            part or all of the amount                              |
|       - DLLRHELP, total amount paid per month                     |
|       - MDDLLRHL, count of helpers for which amount paid is       |
|            missing                                                |
|       - G100HELP, whether paid at least $100 per month            |
|                                                                   |
|     Respondents who did not report any helpers were asked if      |
|       there is anyone who would be willing and able to provide    |
|       help with ADLs if needed in the future.                     |
|                                                                   |
|       - FUTURHLF, whether the child (or spouse or child)          |
|            is named by the female R as someone who would be       |
|            willing and able to provide help her (or her husband)  |
|            with ADLs if needed                                    |
|       - FUTURHLM, whether the child (or spouse or child)          |
|            is named by the male R as someone who would be         |
|            willing and able to provide help him (or his wife)     |
|            with ADLs if needed                                    |
|       - FUTURHLT, whether the child (or spouse or child)          |
|            is named by the either R as someone who would be       |
|            willing and able to provide help that respondent       |
|            (or spouse) with ADLs if needed                        |
|                                                                   |
|   The following variables are based on information from all       |
|   respondents:                                                    |
|                                                                   |
|       - MOVENRF, whether this child is named by female respondent |
|            as the one she would move in with or closer to, if     |
|            that respondent thinks the probability of moving in    |
|            the next five years is at least 30% and, if she does   |
|            move, that she will try to move in with, or closer to, |
|            one of her children                                    |
|       - MOVENRM, whether this child is named by male respondent   |
|            as the one he would move in with or closer to, if      |
|            that respondent thinks the probability of moving in    |
|            the next five years is at least 30% and, if he does    |
|            move, that he will try to move in with, or closer to,  |
|            one of his children                                    |
|       - WILLBENF, whether this child is named by female respondent|
|            as a beneficiary in her will                           |
|       - WILLBENM, whether this child is named by male respondent  |
|            as a beneficiary in his will                           |
|                                                                   |
|   The following variables are based on information from an only   |
|     or lead respondent about assistance given TO the child BY     |
|     the respondent(s):                                            |
|                                                                   |
|       - HELPDEED, whether the parent(s) have ever given the       |
|            child a deed to a house                                |
|       - HELP10YR, whether the parent(s) have given the child      |
|            $5000 or more in the last ten years                    |
|       - HELP1YR, whether the parent(s) have given the child       |
|            $500 or more in the last twelve months ("), and if so: |
|       - HELP1YRD, how much                                        |
|       - HELP1YRX, how much, imputing means for unfolding brackets |
|       - CHLDCARE, whether the parent(s) have cared for a          |
|            grandchild -- a child of this child -- for a year      |
|            or longer                                              |
|                                                                   |
|   The following variables are based on information from an only   |
|   or financial respondent:                                        |
|                                                                   |
|       - DEEDHOME, whether the name of the child (or child of      |
|            the child) is on the deed or title to the home in      |
|            owned by the respondent(s)                             |
|       - OWNRHOME, whether the child (or child of the child)       |
|            owns the home in which the respondent(s) live          |
|                                                                   |
|   The following variables are based on information from an only   |
|     or financial respondent about assistance given BY the         |
|     child TO the respondent(s)                                    |
|                                                                   |
|       - GIVEMEDI, whether or not the child, or the child's        |
|            spouse or children, have helped the parent(s) pay for  |
|            health care costs in the last 12 months, and if so:    |
|       - GIVEMEDD, how much that help amounted to                  |
|            Note that if the respondent named multiple donors,     |
|            the total amount is divided by the number named        |
|       - GIVEFIN, whether or not the child, or the child's         |
|            spouse or children, gave $500 or more to the           |
|            respondent(s) in the previous calendar year            |
|       - GIVEFIND, the amount given last year, in Dollars          |
|       - GIVEFINC, category of amount given, open-ended (=0) or    |
|            unfolding (=1-8) or multiple amounts (=9)              |
|       - GIVEFINX, the amount given last year, in Dollars, with    |
|            means of bracketed amounts imputed if the dollar       |
|            amount was not given (see V1606C and V1606X, etc.)     |
|       - GIVENOW, whether the child also has given money this      |
|            calendar year                                          |
|       - GIVEFUT, whether the respondent thinks of this as income  |
|            s/he can count on in the future                        |
|       - ADVISE_R, whether the parent(s) ask the child for help    |
|            in making major decisions                              |
|                                                                   |
|   The following variables are based on information from an only   |
|     or financial respondent about life insurance carried by       |
|     either that respondent or by his or her spouse.  There are    |
|     four sets of three variables, according to whether the policy |
|     is on the life of a Female or Male, and is Term or Whole:     |
|                                                                   |
|       - BENETIF, whether the child is named as a beneficiary      |
|            of a term life insurance policy by an unmarried female |
|            respondent, or by the wife in a married couple, and    |
|            if so:                                                 |
|       - FVALTIF, the face value of that policy, and               |
|       - PREMTIF, the annual premium on that policy                |
|            In generating the above two variables, I took crude    |
|            account of the fact that in some cases there were      |
|            multiple people named as beneficiaries, allocating     |
|            a fraction of the total premium to the individual      |
|            beneficiary, assuming all beneficiaries get equal      |
|            amounts and allocating the same fraction of the        |
|            annual premium to each beneficiary.  If the respondent |
|            said that the beneficiaries are "all my children," I   |
|            counted only the female's children, assuming that is   |
|            more likely what was meant in the case of second       |
|            marriages where each respondent had children from      |
|            previous marriages.                                    |
|                                                                   |
|     The remaining sets of insurance variables have names of the   |
|       following form:                                             |
|                                                                   |
|       - xxxxTIM, for term insurance on the life of a male         |
|       - xxxxWIF, for cash-value insurance on the life of a female |
|       - xxxxWIM, for cash-value insurance on the life of a male   |
|                                                                   |
|   Finally, respondents who were asked Module 7 answered three     |
|      questions about whether they got assistance or advice        |
|      from anyone about financial affairs and making decisions,    |
|      and if so if any of their children do so.                    |
|                                                                   |
|       - V2195F, whether the child helps with managing day-to-day  |
|         financial affairs according to a female respondent        |
|       - V2195M, whether the child helps with managing day-to-day  |
|         financial affairs according to a male respondent          |
|       - V2198F, whether the child helps with managing the money   |
|         according to a female respondent                          |
|       - V2198M, whether the child helps with managing the money   |
|         according to a male respondent                            |
|       - V2201F, whether the child would be asked for advice       |
|         on financial matters, according to a female respondent    |
|       - V2201M, whether the child would be asked for advice       |
|         on financial matters, according to a male respondent      |
*-------------------------------------------------------------------*;

libname AHEAD1 'V:\soc3\ahead\DATA\GAMMA ';
title 'APPENDX: Add variables from other files to PERSON file';
options ps=64 ls=72 pageno=1;

*
**
*** The first file management step is to pull variables from the
***   respondent-level file and add them to the household-level
***   file.  This follows the pattern of EXAMPLE3, creating two
***   sets of respondent variables: one for female respondents,
***   the second for male respondents.
**
;
data hhfile1;
  merge AHEAD1.AHGHH(keep=HHID ID1 V474A1 -- V474A10 V479A1 -- V479A10
       V495 V499 V499C V499X V507 V508 V508C V508X V519 V520 V520C
       V520X
       V526 V527 V527C V527X V537 V538 V538C V538X V549 V748A1 --
       V748A10
       V749 V1107A1 -- V1107A10 V1151A1 -- V1151A8 V1603 V1606 V1606C
       V1606X V1611 V1612 V1615 V1618 V1618C V1618X V1623 V1624 V1627
       V1630 V1630C V1630X V1635 V1636  v1885
       V1887 -- V1889 V1890A2
       V1890A3 V1891A1 -- V1891A10 V1893 V1895 -- V1897 V1898A2
       V1898A3
       V1899A1 -- V1899A10 V1901 V1903 -- V1905 V1906A2 V1906A3
       V1907A1 -- V1907A10 V1909 V1912 V1913 V1914 V1915A2 V1915A3
       V1916A1 -- V1916A10 V1920A1 -- V1920A10 wthhpop wthhnorm)
    AHEAD1.AHGRC(keep=HHID ID SEX TYPE V775 V783 V791 V799 V805 V823
    V913
       V924 V950 V1010 V1294A1 -- V1294A10 V1693A1 -- V1693A10
       V2148 V2195 V2198 V2201);
  by HHID;
  array resp[*] ID V775 V783 V791 V799 V805 V823 V913 V924 V950 V1010
       V1294A1 -- V1294A10 V1693A1 -- V1693A10 V2148 V2195 V2198
       V2201;
  numvars = dim(resp);
  array spvar[500] _temporary_;
  array respf[*] IDF V775F V783F V791F V799F V805F V823F
       V913F V924F V950F V1010F
       V1294A1F V1294A2F V1294A3F V1294A4F V1294A5F V1294A6F V1294A7F
       V1294A8F V1294A9F V1294AXF V1693A1F V1693A2F V1693A3F V1693A4F
       V1693A5F V1693A6F V1693A7F V1693A8F V1693A9F V1693AXF module7f
       V2195F V2198F V2201F;
  array respm[*] IDM V775M V783M V791M V799M V805M V823M
       V913M V924M V950M V1010M
       V1294A1M V1294A2M V1294A3M V1294A4M V1294A5M V1294A6M V1294A7M
       V1294A8M V1294A9M V1294AXM V1693A1M V1693A2M V1693A3M V1693A4M
       V1693A5M V1693A6M V1693A7M V1693A8M V1693A9M V1693AXM module7m
       V2195M V2198M V2201M;
  drop i numvars ID ID1 SEX TYPE V775 V783 V791 V799 V805 V823 V913
       V924 V950 V1010 V1294A1 -- V1294A10 V1693A1 -- V1693A10 V2148
       V2195 V2198 V2201;
  do i=1 to numvars;
    spvar[i] = lag(resp[i]);
    end;
*
**
*** Note that "finrsex" and "famrsex" are indicators of the gender of
***   the respondents who supplied the financial and family
information
***   about married couples, since some of the questions about
children
***   were asked in terms of the relationship of the child to "you"
and
***   to "your spouse."
**
;
  if first.HHID and last.HHID then do;
    finrsex = SEX;
    if SEX eq 1 then do i=1 to numvars;
      respm[i] = resp[i];
      respf[i] = .;
      end;
    else do i=1 to numvars;
      respm[i] = .;
      respf[i] = resp[i];
      end;
    end;
  else if last.HHID then do;
    if ID eq ID1 then finrsex = SEX;
      else finrsex = 3 - SEX;
    if SEX eq 1 then do i=1 to numvars;
      respm[i] = resp[i];
      respf[i] = spvar[i];
      end;
    else do i=1 to numvars;
      respm[i] = spvar[i];
      respf[i] = resp[i];
      end;
    end;
  if last.HHID;
run;

*
**
*** The next step gets a count of children of the
***   respondent (or of each respondent in a couple)
***   needed to allocate some amounts when the
***   respondent said "all my children."
*
*** This follows the pattern of EXAMPLE4.
**
;

data hhfile2;
  merge hhfile1(in=hhrec)
        AHEAD1.AHGPX(keep=HHID LINEP IDFM idnfm V418 V421
           V443 V445);
  by HHID;
  if hhrec;
  drop LINEP IDFM IDNFM V418 V421 V443 V445;
  if V418 eq . and V443 lt 0 then V443=1;
  if V418 eq . and idnfm gt 0 and V445 lt 0 then V445=1;
  retain ctchildf ctchildm famrsex;
  if first.HHID then do;
    ctchildf = 0;
    ctchildm = 0;
    if IDM eq IDFM then famrsex = 1; else famrsex = 2;
    end;
  if V418 in (1,2) or V443 in (1,2) then do;
    if famrsex eq 1 then ctchildm = ctchildm + 1;
    if famrsex eq 2 then ctchildf = ctchildf + 1;
    end;
  if V421 in (1,2) or V445 in (1,2) then do;
    if famrsex eq 1 then ctchildf = ctchildf + 1;
    if famrsex eq 2 then ctchildm = ctchildm + 1;
    end;
  if last.HHID then output;
run;

*
**
*** The next data management step is to merge Household-level
***   variables (including those merged onto the household
***   level from the Respondent-level file in the first step)
***   onto the Child/Other household member-level file.
**
;
data pfile1;
  merge hhfile2(in=hhrec)
        AHEAD1.AHGPX(in=chrec);
  by HHID;
  if chrec and hhrec;
  drop i V775M V783M V791M V799M V805M V823M V913M V924M V950M V1010M
         V775F V783F V791F V799F V805F V823F V913F V924F V950F V1010F
         V1294A1M V1294A2M V1294A3M V1294A4M V1294A5M
         V1294A6M V1294A7M V1294A8M V1294A9M V1294AXM
         V1693A1M V1693A2M V1693A3M V1693A4M V1693A5M
         V1693A6M V1693A7M V1693A8M V1693A9M V1693AXM
         V1294A1F V1294A2F V1294A3F V1294A4F V1294A5F
         V1294A6F V1294A7F V1294A8F V1294A9F V1294AXF
         V1693A1F V1693A2F V1693A3F V1693A4F V1693A5F
         V1693A6F V1693A7F V1693A8F V1693A9F V1693AXF
         V474A1 -- V474A10 V479A1 -- V479A10 V495 V499 V499C V499X
         V507 V508 V508C V508X V519 V520 V520C V520X V526 V526 V527C
         V527X
         V537 V538 V538C V538X V549 V748A1 -- V748A10 V749 V1107A1 --
         V1107A10
         V1151A1 -- V1151A8 V1603 V1606 V1606C V1606X V1611 V1612
         V1615
         V1618 V1618C V1618X V1623 V1624 V1627 V1630 V1630C V1630X
         V1635
         V1636 V1885 V1887 V1888 V1889 V1890A2 V1890A3 V1891A1 --
         V1891A10
         V1893 V1895 V1896 V1897 V1898A2 V1898A3 V1899A1 -- V1899A10
         V1901 V1903 V1904 V1905 V1906A2 V1906A3 V1907A1 -- V1907A10
         V1909 V1912 V1913 V1914 V1915A2 V1915A3 V1916A1 -- V1916A10
         v1887a v1889a v1895a v1897a v1903a v1905a v1912a v1914a
         V1920A1 -- V1920A10 ctchildf ctchildm ctgive giveall
         finrsex famrsex child childf childm module7f module7m
         V417 -- V423 V480 V483 V484 V485 V429 V487 V430 V488
         V491 V492 V493 V442 -- V451 V456 V457 -- V461;
  hhchid = 100*HHID + LINEP;
  AGEP = .;
  RELATE_M = .;
  RELATE_F = .;
  child = 0;
  childm = 0;
  childf = 0;
  if V418 eq . and V443 lt 0 then V443=1;
  if V418 eq . and idnfm gt 0 and V445 lt 0 then V445=1;

  if LINEP le 39 then do;
    child = 1;
    SEXP = V442;
    if famrsex eq 1 then do;
      RELATE_M = V443;
      RELATE_F = V445;
      end;
    else do;
      RELATE_M = V445;
      RELATE_F = V443;
      end;
    MARSTATP = V444;
    if V446 ge 0 then AGEP = V446;
      else if V447 ge 1900 then AGEP = 1994 - V447;
    EDUCP = V449;
    WORKP = V451;
    NUMKIDSP = V450;
    AGESPP = V459;
    EDUCSPP = V460;
    WORKSPP = V461;
    V458C = V456;
    if V456 eq 5 then
      if V458 eq 5 then V458C = 1;
      else if V458 eq 1 then V458C = 2;
        else V458C = 5;
    else if V456 eq 1 then
      if V457 eq 5 then V458C = 3;
      else if V457 eq 1 then V458C = 4;
        else V458C = 6;
    else if V457 eq 1 then V458C = 4;
    else if V457 eq 5 then V458C = 7;
    V489C = .;
    end;
  else do;
    SEXP = V417;
    if famrsex eq 1 then do;
      RELATE_M = V418;
      RELATE_F = V421;
      end;
    else do;
      RELATE_M = V421;
      RELATE_F = V418;
      end;
    MARSTATP = V419;
    AGEP = V422;
    EDUCP = V423;
    WORKP = V480;
    NUMKIDSP = V429;
    AGESPP = V487;
    EDUCSPP = V430;
    WORKSPP = V488;
    V481C = V481;
    if V481 ge 0 then V481C = 0;
      else if V483 eq 5 then
        if V485 eq 5 then V481C = 1;
        else if V485 eq 1 then V481C = 2;
          else V481C = 5;
      else if V483 eq 1 then
        if V484 eq 5 then V481C = 3;
        else if V484 eq 1 then V481C = 4;
          else V481C = 6;
    V489C = V489;
    if V489 ge 0 then V489C = 0;
      else if V491 eq 5 then
        if V493 eq 5 then V489C = 1;
          else if V493 eq 1 then V489C = 2;
            else V489C = 5;
      else if V491 eq 1 then
        if V492 eq 5 then V489C = 3;
        else if V492 eq 1 then V489C = 4;
          else V489C = 6;
    V458C = .;
    end;
  if RELATE_M in (1,2,3) then childm = 1;
  if RELATE_F in (1,2,3) then childf = 1;
  if childm or childf then child = 1;
  array maler[9] V775M V783M V791M V799M V805M V823M V913M
     V924M V950M;
  array femaler[9] V775F V783F V791F V799F V805F V823F V913F
     V924F V950F;
  array adlhm[9] V775HM V783HM V791HM V799HM V805HM V823HM
     V913HM V924HM V950HM;
  array adlhf[9] V775HF V783HF V791HF V799HF V805HF V823HF
     V913HF V924HF V950HF;
  do i = 1 to 9;
    if RELATE_M ne . then do;
      if maler[i] eq LINEP then adlhm[i] = 1;
      else adlhm[i] = 0;
      end;
    else adlhm[i] = .;
    if RELATE_F ne . then do;
      if femaler[i] eq LINEP then adlhf[i] = 1;
      else adlhf[i] = 0;
      end;
    else adlhf[i] = .;
    end;
  adlhelpt = 0;
  iadlhlpt = 0;
  allhelpt = 0;
  if RELATE_M ne . then do;
    adlhelpm = 0;
    do i = 1 to 6;
      if adlhm[i] eq 1 then adlhelpm = adlhelpm + 1;
      end;
    adlhelpt = adlhelpm;
    if V913HM eq 1 or V924HM eq 1 then iadlhlpm = 1;
      else iadlhlpm = 0;
    iadlhlpt = iadlhlpm;
    allhelpm = adlhelpm + iadlhlpm + V950HM;
    allhelpt = allhelpm;
    end;
  else do;
    adlhelpm = .;
    iadlhlpm = .;
    allhelpm = .;
    end;
  if RELATE_F ne . then do;
    adlhelpf = 0;
    do i = 1 to 6;
      if adlhf[i] eq 1 then adlhelpf = adlhelpf + 1;
      end;
    adlhelpt = adlhelpt + adlhelpf;
    if V913HF eq 1 or V924HF eq 1 then iadlhlpf = 1;
      else iadlhlpf = 0;
    iadlhlpt = iadlhlpt + iadlhlpf;
    allhelpf = adlhelpf + iadlhlpf + V950HF;
    allhelpt = allhelpt + allhelpf;
    end;
  else do;
    adlhelpf = .;
    iadlhlpf = .;
    allhelpf = .;
    end;

*
**
***  The following variables apply only to children, since
***    other household members were not specifically identified
***    for these topics
**
;

  if child then do;
    if V549 eq LINEP then CHLDCARE = 1; else CHLDCARE = 0;
    if V1010M eq LINEP then FUTURHLM = 1; else FUTURHLM = 0;
    if V1010F eq LINEP then FUTURHLF = 1; else FUTURHLF = 0;
    FUTURHLT = FUTURHLF + FUTURHLM;
    array numben3[4] V1890A3 V1898A3 V1906A3 V1915A3;
    array numben2[4] V1890A2 V1898A2 V1906A2 V1915A2;
    array prem[4] V1887 V1895 V1903 V1912;
    array fval[4] V1889 V1897 V1905 V1914;
    array premper[4] v1887a v1895a v1903a v1912a;
    array fvalper[4] v1889a v1897a v1905a v1914a;
    array pper[4] V1888 V1896 V1904 V1913;
    do i = 1 to 4;
      premper[i] = prem[i];
      fvalper[i] = fval[i];
      if numben3[i] gt 0 then do;
        if prem[i] gt 0 then premper[i] = prem[i]/3;
        if fval[i] gt 0 then fvalper[i] = fval[i]/3;
        end;
      else if numben2[i] gt 0 then do;
        if prem[i] gt 0 then premper[i] = prem[i]/2;
        if fval[i] gt 0 then fvalper[i] = fval[i]/2;
        end;
      if prem[i] gt 0 then do;
        if pper[i] eq 1 then premper[i] = 52 * premper[i];
          else if pper[i] eq 2 then premper[i] = 24 * premper[i];
          else if pper[i] eq 3 then premper[i] = 12 * premper[i];
          else if pper[i] eq 4 then premper[i] = 4 * premper[i];
          else if pper[i] eq 5 then premper[i] = 2 * premper[i];
        end;
      end;
    array movef[10] V1294A1F V1294A2F V1294A3F V1294A4F V1294A5F
         V1294A6F V1294A7F V1294A8F V1294A9F V1294AXF;
    array willf[10] V1693A1F V1693A2F V1693A3F V1693A4F
         V1693A5F V1693A6F V1693A7F V1693A8F V1693A9F V1693AXF;
    array movem[10] V1294A1M V1294A2M V1294A3M V1294A4M V1294A5M
         V1294A6M V1294A7M V1294A8M V1294A9M V1294AXM;
    array willm[10] V1693A1M V1693A2M V1693A3M V1693A4M V1693A5M
         V1693A6M V1693A7M V1693A8M V1693A9M V1693AXM;
    if RELATE_M in(1,2,3) then do;
      MOVENRM = 0;
      WILLBENM = 0;
      do i = 1 to 10;
        if movem[i] eq LINEP then MOVENRM = 1;
        if willm[i] eq LINEP or willm[i] eq 11 then WILLBENM = childm;
        end;
      end;
    else do;
      MOVENRM = .;
      WILLBENM = .;
      end;
    if RELATE_F in(1,2,3) then do;
      MOVENRF = 0;
      WILLBENF = 0;
      do i = 1 to 10;
        if movef[i] eq LINEP then MOVENRF = 1;
        if willf[i] eq LINEP or willf[i] eq 11 then WILLBENF = childf;
        end;
      end;
    else do;
      MOVENRF = .;
      WILLBENF = .;
      end;

    array v474[10] V474A1 -- V474A10;
    array v479[10] V479A1 -- V479A10;
    array v495a[5] V495 V507 V519 V526 V537;
    array v499a[5] V499 V508 V520 V527 V538;
    array v499xa[5] V499X V508X V520X V527X V538X;
    array v748[10] V748A1 -- V748A10;
    array v1107[10] V1107A1 -- V1107A10;
    array v1151[8] V1151A1 -- V1151A8;
    array v1603a[3] V1603 V1615 V1627;
    array v1606a[3] V1606 V1618 V1630;
    array v1606ca[3] V1606C V1618C V1630C;
    array v1606xa[3] V1606X V1618X V1630X;
    array v1611a[3] V1611 V1623 V1635;
    array v1612a[3] V1612 V1624 V1636;
    array v1891[10] V1891A1 -- V1891A10;
    array v1899[10] V1899A1 -- V1899A10;
    array v1907[10] V1907A1 -- V1907A10;
    array v1916[10] V1916A1 -- V1916A10;
    array v1920[10] V1920A1 -- V1920A10;
    HELPDEED = 0;
    HELP10YR = 0;
    HELP1YR = 0;
    HELP1YRD = 0;
    HELP1YRX = 0;
    GIVEMEDI = 0;
    GIVEMEDD = 0;
    GIVEFIN = 0;
    GIVEFIND = 0;
    GIVEFINC = .;
    GIVEFINX = 0;
    GIVENOW = .;
    GIVEFUT = .;
    DEEDHOME = 0;
    OWNRHOME = 0;
    array insure[4] V1885 V1893 V1901 V1909;
    array benefr[4] BENETIF BENEWIF BENETIM BENEWIM;
    array benemr[4] BENETIM BENEWIM BENETIF BENEWIF;
    array premfr[4] PREMTIF PREMWIF PREMTIM PREMWIM;
    array premmr[4] PREMTIM PREMWIM PREMTIF PREMWIF;
    array fvalfr[4] FVALTIF FVALWIF FVALTIM FVALWIM;
    array fvalmr[4] FVALTIM FVALWIM FVALTIF FVALWIF;
    do i = 1 to 4;
      if finrsex eq 2 then do;
        if insure[i] eq 1 then do;
          benefr[i] = 0;
          premfr[i] = 0;
          fvalfr[i] = 0;
          end;
        else if insure[i] eq 5 then do;
          if (i in (1,2) and RELATE_F in (1,2,3)) or
             (i in (3,4) and RELATE_M in (1,2,3)) then do;
            benefr[i] = .N;
            premfr[i] = .N;
            fvalfr[i] = .N;
            end;
          else do;
            benefr[i] = .;
            premfr[i] = .;
            fvalfr[i] = .;
            end;
          end;
        else do;
          benefr[i] = insure[i];
          premfr[i] = insure[i];
          fvalfr[i] = insure[i];
          end;
        end;
      else do;
        if insure[i] eq 1 then do;
          benemr[i] = 0;
          premmr[i] = 0;
          fvalmr[i] = 0;
          end;
        else if insure[i] eq 5 then do;
          if (i in (1,2) and RELATE_M in (1,2,3)) or
             (i in (3,4) and RELATE_F in (1,2,3)) then do;
            benemr[i] = .N;
            premmr[i] = .N;
            fvalmr[i] = .N;
            end;
          else do;
            benemr[i] = .;
            premmr[i] = .;
            fvalmr[i] = .;
            end;
          end;
        else do;
          benemr[i] = insure[i];
          premmr[i] = insure[i];
          fvalmr[i] = insure[i];
          end;
        end;
      end;

    ADVISE_R = 0;
    ctgive = 0;

    do i = 1 to 10;
      if v474[i] eq LINEP or v474[i] eq 11 then HELPDEED = HELPDEED +
      1;
      if v479[i] eq LINEP or v479[i] eq 11 then HELP10YR = HELP10YR +
      1;
      if v748[i] eq LINEP then do;
        GIVEMEDI = GIVEMEDI + 1;
        if V749 ge 0 then GIVEMEDD = GIVEMEDD + V749; else GIVEMEDD =
        V749;
        end;
      if v748[i] gt 0 then ctgive = ctgive + 1;
      if v1107[i] eq LINEP then DEEDHOME = 1;
      if v1891[i] eq LINEP then do;
        if finrsex eq 2 then do;
           BENETIF = 1;
           PREMTIF = v1887a;
           FVALTIF = v1889a;
           end;
        else do;
           BENETIM = 1;
           PREMTIM = v1887a;
           FVALTIM = v1889a;
           end;
        end;
      else if v1891[i] eq 11 then do;
        if finrsex eq 2 and childf then do;
           BENETIF = 1;
           PREMTIF = v1887a/ctchildf;
           FVALTIF = v1889a/ctchildf;
           end;
        else if finrsex eq 1 and childm then do;
           BENETIM = 1;
           PREMTIM = v1887a/ctchildm;
           FVALTIM = v1889a/ctchildm;
           end;
        end;
      if v1899[i] eq LINEP then do;
        if finrsex eq 2 then do;
           BENEWIF = 1;
           PREMWIF = v1895a;
           FVALWIF = v1897a;
           end;
        else do;
           BENEWIM = 1;
           PREMWIM = v1895a;
           FVALWIM = v1897a;
           end;
        end;
      else if v1899[i] eq 11 then do;
        if finrsex eq 2 and childf then do;
           BENEWIF = 1;
           PREMWIF = v1895a/ctchildf;
           FVALWIF = v1897a/ctchildf;
           end;
        else if finrsex eq 1 and childm then do;
           BENEWIM = 1;
           PREMWIM = v1895a/ctchildm;
           FVALWIM = v1897a/ctchildm;
           end;
        end;
      if v1907[i] eq LINEP then do;
        if finrsex eq 2 then do;
           BENETIM = 1;
           PREMTIM = v1903a;
           FVALTIM = v1905a;
           end;
        else do;
           BENETIF = 1;
           PREMTIF = v1903a;
           FVALTIF = v1905a;
           end;
        end;
      else if v1907[i] eq 11 then do;
        if finrsex eq 2 and childm then do;
           BENETIM = 1;
           PREMTIM = v1903a/ctchildm;
           FVALTIM = v1905a/ctchildm;
           end;
        else if finrsex eq 1 and childf then do;
           BENETIF = 1;
           PREMTIF = v1903a/ctchildf;
           FVALTIF = v1905a/ctchildf;
           end;
        end;
      if v1916[i] eq LINEP then do;
        if finrsex eq 2 then do;
           BENEWIM = 1;
           PREMWIM = v1912a;
           FVALWIM = v1914a;
           end;
        else do;
           BENEWIF = 1;
           PREMWIF = v1912a;
           FVALWIF = v1914a;
           end;
        end;
      else if v1916[i] eq 11 then do;
        if finrsex eq 2 and childm then do;
           BENEWIM = 1;
           PREMWIM = v1912a/ctchildm;
           FVALWIM = v1914a/ctchildm;
           end;
        else if finrsex eq 1 and childf then do;
           BENEWIF = 1;
           PREMWIF = v1912a/ctchildf;
           FVALWIF = v1914a/ctchildf;
           end;
        end;
      if v1920[i] eq LINEP or v1920[i] eq 11 then ADVISE_R = 1;
      end;
    if ctgive gt 1 and GIVEMEDD ge 0 then GIVEMEDD = GIVEMEDD/ctgive;
    do i = 1 to 5;
      if V495a[i] eq LINEP or V495a[i] eq 11 then do;
        HELP1YR = HELP1YR + 1;
        if HELP1YRD eq 0 then HELP1YRD = v499a[i];
          else if HELP1YRD > 0 and v499a[i] > 0
            then HELP1YRD = HELP1YRD + v499a[i];
        if HELP1YRX eq 0 then HELP1YRX = v499xa[i];
          else if HELP1YRX > 0 and v499xa[i] > 0
            then HELP1YRX = HELP1YRX + v499xa[i];
        end;
      end;
    do i = 1 to 8;
      if v1151[i] eq LINEP then OWNRHOME = 1;
      end;
    giveall = 0;
    do i = 1 to 3;
      if v1603a[i] eq 11 and not giveall then do;
        giveall = 1;
        GIVEFIN = 1;
        if GIVEFIND eq 0 then GIVEFIND = v1606a[i];
        if GIVEFINC eq . then GIVEFINC = v1606ca[i];
        if GIVEFINX eq 0 then GIVEFINX = v1606xa[i];
        if GIVENOW eq . then GIVENOW = v1611a[i];
        if GIVEFUT eq . then GIVEFUT = v1612a[i];
        end;
      else if V1603a[i] eq LINEP then do;
        GIVEFIN = GIVEFIN + 1;
        if giveall then do;
          GIVEFIND = v1606a[i];
          GIVEFINC = v1606ca[i];
          GIVEFINX = v1606xa[i];
          GIVENOW = v1611a[i];
          GIVEFUT = v1612a[i];
          end;
        else do;
          if GIVEFIND eq 0 then GIVEFIND = v1606a[i];
            else if v1606a[i] > 0 and GIVEFIND > 0
              then GIVEFIND = GIVEFIND + v1606a[i];
          if GIVEFINC eq . then GIVEFINC = V1606ca[i];
            else GIVEFINC = 9;
          if GIVEFINX eq 0 then GIVEFINX = v1606xa[i];
            else if v1606xa[i] > 0 and GIVEFINX > 0
              then GIVEFINX = GIVEFINX + v1606xa[i];
          if GIVENOW eq . then GIVENOW = v1611a[i];
          if GIVEFUT eq . then GIVEFUT = v1612a[i];
          end;
        end;
      end;
    if module7f eq 1 then do;
      if V2195F eq LINEP then V2195F = 1;
        else V2195F = 0;
      if V2198F eq LINEP then V2198F = 1;
        else V2198F = 0;
      if V2201F eq LINEP then V2201F = 1;
        else V2201F = 0;
      end;
    else do;
      V2195F = .;
      V2198F = .;
      V2201F = .;
      end;
    if module7m eq 1 then do;
      if V2195M eq LINEP then V2195M = 1;
        else V2195M = 0;
      if V2198M eq LINEP then V2198M = 1;
        else V2198M = 0;
      if V2201M eq LINEP then V2201M = 1;
        else V2201M = 0;
      end;
    else do;
      V2195M = .;
      V2198M = .;
      V2201M = .;
      end;
    end;
*
**
***  Set the above variables to INAP (.) for non-children
**
;
  else do;
    CHLDCARE = .;
    FUTURHLF = .;
    FUTURHLM = .;
    FUTURHLT = .;
    MOVENRM = .;
    WILLBENM = .;
    MOVENRF = .;
    WILLBENF = .;
    HELPDEED = .;
    HELP10YR = .;
    HELP1YR = .;
    HELP1YRX = .;
    GIVEMEDI = .;
    GIVEMEDD = .;
    DEEDHOME = .;
    OWNRHOME = .;
    BENETIF = .;
    BENEWIF = .;
    BENETIM = .;
    BENEWIM = .;
    PREMTIF = .;
    PREMWIF = .;
    PREMTIM = .;
    PREMWIM = .;
    FVALTIF = .;
    FVALWIF = .;
    FVALTIM = .;
    FVALWIM = .;
    ADVISE_R = .;
    HELPDEED = .;
    HELP10YR = .;
    HELP1YR  = .;
    HELP1YRX = .;
    CHLDCARE = .;
    GIVEMEDI = .;
    GIVEMEDD = .;
    GIVEFIN = .;
    GIVEFIND = .;
    GIVEFINC = .;
    GIVEFINX = .;
    GIVENOW = .;
    GIVEFUT = .;
    DEEDHOME = .;
    OWNRHOME = .;
    V2195M = .;
    V2198M = .;
    V2201M = .;
    V2195F = .;
    V2198F = .;
    V2201F = .;
    end;

  label RELATE_M = 'Relationship to male R'
        RELATE_F = 'Relationship to female R'
        SEXP     = 'Sex of child/other hh member'
        MARSTATP = 'Marital status'
        AGEP     = 'Age of child/other hh member'
        EDUCP    = 'Education of child/other hh member'
        WORKP    = 'Work status of child/other hh member'
        NUMKIDSP = '# of children of child/hh member'
        AGESPP   = 'Age of spouse of child/hh member'
        EDUCSPP  = 'Education of spouse of child/hh member'
        WORKSPP  = 'Work status of spouse of child/hh member'
        V481C   = 'MD category for D11, hh member earnings'
        V489C   = 'MD category for D18, sp member earnings'
        V458C   = 'Category for D30-32, child hh income'
        V775HF   = 'Help female R: walking'
        V783HF   = 'Help female R: dressing'
        V791HF   = 'Help female R: bathing'
        V799HF   = 'Help female R: eating'
        V805HF   = 'Help female R: getting in/out of bed'
        V823HF   = 'Help female R: toileting'
        V913HF   = 'Help female R: IADLs first helper'
        V924HF   = 'Help female R: IADLs second helper'
        V950HF   = 'Help female R: manage money'
        FUTURHLF = 'Female R reports would help if needed'
        ADLHELPF = 'Help female R: number ADLs'
        IADLHLPF = 'Help female R: IADLs'
        ALLHELPF = 'Help female R: number ADLs, IADLs'
        V775HM   = 'Help male R: walking'
        V783HM   = 'Help male R: dressing'
        V791HM   = 'Help male R: bathing'
        V799HM   = 'Help male R: eating'
        V805HM   = 'Help male R: getting in/out of bed'
        V823HM   = 'Help male R: toileting'
        V913HM   = 'Help male R: IADLs first helper'
        V924HM   = 'Help male R: IADLs second helper'
        V950HM   = 'Help male R: manage money'
        FUTURHLM = 'Male R reports would help if needed'
        ADLHELPM = 'Help male R: number ADLs'
        IADLHLPM = 'Help male R: IADLs'
        ALLHELPM = 'Help male: number ADLs, IADLs'
        ADLHELPT = 'Help either R: number ADLs'
        IADLHLPT = 'Help either R: IADLs'
        ALLHELPT = 'Help either R: number ADLs, IADLs'
        FUTURHLT = 'Either R reports would help if needed'
        MOVENRM  = 'Male R expects to move near'
        MOVENRF  = 'Female R expects to move near'
        WILLBENM = 'Male R names in will'
        WILLBENF = 'Female R names in will'
        HELPDEED = 'R gave deed to house'
        HELP10YR = 'R gave $5000+ in last 10 years'
        HELP1YR  = 'R gave $500+ in last 12 months'
        HELP1YRD = 'Amount given by R in last 12 months'
        HELP1YRX = 'Amount given by R in last 12 months, imp'
        CHLDCARE = 'R cared for grandchild 1+ years'
        GIVEMEDI = 'Helped R with medical expenses'
        GIVEMEDD = 'Dollar amount medical expenses paid'
        GIVEFIN  = 'Financial assistance to R last year'
        GIVEFIND = 'Amount assistance to R last year'
        GIVEFINC = 'Bracket code for amount assistance'
        GIVEFINX = 'Amount assistance to R last year, imp'
        GIVENOW  = 'Assistance continues this year'
        GIVEFUT  = 'Assistance expected in future'
        DEEDHOME = 'Named on title to R''s home'
        OWNRHOME = 'Owns R''s home'
        BENETIM  = 'Beneficiary of term ins by male R'
        PREMTIM  = 'Annual premium, term ins from male R'
        FVALTIM  = 'Face value, term ins from male R'
        BENETIF  = 'Beneficiary of term ins by female R'
        PREMTIF  = 'Annual premium, term ins from female R'
        FVALTIF  = 'Face value, term ins from female R'
        BENEWIM  = 'Beneficiary of whole ins by male R'
        PREMWIM  = 'Annual premium, whole ins from male R'
        FVALWIM  = 'Face value, whole ins from male R'
        BENEWIF  = 'Beneficiary of whole ins by female R'
        PREMWIF  = 'Annual premium, whole ins from female R'
        FVALWIF  = 'Face value, whole ins from female R'
        ADVISE_R = 'R consults on major decisions'
        V2195F   = 'Module 7: manages finances for fem R'
        V2198F   = 'Module 7: manages investments for fem R'
        V2201F   = 'Module 7: fem R consults on investments'
        V2195M   = 'Module 7: manages finances for male R'
        V2198M   = 'Module 7: manages investments for male R'
        V2201M   = 'Module 7: male R consults on investments';
run;

*
**
***  The next file management step is to add the helper-level
***    variables to the merged household-level file created in
***    the previous step.
**
;

proc sort data=pfile1 out=pfile2;
  by HHCHID;
run;
data helper1;
  set AHEAD1.AHGHP;
  HHCHID = 100*HHID;
  if LINEHP ge 0 then HHCHID = HHCHID + LINEHP;
run;
proc sort data=helper1 out=helper2;
  by HHCHID;
run;
data AHEAD1.AHGPX;
  merge helper2 pfile2(in=chrec);
  by HHCHID;
  if chrec;
  retain whohelpm whohelpf TIMEHELP MDTIMEHL PAIDHELP MEDCHELP
    DLLRHELP MDDLLRHL G100HELP;
  if first.HHCHID then do;
    whohelpm = 0;
    whohelpf = 0;
    TIMEHELP = 0;
    MDTIMEHL = 0;
    PAIDHELP = 0;
    MEDCHELP = 0;
    DLLRHELP = 0;
    MDDLLRHL = 0;
    G100HELP = 0;
    end;
  if LINEHP gt 0 then do;
    if ID eq IDM then whohelpm = 10 * whohelpm + RELATEP;
    if ID eq IDF then whohelpf = (whohelpf + RELATEP)/10;
    if V993 gt 0 then do;
      if V992 eq 1 then TIMEHELP = TIMEHELP + 7 * V993;
        else if V992 eq 2 then TIMEHELP = TIMEHELP + 3.5 * V993;
        else if V992 eq 3 then TIMEHELP = TIMEHELP + V993;
        else if V992 eq 4 then TIMEHELP = TIMEHELP + 1;
      end;
    else MDTIMEHL = MDTIMEHL + 1;
    if V994 eq 1 then PAIDHELP = PAIDHELP + 1;
    if V995 eq 1 then MEDCHELP = MEDCHELP + 1;
    if V997 eq 1 then monthly = V996;
      else if V997 eq 2 then monthly = 4 * V996;
      else if V997 eq 3 then monthly = 30 * V996;
      else if V997 eq 5 then monthly = V996/12;
      else monthly = .;
    if V997 ge 0 and V996 ge 0 then do;
      if V994 eq 1 then DLLRHELP = DLLRHELP + monthly;
      end;
    else MDDLLRHL = MDDLLRHL + 1;
    if monthly ge 100 or V998 eq 1 then G100HELP = G100HELP + 1;
    end;
  if last.HHCHID;
  WHOHELPT = whohelpm + whohelpf;
  if WHOHELPT eq 0 then do;
    PAIDHELP = .;
    DLLRHELP = .;
    G100HELP = .;
    end;
  if PAIDHELP le 0 then MEDCHELP = .;
  label IDF      = 'Female respondent ID'
        IDM      = 'Male respondent ID'
        WHOHELPT = 'String of RELATEPs, helpers of either R'
        TIMEHELP = 'Total time helped per week'
        MDTIMEHL = 'Number of helpers with MD on time'
        PAIDHELP = 'Whether paid for help (count)'
        MEDCHELP = 'If paid, if Medicare helps (count)'
        DLLRHELP = 'Total paid per month'
        MDDLLRHL = 'Number of helpers with MD on pay'
        G100HELP = 'Whether paid at least $100/month';
  drop monthly ID LINEHP RELATEP IWN V990 -- GRKIDREL HHCHID
    whohelpm whohelpf X1;
run;
proc contents data=AHEAD1.AHGPX;
  title 'Listing of variables in revised child/other hh member file';
run;


[Return to Beginning][Table of Contents]
19 June 1999