BookmarkSubscribeRSS Feed
xiangpang
Quartz | Level 8

Hello,

 

I am randomly creating some datasets with missing data and do imputation with EM. However, rare events could happen and result in no convergence of GEE parameter estimates. 

 

How could I output the location of dataset with those kind of error message?

 

(Error in computing the variance function

Error in parameter estimate covariance computation

Error in estimation routine)

 

Thanks

 

6 REPLIES 6
Reeza
Super User

The log should indicate the data being used in that procedure?

Are you using a macro of some sort or batch processing? Make sure to specify the correct options to see all the relevant details in the log - the options depend on how you're running your code. 

 


@xiangpang wrote:

Hello,

 

I am randomly creating some datasets with missing data and do imputation with EM. However, rare events could happen and result in no convergence of GEE parameter estimates. 

 

How could I output the location of dataset with those kind of error message?

 

(Error in computing the variance function

Error in parameter estimate covariance computation

Error in estimation routine)

 

Thanks

 


 

xiangpang
Quartz | Level 8

Thanks for your reply. Yes, the log did indicate the data with error. I am using MACRO. Because of thousands of random datasets, I am wondering whether there is an option I could use in the MACRO to output the datasets with error message. 

 

Thanks

Reeza
Super User

Try:

 

options mprint symbolgen;

This will give you the full log. You could also add a step after your PROC to test if it completed successfully and if not to output your data set name and a message to the log. 

 

%if &syserror %then %do;
%PUT ERROR:- &DATASETNAME errored out in this iteration;
%end;
xiangpang
Quartz | Level 8

Hello Reeza,

 

Thanks for taking the time to think and respond to my issue.

 

In my understanding, your code just labeled the error, but not output the location of error. Am I right? For example, if there is an error in Nth imputation, how do I save this information? 

 

Also, I got the following error message. 

WARNING: Apparent symbolic reference SYSERROR not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand
       is required. The condition was: &syserror
ERROR: The macro EM will stop executing.
MPRINT(PROJECT):   ;
SYMBOLGEN:  Macro variable I resolves to 10
SYMBOLGEN:  Macro variable I resolves to 11
SYMBOLGEN:  Macro variable N_BOOT resolves to 10
Reeza
Super User

I don't know what you're trying to say here. I can provide code snippets but I can't see your program or what you submitted. The code I posted is wrong, the macro variable is called SYSERR, but it doesn't seem to capture regression errors. You'll probably need a different automatic macro variable. The list is here:

http://documentation.sas.com/?docsetId=mcrolref&docsetTarget=n18mk1d0g1j31in1q6chazvfseel.htm&docset...

 

You clearly have macro variables with all you need though, you could pass them to a data set or do anything you want within the %DO to store the information that are in other macro variables. 


@xiangpang wrote:

Hello Reeza,

 

Thanks for taking the time to think and respond to my issue.

 

In my understanding, your code just labeled the error, but not output the location of error. Am I right? For example, if there is an error in Nth imputation, how do I save this information? 

 

Also, I got the following error message. 

WARNING: Apparent symbolic reference SYSERROR not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand
       is required. The condition was: &syserror
ERROR: The macro EM will stop executing.
MPRINT(PROJECT):   ;
SYMBOLGEN:  Macro variable I resolves to 10
SYMBOLGEN:  Macro variable I resolves to 11
SYMBOLGEN:  Macro variable N_BOOT resolves to 10



xiangpang
Quartz | Level 8

Thanks, happy to learn and I will read through it. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 6 replies
  • 853 views
  • 0 likes
  • 2 in conversation