13d-LogisticReg

13d-LogisticReg - EXST7015 : Statistical Techniques II...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
EXST7015 : Statistical Techniques II Geaghan Logistic Regression SAS example Page 1 13d-LogisticReg.doc 1 **************************************************************************; 2 *** Logistic regression example - ***; 3 *** Data is from Statistical Methods II classes in recent years ***; 4 *** The objective is to determine the probability of getting an "A" ***; 5 *** in the class from the grade on the first exam. ***; 6 **************************************************************************; 7 8 options ps=256 ls=88 nocenter nodate nonumber; 9 10 data grades; infile 10 ! "C:\Geaghan\EXST\EXST7015New\Fall2002\SAS\05-LogisticReg.DAT" missover; 11 TITLE1 'EXST7015: Probability of A grade in EXST7015'; 12 input Semester $ Exam1 Grade_A $; 13 if exam1 eq . then delete; 14 interval = 5; Score1 = int(exam1/interval)*interval + (interval/2); 15 if score1 gt 100 then score1=100; 16 indicator = 0; if Grade_A eq 'TRUE' then indicator = 1; 17 cards; NOTE: The infile "C:\Geaghan\EXST\EXST7015New\Fall2002\SAS\05-LogisticReg.DAT" is: File Name=C:\Geaghan\EXST\EXST7015New\Fall2002\SAS\05-LogisticReg.DAT, RECFM=V,LRECL=256 NOTE: 424 records were read from the infile "C:\Geaghan\EXST\EXST7015New\Fall2002\SAS\05-LogisticReg.DAT". The minimum record length was 0. The maximum record length was 14. NOTE: The data set WORK.GRADES has 423 observations and 6 variables. NOTE: DATA statement used: real time 0.06 seconds cpu time 0.06 seconds 17 ! run; 18 ; 19 proc sort data=grades; by exam1; run; NOTE: There were 423 observations read from the data set WORK.GRADES. NOTE: The data set WORK.GRADES has 423 observations and 6 variables. NOTE: PROCEDURE SORT used: real time 0.05 seconds cpu time 0.05 seconds 21 proc freq data=grades; table score1*Grade_A / norow nocol nopercent; 22 TITLE2 'Simple frequencies by 5 point groupings'; 23 run; NOTE: There were 423 observations read from the data set WORK.GRADES. NOTE: The PROCEDURE FREQ printed page 1. NOTE: PROCEDURE FREQ used: real time 0.09 seconds cpu time 0.09 seconds EXST7015: Probability of A grade in EXST7015 Simple frequencies by 5 point groupings The FREQ Procedure Table of Score1 by Grade_A Score1 Grade_A Frequency|FALSE |TRUE | Total ---------+--------+--------+ 52.5 | 1 | 0 | 1 ---------+--------+--------+ 57.5 | 4 | 1 | 5 ---------+--------+--------+ 62.5 | 5 | 0 | 5 ---------+--------+--------+ 67.5 | 12 |
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

13d-LogisticReg - EXST7015 : Statistical Techniques II...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online