BookmarkSubscribeRSS Feed
Gowthami99
Fluorite | Level 6
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:
Risk Age
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 !!
2 REPLIES 2
Jagadishkatam
Amethyst | Level 16

You can achieve this by simple linear regression from proc reg as below where y = risk and x=age

 

proc reg;

model y = x;

run;

 

proc reg;

model risk=age;

run;

 

then use formula y = mx + c;

 

c= intercept

m=slope

y = mean of risk

x= mean of age

 

image.png

 

Thanks,
Jag

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 923 views
  • 0 likes
  • 3 in conversation