/*************** bweight97a.sps ***********************/ set width=80 length=none. title 'Logistic Regression of Low Birth Weight Data'. subtitle 'Test AGE & FTV controlling for LWT and RACE'. data list file = 'bweight.dat' free / id low age lwt race smoke ptl ht ui ftv bwt. variable labels id 'Identification Code' low 'Low Birth Weight' lwt 'Weight at Last Period' smoke 'Smoke during Pregnancy' ptl 'History of Premature Labour (# of times)' ht 'History of Hypertension' ui 'Presence of Uterine Irritability' ftv 'Visits to Doctor During 1st trimester' bwt 'Birth Weight in Grams' . value labels low 0 'No: 2500 g +' 1 'Yes: under 2500 g'/ race 1 'White' 2 'Black' 3 'Other'/ ht ui 0 'No' 1 'Yes' . logistic regression low with age lwt race ftv / categorical race / contrast(race) = indicator(1) /* Indicator coding; category 1 / enter lwt race /* is the reference category. / enter age ftv .