Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Question: Use SAS OnDemand to analyze data from the public use dataset stated in your approved original research question. Submit the SAS Code, Log & Results *Objectives and Research question:...

1 answer below »
Question: Use SAS OnDemand to analyze data from the public use dataset stated in your approved original research question.
Submit the SAS Code, Log & Results
*Objectives and Research question: Restricting to male adults aged 18-64 years and above, is there a relationship between insufficient sleep and obesity among US adults 18-64 after adjusting for education and employment using the 2018 behavioral risk factor surveillance system.
data DATAOUT.joyBRFSS2018 (keep= sleepcat obese  educat employed );
set DATAOUT.cd
fs18 (where=(  ( 1<=SLEPTIM1<=24) and
        ( _BMI5CAT in (1,2,3,4))  and (_EDUCAG in (1,2,3,4)) and (_AGE_G in (1,2,3,4,5)) and   (employ1 in (1,2,3,4,5,6,7,8))   ));
;
          sleepcat=0;
if 6<=SLEPTIM1<=10 then sleepcat=1;
 
          obese=0;
if  _BMI5CAT = 4 then obese=1;
 
          educat=0; * HS or less;
if _EDUCAG in (3,4) then educat=1; *College or more;
 
          employed=0; *not employed
etired/unable to work;
if employ1 in (1,2,5,6) then employed=1;  *employed;
un;
 
proc freq data=DATAOUT.joyBRFSS2018;  *table 1;
tables  ( educat employed)*obese / chisq;
un;
 
proc freq data=DATAOUT.joyBRFSS2018;  *table 2;
tables  (obese educat employed)*sleepcat / chisq;
un;
 
proc logistic data=DATAOUT.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;

Question: Use SAS OnDemand to analyze data from the public use dataset stated in your approved original research question.
Submit the SAS Code, Log & Results
*Objectives and Research question: Restricting to male adults aged 18-64 years and above, is there a relationship between insufficient sleep and obesity among US adults 18-64 after adjusting for education and employment using the 2018 behavioral risk factor surveillance system.
data DATAOUT.joyBRFSS2018 (keep= sleepcat obese  educat employed );
set DATAOUT.cd
fs18 (where=(  ( 1<=SLEPTIM1<=24) and
        ( _BMI5CAT in (1,2,3,4))  and (_EDUCAG in (1,2,3,4)) and (_AGE_G in (1,2,3,4,5)) and   (employ1 in (1,2,3,4,5,6,7,8))   ));
;
          sleepcat=0;
if 6<=SLEPTIM1<=10 then sleepcat=1;
 
          obese=0;
if  _BMI5CAT = 4 then obese=1;
 
          educat=0; * HS or less;
if _EDUCAG in (3,4) then educat=1; *College or more;
 
          employed=0; *not employed
etired/unable to work;
if employ1 in (1,2,5,6) then employed=1;  *employed;
un;
 
proc freq data=DATAOUT.joyBRFSS2018;  *table 1;
tables  ( educat employed)*obese / chisq;
un;
 
proc freq data=DATAOUT.joyBRFSS2018;  *table 2;
tables  (obese educat employed)*sleepcat / chisq;
un;
 
proc logistic data=DATAOUT.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;
Answered Same Day Oct 17, 2022

Solution

Mohd answered on Oct 18 2022
53 Votes
Results_ joy.sas
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here