BookmarkSubscribeRSS Feed
HitmonTran
Pyrite | Level 9

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

 

HitmonTran_0-1612112244353.png

 

	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;

 

1 REPLY 1
ballardw
Super User

@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

 

HitmonTran_0-1612112244353.png

 

	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.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 1 reply
  • 615 views
  • 0 likes
  • 2 in conversation