Reeza, thank you for your previous info you provided with regard to SAS linear regression code. I attempted it but was unsuccessful. Error messages occurred. Here are my SAS codes. data case2; input sleeptime $ lifesatisfaction; datalines; 7.5 23 8.3 19 9.5 16 8.5 20 6.0 40 8.0 22 7.3 30 7.0 25 8.0 30 6.5 36 7.5 23 8.3 19 9.5 16 8.5 20 6.0 40 8.0 22 7.3 30 7.0 25 8.0 30 6.5 36 7.5 23 8.3 19 9.5 16 8.5 20 6.0 40 8.0 22 7.3 30 7.0 25 8.0 30 6.5 36 ; proc reg data case2; model lifesatisfaction = sleeptime / p r; plot predicted * sleeptime = 'p' lifesatisfaction * sleeptime = '*'/ overlay; plot residual.* predicted.; output sleeptime $ lifesatisfaction residual=resid1; proc univariate plot data=case2; var resid1; run; A researcher hypothesizes that undergraduate students who are satisfied with their lives will sleep less than those who are not satisfied. To test this hypothesis, she selects a sample of undergraduate students and asks them to maintain a “sleep log” (Drowsy, 1977), keeping track of the number of hours they sleep during each 24-hour period. These logs are maintained for two weeks. At the end of the two-week period, each participant completes the Satisfaction with Life Scale (Giggle & Smirk, 1969), a reliable, validated measure of general satisfaction with life. These are the data the researcher obtained: Participant Mean Hours of Sleep SWL Score 01 7.5 23 02 8.3 19 03 9.5 16 04 8.5 20 05 6.0 40 06 8.0 22 07 7.3 30 08 7.0 25 09 8.0 30 10 6.5 36
... View more