How to create a computed variable in SAS requiring multiplication by a fixed number? I am creating a new variable called Lifetime colorectal cancer risk that uses cancer occurrences after colonoscopy divided by total person years of observation. There are two segments of lifetime, one is observed follow-up and post followup life expectancy. We use different cancer occurrences and different periods to produce the cancer risk during each of these two periods. The total lifetime risk is the sum of the two risks. For each risk we multiple the cancer rate by mean number of years of observed follow-up in my data, annual total cancer rate multiply by 8.1) and for post follow-up annual interval cancer rate by 19.3. The reason I need to program this is that I want to generate 95% bootstrapped CI for the lifetime cancer risk. But the SAS code is not recognizing the code EligCRCNew * 8.1. Look forward to your help. Sudha Xirasagar
Moved to SAS/VA community.
The title of this thread says SAS Visual Analytics, but the actual question seems to be about Base SAS code.
Can you clarify which product your question is about?
Thanks,
Sam
No, as you guessed my question is different. The bar chart selection happened by chance. My question is:
How to create a computed variable in SAS requiring multiplication by a fixed number? I am creating a new variable called Lifetime colorectal cancer risk that uses cancer occurrences after colonoscopy divided by total person years of observation. There are two segments of lifetime, one is observed follow-up and post followup life expectancy. We use different cancer occurrences and different periods to produce the cancer risk during each of these two periods. The total lifetime risk is the sum of the two risks. For each risk we multiple the cancer rate by mean number of years of observed follow-up in my data, annual total cancer rate multiply by 8.1) and for post follow-up annual interval cancer rate by 19.3. The reason I need to program this is that I want to generate 95% bootstrapped CI for the lifetime cancer risk. But the SAS code is not recognizing the code EligCRCNew * 8.1. Look forward to your help. Sudha Xirasagar
Hi all, any response to my actual question will be appreciated. Thanks, Sudha
> But the SAS code is not recognizing the code EligCRCNew * 8.1.
This:
NEWVAR = EligCRCNew * 8.1 ;
is valid code. You have to show us more if you want more help.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.