1 / 16

Logistic 回归

Logistic 回归. SAS 程序. data logitex1; input x n m; cards; 1.5 25 8 2.5 32 13 3.5 58 26 4.5 52 22 5.5 43 20 6.5 39 22 7.5 28 16 8.5 21 12 9.5 15 10 ; run ;. data logitex1i; set logitex1; p=m/n; q=log(p/( 1 -p)); w=n*p*( 1 -p); run ; proc print data=logitex1i; run ;

boone
Télécharger la présentation

Logistic 回归

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Logistic 回归

  2. SAS程序 data logitex1; input x n m; cards; 1.5 25 8 2.5 32 13 3.5 58 26 4.5 52 22 5.5 43 20 6.5 39 22 7.5 28 16 8.5 21 12 9.5 15 10 ; run;

  3. data logitex1i; set logitex1; p=m/n; q=log(p/(1-p)); w=n*p*(1-p); run; procprint data=logitex1i; run; procreg data=logitex1i; model q=x; run; procglm data=logitex1i; model q=x; weight w; run; proclogistic data=logitex1; model m/n=x; run;

  4. LSE 结果

  5. Weighted LSE 结果

  6. Logistic 回归结果

  7. SAS程序 data logitex2; input x3 x1 x2 y; cards; 0 18 850 0 0 21 1200 0 0 23 850 1 0 23 950 1 0 28 1200 1 0 31 850 0 0 36 1500 1 0 42 1000 1 0 46 950 1 0 48 1200 0 0 55 1800 1 0 56 2100 1 0 58 1800 1 1 18 850 0 1 20 1000 0 1 25 1200 0 1 27 1300 0 1 28 1500 0

  8. 1 30 950 1 1 32 1000 0 1 33 1800 0 1 33 1800 1 1 33 1000 0 1 38 1200 0 1 41 1500 0 1 45 1800 1 1 48 1000 0 1 52 1500 1 1 56 1800 1 ; run; proclogistic data=logitex2; model y=x1 x2 x3/selection=stepwise; run;

More Related