BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
saza
Quartz | Level 8

Was told to Predict, with 95% confidence, the values between which the true mean cancer mortality lies for all counties with an exposure index of 5.2.  

code was: 

libname cancer '/home/u59291263/Cancer';
run;

proc contents data=cancer.cancer;run;

proc reg data= cancer.cancer;
model exposure= mortality/ clm cli;
ID mortality;
run;

data work.newobs;
set cancer.cancer;
exposure= 5.2;
run;

proc reg data= work.newobs;
model exposure= mortality/ clm cli;
ID exposure;
run;

 But I am getting 5.2 as all my answers 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

By the way, I just noticed this

 

Shouldn't your PROC REG have 

 

model mortality = exposure/ clm cli;

where exposure predicts mortality (instead of the way you wrote it, where mortality predicts exposure)?

--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

By the way, I just noticed this

 

Shouldn't your PROC REG have 

 

model mortality = exposure/ clm cli;

where exposure predicts mortality (instead of the way you wrote it, where mortality predicts exposure)?

--
Paige Miller
Rick_SAS
SAS Super FREQ

I think you want to predict mortality (the response) from exposure (the independent variable). You have those variables reversed in your MODEL statement.

 

Try this:

data ScoreObs;
exposure= 5.2;
run;

data All;
set cancer ScoreObs(in=score);
NewData = (Score=1);
run;

proc reg data= All plots=none;
model mortality = exposure / clm cli;
output out=ScoreOut Pred=Pred lclm=LowerM uclm=UpperM lcl=LowerI ucl=UpperI;
run;

proc print data=ScoreOut;
where NewData=1;
run;
Rick_SAS
SAS Super FREQ

I assume that this is a homework problem, but I feel compelled to mention that linear regression with PROC REG is probably not the best way to measure mortality, which is a rate in the interval [0, 1]  (or 0 to 100 if you are measuring percentages).  A linear regression could predict a negative mortality rate or a mortality rate that is greater than 100%. Neither of these predictions makes sense, which is why we don't linear regression is not the best way to predict bounded quantities.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 672 views
  • 6 likes
  • 3 in conversation