Advertisement
Guest User

TP0

a guest
Aug 14th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SAS 2.81 KB | None | 0 0
  1.  
  2. LIBNAME LIBRARY 'D:\Users\AdelinouxX\Desktop\Travail_SAS\FORMAT';
  3. LIBNAME OUT 'D:\Users\AdelinouxX\Desktop\Travail_SAS\DATA';
  4.  
  5. ods pdf file = 'D:\Users\AdelinouxX\Desktop\Travail_SAS\RESULTS\reglog_polytomiale.pdf';
  6. title1 'R?gression logistique polytomiale : X = EVALDEMO4, Y = polintr2, Z = reg3';
  7. title2 'S?lection du mod?le';
  8. proc logistic data = out.datalabel;
  9.         class health3 (ref = 'A) Bonne santé') sblwcoa3 (ref = 'A) Oui')/param=ref;
  10.     model happy3(event= 'B) Moyennement heureux') = health3 sblwcoa3 health3*sblwcoa3/link = glogit;
  11. run;
  12. /*Test de type 3 health3*sblwcoa3 p=0.8664  --> retrait , pas d'interaction*/
  13.  
  14. proc logistic data = out.datalabel;
  15.         class health3 (ref = 'A) Bonne santé') sblwcoa3 (ref = 'A) Oui')/param=ref;
  16.     model happy3(event= 'B) Moyennement heureux') = health3 sblwcoa3/link = glogit;
  17. run;
  18. /*Test de type 3 : health3  <.0001 sblwcoa3 0.0521 happy3 = health3 */
  19.  
  20. proc logistic data = out.datalabel;
  21.         class hincfel2 (ref = 'A) Confortable') sblwcoa3 (ref = 'A) Oui')/param=ref;
  22.     model happy3(event= 'B) Moyennement heureux') = hincfel2 sblwcoa3 hincfel2*sblwcoa3/link = glogit;
  23. run;
  24.  
  25. /*p=0.0057  il y a interaction entre sblwcoa3 et hincfel2 sur happy3 */
  26.  
  27. proc logistic data = out.datalabel;
  28.         class health3 (ref = 'A) Bonne santé') lknemny3 (ref = 'B) Plutôt pas')/param=ref;
  29.     model happy3(event= 'B) Moyennement heureux') = health3 lknemny3 health3*lknemny3/link = glogit;
  30. run;
  31.  
  32. /* health3*lknemny3 = 0.3759 pas d'interaction*/
  33.  
  34. proc logistic data = out.datalabel;
  35.         class health3 (ref = 'A) Bonne santé') lknemny3 (ref = 'B) Plutôt pas')/param=ref;
  36.     model happy3(event= 'B) Moyennement heureux') = health3 lknemny3/link = glogit;
  37. run;
  38.  
  39. /* health3  <.0001 lknemny3 <.0001 happy3 = health3 + lknemny3 */
  40.  
  41. */Modèles retenus :   happy3 = hincfel2*sblwcoa3 */
  42.  
  43. title2 "Examen des param?tres";
  44. title3 "(4-1) r?gressions : choix 'i' Vs choix 'B) Moyennement heureux')";
  45. proc logistic data = out.datalabel;
  46.     class hincfel2 (ref = 'B) Confortable') sblwcoa3 (ref = 'A) Oui')/param=ref;
  47.     model happy3(event= 'B) Moyennement heureux') = hincfel2 sblwcoa3/link = glogit;
  48. run;
  49.  
  50. title;
  51. ods pdf close;
  52.  
  53. ods pdf file = 'D:\Users\AdelinouxX\Desktop\Travail_SAS\FORMAT\RESULTS\cotes_prop_log.pdf';
  54.  
  55. title 'Modèle final';
  56. proc logistic data = out.selection;
  57. class hincfel2 (ref='A) Confortable') health3 (ref='A) Bonne santé') lknemny3(ref='B) Plutôt pas') sclmeet2 (ref='B) Beaucoup')
  58.  sblwcoa3(ref='A) Oui') sclact2(ref='B) Beaucoup')
  59. / param=ref ref=first ;
  60. model happy = hincfel2 health3 lknemny3 sclmeet2 sblwcoa3 sclact2
  61.  
  62. health3*sblwcoa3 hincfel2*sblwcoa3 health3*lknemny3
  63.  / expb clparm=both ;
  64. /*oddratio hincfel2;
  65. /*oddratio health3;*/
  66. /*oddratio lknemny3; */
  67. /*oddratio sclmeet2; */
  68. /*oddratio sblwcoa3;*/
  69. /* oddratio sclact2; */
  70.  
  71. run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement