libname Joy "/home/u XXXXXXXXXX/sasuser.v94";
proc contents data=Joy.joy
fss2018;
un;
data WORK;
set Joy.joy
fss2018;
if 6<=SLEPTIM1<=10 then sleepcat=1;
obese=0;
if _BMI5CAT = 4 then obese=1;
XXXXXXXXXXeducat=0; * HS or less;
if _EDUCAG in (3,4) then educat=1; *College or more;
XXXXXXXXXXemployed=0; *not employed
etired/unable to work;
if employ1 in (1,2,5,6) then employed=1; *employed;
un;
proc freq data=Joy.joyBRFSS2018; *table 1;
tables ( educat employed)*obese / chisq;
un;
proc freq data=Joy.joyBRFSS2018; *table 2;
tables (obese educat employed)*sleepcat / chisq;
un;
proc logistic data=Joy.joyBRFSS2018; *table 3;
class sleepcat (ref='0') obese (ref='0') educat (ref='0') employed (ref='0')/ param=ref;
model sleepcat = obese educat employed ;
*title 'Multivariable Logistic Regression for Odds';
un;