Ʈ  |  Contact Us
 
Ȩ > SAS Tech & Tip > SAS University Edition
[SAS University Edition] ƽ ȸ м(1) (Logistic Regression) 2019.06.17
ڼ 845 1
http://www.mysas.co.kr/sas_tiptech/d_university_edition.asp?b_no=11118&gotopage=1&con=subject&keyword=&cmd=content&bd_no=36&gubun=

Logistic Regression

 

1. Introduction

ð 츮 Logistic ȸ ˰ п ҽϴ. е ˴ٽ, ƽ ȸͺм з ϴ Դϴ. پ Logistic Regression غ ϰڽϴ. ̹ University Edition Ͽ ǽ , ڵ嵵 Բ ÷ ״ BASE ̿ е ڵ带 ø ˴ϴ.


2. Data

ù ° ʹ 1983Pine Դϴ. Intra-Abdominal sepsis(γ ) ΰ ִ ȯڵ鿡 , θ ϱ Logistic ȸ͸ Ͽϴ. 

 

 

<code1>

data Survival;

input ID Status Shock Malnutrition Alcoholism Age BowelInfraction;

datalines;

1 0 0 0 0 56 0

2 0 0 0 0 80 0

3 0 0 0 0 61 0

4 0 0 0 0 26 0

5 0 0 0 0 53 0

6 1 0 1 0 87 0

7 0 0 0 0 21 0

8 1 0 0 1 69 0

9 0 0 0 0 57 0

10 0 0 1 0 76 0

11 1 0 0 1 66 1

12 0 0 0 0 48 0

13 0 0 0 0 18 0

14 0 0 0 0 46 0

15 0 0 1 0 22 0

16 0 0 1 0 33 0

17 0 0 0 0 38 0

18 0 0 0 0 27 0

19 1 1 1 0 60 1

20 0 0 0 0 59 1

21 1 1 0 0 63 1

22 1 1 1 0 70 0

23 1 0 0 1 49 0

24 0 1 0 0 50 0

25 1 1 1 0 70 0

26 1 0 0 1 49 0

27 1 1 0 0 78 1

28 0 0 1 1 60 0

29 0 0 0 1 60 0

30 1 1 0 0 78 1

31 0 0 0 0 28 1

32 0 0 0 0 80 0

33 0 0 0 0 59 1

34 1 0 1 0 50 1

35 1 0 1 0 68 0

36 0 0 0 0 74 1

37 0 0 1 0 27 0

38 1 0 1 1 66 1

39 1 1 1 0 76 0

40 1 0 0 1 70 1

41 0 0 0 0 36 0

42 0 0 0 0 52 1

43 0 0 0 0 30 1

44 1 1 0 1 60 0

45 0 0 1 1 54 0

46 0 0 0 0 65 0

47 1 0 0 0 47 0

48 0 0 1 1 42 0

49 0 0 0 0 22 0

50 0 1 1 0 44 0

;

ڵ带 ̿Ͽ մϴ. University Edition ٷ ص ǰ, SAS BASE ̿Ͽ Ŀ Importص ˴ϴ.


3. Table Amalysis

Shock ο ο 󵵸 ̺ 캸ڽϴ. ֿܼ մϴ.

- ۾̺м

- work.survival

- Status, Shock ߰

 

<code2>

proc freq data=WORK.SURVIVAL;

      tables (Status) *(Shock) / chisq nopercent norow nocol nocum

            plots(only)=(freqplot mosaicplot);

run;

 

BASE ̿ е ڵ ǽ Ͻø ˴ϴ.

 

 

, Shock ޾ 8/10=0.8, Shock 10/40=0.25, Shock ֽϴ.

 

4. Logistic Regression

츮 ð Logistic ȸͿ ϴ. ̸ ̿Ͽ 跮 ؼ غڽϴ. 츮 ˰ ϴ Դϴ.

4.1 Shock

 

۾ ƽ ȸ

Work.sepsis

Status ߰, ̺Ʈ1

Shock ߰

Sock ߰

 

<code3>

proc logistic data=WORK.SURVIVAL;

      model Status(event='1')=Shock / link=logit technique=fisher;

run;

 Լ Ƿ ڵ ϰ, Ǽ մϴ.

 

ڵ ؼغ?  -1.10̰, Shock 2.48 ˴ϴ. ׷Ƿ

ǰ, Shock 0

̷ ǰ? , P Hat. 0.25, Survival 1 Ȯ 0.25 Ǵ ̴ϴ.

4.2 Sigmoid  ׸

 

۾ ƽ ȸ

Work.sepsis

Status ߰, ̺Ʈ1

Age ߰

Age ߰

ɼ ǥ⺻ ߰ ǥȿǥ üũ


<code4>​

​proc logistic data=WORK.SURVIVAL plots=(effect);

      model Status(event='1') = Age / link=logit technique=fisher;

run;

<code3> ٸ plots ɼ ߰Ͻø ˴ϴ.

Sigmoid  Ǿϴ.

X P   ֽϴ.


5. Conclusion

̹ ð PROC LOGISTIC ڵ, University Edition ̿Ͽ ƽ ȸ ҽϴ. ð ҴϿ м ϰڽϴ.

 

 
 
޴ ȣ
޴ ȣ
 
 [SAS University Edition] ƽ ȸ м(2) (Logistic Regression)
 [SAS University Edition] ȸ м ̷& ǽ (Weighted Linear Regression)