Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LIBNAME LIBRARY 'D:\Users\AdelinouxX\Desktop\Travail_SAS\FORMAT';
- LIBNAME OUT 'D:\Users\AdelinouxX\Desktop\Travail_SAS\DATA';
- data out.reglog;
- set out.datalabel;
- keep happy3 health3 sclact2 lknemny3 sblwcoa3 hincfel2 sclmeet2;
- run;
- ods pdf file = 'D:\Users\AdelinouxX\Desktop\Travail_SAS\FORMAT\RESULTS\reglog_1expcat.pdf';
- option nodate;
- title1 'La r?gression logistique avec une explicative cat?gorielle';
- title2 "Analyse descriptive pr?alable : Table de contingence";
- proc freq data = out.reglog;
- tables health3*happy3/out = out.health_eval;
- run;
- proc logistic data = out.health_eval;
- class health3 (ref = 'A) Bonne santé')/param=ref;
- weight count;
- model happy3(event= 'B) Moyennement heureux') = health3/expb clodds = WALD;
- run;
- proc freq data = out.reglog;
- tables sclact2*happy3/out = out.sclact_eval;
- run;
- proc logistic data = out.sclact_eval;
- class sclact2 (ref = 'B) Beaucoup')/param=ref;
- weight count;
- model happy3(event= 'B) Moyennement heureux') = sclact2/expb clodds = WALD;
- run;
- proc freq data = out.reglog;
- tables lknemny3*happy3/out = out.lknemny_eval;
- run;
- proc logistic data = out.lknemny_eval;
- class lknemny3 (ref = 'B) Plutôt pas')/param=ref;
- weight count;
- model happy3(event= 'B) Moyennement heureux') = lknemny3/expb clodds = WALD;
- run;
- proc freq data = out.reglog;
- tables sblwcoa3*happy3/out = out.sblwcoa_eval;
- run;
- proc logistic data = out.sblwcoa_eval;
- class sblwcoa3 (ref = 'A) Oui')/param=ref;
- weight count;
- model happy3(event= 'B) Moyennement heureux') = sblwcoa3/expb clodds = WALD;
- run;
- proc freq data = out.reglog;
- tables hincfel2*happy3/out = out.hincfel_eval;
- run;
- proc logistic data = out.hincfel_eval;
- class hincfel2 (ref = 'A) Confortable')/param=ref;
- weight count;
- model happy3(event= 'B) Moyennement heureux') = hincfel2/expb clodds = WALD;
- run;
- proc freq data = out.reglog;
- tables sclmeet2*happy3/out = out.sclmeet_eval;
- run;
- proc logistic data = out.sclmeet_eval;
- class sclmeet2 (ref = 'B) Beaucoup')/param=ref;
- weight count;
- model happy3(event= 'B) Moyennement heureux') = sclmeet2/expb clodds = WALD;
- run;
- title;
- ods pdf close;
- /* DEUX EXPLICATIVES CATEGORIELLES */
- ods pdf file = 'D:\Users\AdelinouxX\Desktop\Travail_SAS\RESULTS\reglog_2expcat.pdf';
- title1 'La r?gression logistique avec deux explicatives cat?gorielles';
- title2 "Evaluation de la d?mocratie en fonction du niveau d'aisance et de la place dans la soci?t?";
- /* Table de contingence health3*sblwcoa3 */
- title3 "Table de contingence health3*sblwcoa3";
- proc freq data = out.reglog;
- tables health3*sblwcoa3*happy3/nocol nopercent;
- run;
- title3 "Mod?le de r?gression - avec interaction" ;
- proc logistic data = out.reglog;
- class health3 (ref = 'A) Bonne santé') sblwcoa3 (ref = 'A) Oui')/param=ref;
- model happy3(event= 'B) Moyennement heureux') = health3 sblwcoa3 health3*sblwcoa3;
- run;
- /* Table de contingence hincfel2*sblwcoa3 */
- title3 "Table de contingence hincfel2*sblwcoa3";
- proc freq data = out.reglog;
- tables health3*sblwcoa3*happy3/nocol nopercent;
- run;
- title3 "Mod?le de r?gression - avec interaction" ;
- proc logistic data = out.reglog;
- class hincfel2 (ref = 'A) Confortable') sblwcoa3 (ref = 'A) Oui')/param=ref;
- model happy3(event= 'B) Moyennement heureux') = hincfel2 sblwcoa3 hincfel2*sblwcoa3;
- run;
- /* Table de contingence hincfel2*sblwcoa3 */
- title3 "Table de contingence health3*lknemny3";
- proc freq data = out.reglog;
- tables health3*lknemny3*happy3/nocol nopercent;
- run;
- title3 "Mod?le de r?gression - avec interaction" ;
- proc logistic data = out.reglog;
- class health3 (ref = 'A) Bonne santé') lknemny3 (ref = 'B) Plutôt pas')/param=ref;
- model happy3(event= 'B) Moyennement heureux') = health3 lknemny3 health3*lknemny3;
- run;
- title;
- ods pdf close;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement