BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
urap
Calcite | Level 5
By how much does the risk increase if the age increases by 10 years
1 ACCEPTED SOLUTION

Accepted Solutions
shahparth260
Quartz | Level 8

Please can you provide base information. Such as if 1 year increase then risk increse XX amount

 

PS

View solution in original post

8 REPLIES 8
shahparth260
Quartz | Level 8

Please can you provide base information. Such as if 1 year increase then risk increse XX amount

 

PS
Kurt_Bremser
Super User

Please follow the instructions for posting questions. Supply example data in a usable form (see my footnotes), the expected result, and the code you already tried.

urap
Calcite | Level 5
Hi
I'm completly new to SAS .kindly bear with me !
so here is my question..how can i predict a value of a particular variable based on another variable value.
for instace : i have a dataset with variables risk, age and it has values as follows:
12 57
24 67
13 58
56 86
28 59
so on..

So now i need to predict the value of the risk if age increases by 10 years or i can say
'By how much does the risk increase if age increases by ten years?'

any help is highly appreciated.Thank you !!
Kurt_Bremser
Super User

What you probably need is the average risk per age:

proc sql;
create table avg_risk as
select age, avg(risk)
from risks
group by age;
quit;

Now it is easy to compare relative risks by age.

shahparth260
Quartz | Level 8

Thanks, @Kurt_Bremser.

I think this credit goes to you, as @urap considered as accepted solution. @urap , is it possible for  you to take that off, please?   

 

PS
urap
Calcite | Level 5
But stil I’m confused about this
Here’s my question ... how much does the RISK increase if the AGE increases by 10 years?
Ex-
Risk Age
12 57

Data smoking;
Set sasclass.smoking;
Risk_R=67*12/57;
Run;
Proc print data=smoking;
Run;

The value of RISK is 14.1 for the age 67(57+10)

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1156 views
  • 1 like
  • 3 in conversation