Learning SAS? Welcome to the exclusive online community for all SAS learners.

Trying to use a GLIMMIX/GLIMMROC macro and getting no output

Reply
New Contributor
Posts: 3

Trying to use a GLIMMIX/GLIMMROC macro and getting no output

Hi there, I am relatively new to SAS and I am trying to run ROC Curves for repeated measures data based on this paper. The authors provide the code for the GLIMMROC macro and they instruct to invoke the GLIMMIX macro first. 

 

Following exactly the code given in the paper I referenced above, I use this syntax in SAS UE:

 

%include"/folders/myfolders/sasuser.v94/GLIMMIX.sas";

%include"/folders/myfolders/sasuser.v94/GLIMMROC.sas";

%macro glimmroc(y=DXAweightstatus , xlist=Anthropometryzc_anBMI,
ID=kp_SubjectID, csg=vc,csr=csh, dataset=perm.HBS);

 

And nothing happens. 

 

My log looks like this: 

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 %include"/folders/myfolders/sasuser.v94/GLIMMIX.sas";
1292
1293 %include"/folders/myfolders/sasuser.v94/GLIMMROC.sas";
1493
1494 %macro glimmroc(y=DXAweightstatus , xlist=Anthropometryzc_anBMI,
1495 ID=kp_SubjectID, csg=vc,csr=csh, dataset=perm.HBS);
1496
1497
1498 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
1499 ODS HTML CLOSE;
1500 &GRAPHTERM; ;*';*";*/;RUN;QUIT;
1501 QUIT;RUN;
1502 ODS HTML5 (ID=WEB) CLOSE;
1503
1504 ODS RTF (ID=WEB) CLOSE;
1505 ODS PDF (ID=WEB) CLOSE;
1506 FILENAME _GSFNAME;
1507 DATA _NULL_;
1508 RUN;
1509 OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
1510

 

 

I included the 2 macro files I created trying to make this work because maybe that is where I made an error. 

 

Thanks!

Attachment
Attachment
Super User
Posts: 17,819

Re: Trying to use a GLIMMIX/GLIMMROC macro and getting no output

You called the macro incorrectly. Remove the word macro from the call. 

 

%glimmroc(...);

 

You may need to restart your session since you left the macro declaration hanging or at least submit a %mend. 

 

FYI you can store your code directly in myfolders, there's no reason to go into sasuser. I know it's not a writeable library but not sure if it impacts anything here. In fact I usually create my own folders and map those instead. 

 

See the UE Help Centre under using your own data in UE. 

New Contributor
Posts: 3

Re: Trying to use a GLIMMIX/GLIMMROC macro and getting no output

Thank you! I made those changes and am making progress but am now getting an error that my ID variable does not exist but it clearly does and I have checked for typo-s.

 

The log is:

 

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 %GLIMMROC(y=DXAweightstatus,x_list=Anthropometryzc_anBMI,ID=kp_SubjectID,c_s_d=vc,
57 c_s_r=csh,dataset=perm.hbs);
ERROR: Variable KP_SUBJECTID not found.
ERROR: File WORK._PRED.DATA does not exist.
WARNING: Output 'tests3' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'solutionf' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'fitstatistics' was not created. Make sure that the output object name, label, or path is spelled correctly.
Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify
that the NOPRINT option is not used.
WARNING: Output 'covparms' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'dimensions' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'modelinfo' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'classlevels' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
ERROR: Variable KP_SUBJECTID not found.
ERROR: File WORK._SOLN.DATA does not exist.
WARNING: The data set WORK._OLDSOLN may be incomplete. When this step was stopped there were 0 observations and 0 variables.
WARNING: Data set WORK._OLDSOLN was not replaced because this step was stopped.
ERROR: File WORK._COV.DATA does not exist.
WARNING: The data set WORK._OLDCOV may be incomplete. When this step was stopped there were 0 observations and 0 variables.
WARNING: Data set WORK._OLDCOV was not replaced because this step was stopped.
ERROR: File WORK._PRED.DATA does not exist.
WARNING: The data set WORK._DS may be incomplete. When this step was stopped there were 0 observations and 10 variables.
WARNING: Data set WORK._DS was not replaced because this step was stopped.
WARNING: Output 'tests3' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'solutionf' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'fitstatistics' was not created. Make sure that the output object name, label, or path is spelled correctly.
Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify
that the NOPRINT option is not used.
WARNING: Output 'covparms' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'dimensions' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'modelinfo' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'classlevels' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
ERROR: Variable KP_SUBJECTID not found.
ERROR: File WORK._PRED.DATA does not exist.
WARNING: Output 'tests3' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'solutionf' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'fitstatistics' was not created. Make sure that the output object name, label, or path is spelled correctly.
Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify
that the NOPRINT option is not used.
WARNING: Output 'covparms' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'dimensions' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'modelinfo' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
WARNING: Output 'classlevels' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that
the NOPRINT option is not used.
ERROR: Variable KP_SUBJECTID not found.
ERROR: Variable estimate is not on file WORK._OLDSOLN.
ERROR: Invalid DROP, KEEP, or RENAME option on file WORK._OLDSOLN.
ERROR: File WORK._SOLN.DATA does not exist.
WARNING: The data set WORK._COMPARE may be incomplete. When this step was stopped there were 0 observations and 5 variables.
WARNING: Data set WORK._COMPARE was not replaced because this step was stopped.
ERROR: Variable estimate is not on file WORK._OLDCOV.
ERROR: Invalid DROP, KEEP, or RENAME option on file WORK._OLDCOV.
ERROR: File WORK._COV.DATA does not exist.
WARNING: The data set WORK._COMPARE may be incomplete. When this step was stopped there were 0 observations and 5 variables.
WARNING: Data set WORK._COMPARE was not replaced because this step was stopped.
ERROR: File WORK._COV.DATA does not exist.
ERROR: File WORK._PRED.DATA does not exist.
WARNING: The data set WORK._STATS may be incomplete. When this step was stopped there were 0 observations and 2 variables.
WARNING: Data set WORK._STATS was not replaced because this step was stopped.

NOTE: There were 4409 observations read from the data set WORK._DS.
NOTE: The data set WORK.PRED has 4409 observations and 27 variables.
NOTE: DATA statement used (Total process time):
real time 0.10 seconds
cpu time 0.06 seconds


NOTE: There were 4409 observations read from the data set WORK.PRED.
NOTE: The data set WORK.DATA0 has 3095 observations and 27 variables.
NOTE: DATA statement used (Total process time):
real time 0.13 seconds
cpu time 0.08 seconds


NOTE: There were 4409 observations read from the data set WORK.PRED.
NOTE: The data set WORK.DATA1 has 1314 observations and 28 variables.
NOTE: DATA statement used (Total process time):
real time 0.23 seconds
cpu time 0.07 seconds


NOTE: There were 4409 observations read from the data set WORK.PRED.
NOTE: The data set WORK.TEMP has 4409 observations and 28 variables.
NOTE: DATA statement used (Total process time):
real time 0.18 seconds
cpu time 0.09 seconds


NOTE: There were 4409 observations read from the data set WORK.TEMP.
NOTE: The data set WORK.OUT has 4409 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.10 seconds
cpu time 0.06 seconds



NOTE: There were 3095 observations read from the data set WORK.DATA0.
NOTE: The data set WORK._DATAA_ has 3095 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.37 seconds
cpu time 0.04 seconds


NOTE: There were 1314 observations read from the data set WORK.DATA1.
NOTE: The data set WORK._DATAB_ has 1314 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.06 seconds


NOTE: There were 4409 observations read from the data set WORK.OUT.
NOTE: The data set WORK._OUT_ has 4409 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.02 seconds


NOTE: IML Ready
NOTE: Module ROC defined.
NOTE: Exiting IML.
NOTE: The data set WORK.OUTDATA has 4409 observations and 1 variables.
NOTE: PROCEDURE IML used (Total process time):
real time 0.98 seconds
cpu time 0.36 seconds



NOTE: There were 4409 observations read from the data set WORK.PRED.
NOTE: The data set WORK.YY has 881800 observations and 29 variables.
NOTE: DATA statement used (Total process time):
real time 36.77 seconds
cpu time 0.61 seconds



NOTE: There were 881800 observations read from the data set WORK.YY.
NOTE: The data set WORK.YY has 881800 observations and 29 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 37.02 seconds
cpu time 5.41 seconds



NOTE: There were 881800 observations read from the data set WORK.YY.
NOTE: The data set WORK.PCT has 400 observations and 7 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 5.57 seconds
cpu time 0.57 seconds


NOTE: There were 400 observations read from the data set WORK.PCT.
NOTE: The data set WORK.SEN has 150 observations and 9 variables.
NOTE: DATA statement used (Total process time):
real time 0.97 seconds
cpu time 0.06 seconds



NOTE: There were 400 observations read from the data set WORK.PCT.
NOTE: The data set WORK.SPC has 149 observations and 9 variables.
NOTE: DATA statement used (Total process time):
real time 0.10 seconds
cpu time 0.05 seconds


NOTE: Missing values were generated as a result of performing an operation on missing values.
Each place is given by: (Number of times) at (Line)Smiley SadColumn).
51 at 30658:146
NOTE: There were 150 observations read from the data set WORK.SEN.
NOTE: There were 149 observations read from the data set WORK.SPC.
NOTE: The data set WORK.CURVE1 has 200 observations and 11 variables.
NOTE: DATA statement used (Total process time):
real time 0.10 seconds
cpu time 0.05 seconds


NOTE: Missing values were generated as a result of performing an operation on missing values.
Each place is given by: (Number of times) at (Line)Smiley SadColumn).
50 at 30658:200 51 at 30658:218
NOTE: There were 200 observations read from the data set WORK.CURVE1.
NOTE: The data set WORK.CURVE has 200 observations and 13 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.02 seconds



NOTE: There were 200 observations read from the data set WORK.CURVE.
NOTE: The data set WORK.CURVE has 200 observations and 13 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.77 seconds
cpu time 0.04 seconds


NOTE: Line generated by the invoked macro "GLIMMROC".
57 _spc1; run; title "ROC curve"; symbol1 i=join v=star line=3 c=red; axis1 order=(0 to 1 by 0.1); axis2 order=(0 to 1
_______
180
57 ! by 0.1) label=(a=90); proc gplot data=curve; plot sensi1*_spc1=1/vaxis=axis2 haxis=axis1; label sensi1='Sensitivity';
57 ! label
ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "GLIMMROC".
57 _spc1; run; title "ROC curve"; symbol1 i=join v=star line=3 c=red; axis1 order=(0 to 1 by 0.1); axis2 order=(0 to 1
_____
180
57 ! by 0.1) label=(a=90); proc gplot data=curve; plot sensi1*_spc1=1/vaxis=axis2 haxis=axis1; label sensi1='Sensitivity';
57 ! label
ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "GLIMMROC".
57 _spc1; run; title "ROC curve"; symbol1 i=join v=star line=3 c=red; axis1 order=(0 to 1 by 0.1); axis2 order=(0 to 1
_____
180
57 ! by 0.1) label=(a=90); proc gplot data=curve; plot sensi1*_spc1=1/vaxis=axis2 haxis=axis1; label sensi1='Sensitivity';
57 ! label
ERROR 180-322: Statement is not valid or it is used out of proper order.

ERROR: Procedure GPLOT not found.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE GPLOT used (Total process time):
real time 0.00 seconds
cpu time 0.02 seconds

58
59 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
71

 

 

 

 

I attached a screenshot showing the variable name is correct. I am getting some output Data Tables but no ROC curve graph that is supposed to be included and amidst all the errors I dont trust the data tables either. Any idea why it wouldnt read the variable name in correctly?

 

Thanks!

 


Screen Shot 2016-11-18 at 4.04.10 PM.png
Frequent Contributor
Posts: 130

Re: Trying to use a GLIMMIX/GLIMMROC macro and getting no outputg

You could try renaming the ID variable within the SAS UE environment to a SAS V5-compliant 8 characters! A 'hail mary pass' I know but the %glimmix() macro is getting long in tooth now, you never know your luck. If there is a transcoding problem in the variable name hiding in plain sight this will also uncover that. Although I've used the %glimmix() macro extensively in the past, I've been using proc glimmix instead very happily for about 10 years now.

New Contributor
Posts: 3

Re: Trying to use a GLIMMIX/GLIMMROC macro and getting no outputg

Thanks Damien!

Renaming the id variable worked for some reason. 

 

I am interested in using Proc Glimmix instead of the %glimmix macro if possible because I would like to see some of the other Proc Glimmix output which is suppressed when it is used within %glimmroc. Could you advise me on how to use Proc Glimmix in this situation, since the %glimmroc macro has the %glimmix macro embedded within it, I am now sure how to separate out Proc Glimmix and feed it back into %glimmroc.

I attached both macro files to my earlier post. 

 

Thanks in advance! 

Frequent Contributor
Posts: 130

Re: Trying to use a GLIMMIX/GLIMMROC macro and getting no outputg

I'm glad my suggestions worked out for you! So as to be kind to other potential helpers in the community you should mark my post as the solutuion so the thread appears as SOLVED to other potential helpers.

 

What you ask for in your latest post is not very practical, as the %glimmix() macro is quite different to proc glimmix. Are you sure you can't get what you want by invoking different %glimmroc() macro parameter specifications? If not, what you might find faster and easier is to invoke the %glimmix() macro on its own using equivalent model, link and option specifications inside the () to what your %glimmroc() macro either requires or generates. I've only used %glimmroc() once and that was a long time ago so I'd have to refamiliarise myself with the macro parameter syntax for both to be more specific, but I'm fairly certain you can get what you want easier by sticking with the macros.   

Ask a Question
Discussion stats
  • 5 replies
  • 349 views
  • 1 like
  • 3 in conversation