Hi I am receiving an error in log message for proc genmod when determining Relative Risk. This is caused because there are results for one treatment arm and zero for the other. Since my current program is macrotized with other subsets, it doesn't always display a message.
So, how would I prevent the log from displaying an error message in this situation? thanks
proc genmod data = aetime; class actarm(ref='Placebo') usubjid; model aecnt = actarm / dist = poisson link = log offset=futime; estimate 'Rel Risk' actarm 1 -1/ exp; repeated subject = usubjid/ type = unstr; ods output estimates=RELRISK(where=(label='Rel Risk')); run;
@HitmonTran wrote:
Hi I am receiving an error in log message for proc genmod when determining Relative Risk. This is caused because there are results for one treatment arm and zero for the other. Since my current program is macrotized with other subsets, it doesn't always display a message.
So, how would I prevent the log from displaying an error message in this situation? thanks
proc genmod data = aetime; class actarm(ref='Placebo') usubjid; model aecnt = actarm / dist = poisson link = log offset=futime; estimate 'Rel Risk' actarm 1 -1/ exp; repeated subject = usubjid/ type = unstr; ods output estimates=RELRISK(where=(label='Rel Risk')); run;
If you know the cause is " are results for one treatment arm and zero for the other" then test that before calling the procedure. If the error case is in effect do not call the procedure.
You need to decide what the result data set should look like in that case.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.