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
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
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
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;
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
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:
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
Thanks, happy to learn and I will read through it.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: