/* CODE SHEET FOR FRAMINGHAM DATA FILE: 5209 RECORDS Var Name Description Range/Codes ------------------------------------------------------------- 1 lexam Last exam 2-16 for 1997 subjects who died just prior to last exam 16 for 3218 subjects who were alive at exam 16 2 surv Survival 0 = alive at exam 16 1 = died prior to exam 16 3 cause Cause of death 0 = still alive 1 = sudden death from CHD 2 = other coronary heart disease 3 = stroke (CVA) 4 = other cerebral vascular disease 5 = cancer 6 = other causes of death 9 = cause unknown 4 cexam Exam 1st CHD 1-16: exam at which CHD 1st diagnosed 0 = CHD never diagnosed 5 chd Death from CHD 1 = Death from cause 1 or 2 0 = Alive or death from other cause 6 cva Death from CVD 1 = Death from cause 3 or 4 0 = Alive or death from other cause 7 ca Death from CA 1 = Death from cause 5 0 = Alive or death from other cause 8 oth Death from OTH 1 = Death from cause 3-9 0 = Alive or death from CHD 9 sex Sex 1 = Male 2 = Female 10 age Age 28-62 age (years) at first exam 11 ht Height 51.5 - 76.5 height (inches) 1st exam 6 missing values (-1) 12 wt Weight 67 - 300 weight (pounds) 1st exam 6 missing values (-1) 13 scl1 SC Exam 1 96 - 503 serum cholesterol (mg/100ml) 2,037 missing values (-1)* 14 scl2 SC Exam 2 115 - 568 serum cholesterol (mg/100ml) 626 missing values (-1)* 15 dbp Diastolic 50 - 160 mm/Hg 1st exam Blood Pressure 16 sbp Systolic 82 - 300 mm/Hg 1st exam Blood Pressure 17 mrw Metropolitan 67 - 238 percent of "normal" Relative Weight 6 missing values (-1) 18 smok Amount smoked 0 - 60 cigarettes per day (exam 1) 36 missing values (-1) _____________________________________________________ * 152 subjects missing serum cholesterol at BOTH exams */ * USER: Point Stata to correct path for fram_data.txt file * * ... use Set Working Folder (from File menu) * -------------- Stata ---------------- clear infile lexam dead cause cexam dead_chd dead_cva dead_ca not_chd sex age ht wt scl1 scl2 dbp sbp mrw smok using "fram_data.txt" recode age -1=. recode ht -1=. recode wt -1=. recode dbp -1=. recode age -1=. recode scl1 -1=. recode scl2 -1=. recode mrw -1=. recode smok -1=. label variable lexam "last exam" label variable cause "cause of death" label variable cexam "exam chd dx-ed" label variable dbp "diastolic BP" label variable sbp "systolic BP" label variable scl1 "serum cholesterol-exam1" label variable scl2 "serum cholesterol-exam2" label variable smok "cigarettes/day" label variable mrw "Metropolitan Relative Weight" * for survival analysis [ put death 1 year before 'last' exam ] gen fu_year = 2*(lexam -1) - dead * for NEW heart disease gen t_newchd = (cexam>1) * ( 2*(cexam -1) - 1) + (cexam==0) * fu_year gen i_newchd = cexam > 1 replace t_newchd =. if cexam==1 replace i_newchd =. if cexam==1 * indicator variables for male and female gen i_male = (sex == 1) gen i_female = (sex == 2) drop sex * serum cholesterol gen chol = (scl1 + scl2 ) / 2 replace chol = scl2 if scl1==. replace chol = scl1 if scl2==. * for survival analysis stset fu_year, failure(dead) stcox i_male stcox, nohr