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.
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!
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.