BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
greenie
Obsidian | Level 7

My SAS was yelling at me like this:

whsub

 

NOTE: 5079 observations are not included because of missing values.

NOTE: Convergence criteria met.

WARNING: Output 'ParameterEstimates' 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.

NOTE: PROCEDURE MIXED used (Total process time):

      real time           0.94 seconds

      cpu time            0.89 seconds

 

 

ERROR: File WORK.NUT_WHSUB.DATA does not exist.

 

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.NUT_WHSUB may be incomplete.  When this step was stopped there were

         0 observations and 1 variables.

NOTE: DATA statement used (Total process time):

      real time           0.00 seconds

      cpu time            0.00 seconds

 

 

NOTE: Appending WORK.NUT_WHSUB to WORK.ESTIMATES_NUT.

NOTE: There were 0 observations read from the data set WORK.NUT_WHSUB.

NOTE: 0 observations added.

NOTE: The data set WORK.ESTIMATES_NUT has 0 observations and 1 variables.

NOTE: Deleting WORK.NUT_WHSUB (memtype=DATA).

NOTE: PROCEDURE DATASETS used (Total process time):

      real time           0.01 seconds

      cpu time            0.01 seconds

 

My code is like this:

%macro loop(data, outcome);

ods exclude all;

 

%let dsid=%sysfunc(open(&data)); 

%do i = 7861 %to 7976;                                                      

    %let x&i=%sysfunc(varname(&dsid,&i));  

%put &&x&i; 

 

ods output ParameterEstimates=NUT_&&x&i;

 

proc mixed data=&data method = REML covtest plots(MAXPOINTS=10000); 

class SmkNow sex hisp NHW education_missing education_college /ref=FIRST; 

model &outcome = &&x&i smoke smoke*&&x&i calor years smoke*years &&x&i*years &&x&i*smoke*years calor*years SmkNow PY height AgeEntry sex hisp NHW BMI education_missing education_college/ solution ddfm = sat;

random intercept years / subject = RID;

run;

quit;

 

data NUT_&&x&i; length Nutrient $ 2000;set NUT_&&x&i; Nutrient="&&x&i"; run;

 

%if &i=7861 %then %do

data Estimates_nut;

set NUT_&&x&i; 

run;

%end;

%else%do;

proc datasets;

append base=Estimates_nut data=NUT_&&x&i force;

delete NUT_&&x&i;

quit;

%end;

 

%end;  

ods exclude none;

 

%mend;

 

%loop(work.sgrqnutrmerged, FEV1postBD); 

 

Also, every nutrient I run, the log showed errors like above. Could anyone tell me which part I did wrongly?

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

There is no PARAMETERESTIMATES table that can be output from PROC MIXED.

 

I believe that if you want estimates of the fixed terms in the model, you need to use

 

 

ods output solutionF=NUT_whsub;

 

 

--
Paige Miller

View solution in original post

10 REPLIES 10
PaigeMiller
Diamond | Level 26

Since you are using a macro, please turn on the macro debugging option by running this command

options mprint;

and run one iteration of your macro again

 

Please show us the ENTIRE log for this code (that's 100% of the log, every single line; do NOT select parts to show us and not show us other parts). Please copy the log as text and paste it into the window that appears when you click on the </> icon.

Insert Log Icon in SAS Communities.png

--
Paige Miller
greenie
Obsidian | Level 7
whsub
MPRINT(LOOP):   ods output ParameterEstimates=NUT_whsub;
MPRINT(LOOP):   proc mixed data=gai.sgrqnutrmerged method = REML covtest plots(MAXPOINTS=10000);
MPRINT(LOOP):   class SmkNow sex hisp NHW education_missing education_college /ref=FIRST;
MPRINT(LOOP):   model FEV1postBD = whsub smoke smoke*whsub calor years smoke*years
whsub*years whsub*smoke*years calor*years SmkNow PY height AgeEntry sex hisp NHW BMI
education_missing education_college/ solution ddfm = sat;
MPRINT(LOOP):   random intercept years / subject = RID;
MPRINT(LOOP):   run;

NOTE: 5079 observations are not included because of missing values.
NOTE: Convergence criteria met.
WARNING: Output 'ParameterEstimates' 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.
NOTE: PROCEDURE MIXED used (Total process time):
      real time           0.95 seconds
      cpu time            0.95 seconds


MPRINT(LOOP):   quit;
MPRINT(LOOP):   data NUT_whsub;
MPRINT(LOOP):   length Nutrient $ 2000;
MPRINT(LOOP):  set NUT_whsub;
ERROR: File WORK.NUT_WHSUB.DATA does not exist.
MPRINT(LOOP):   Nutrient="whsub";
MPRINT(LOOP):   run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.NUT_WHSUB may be incomplete.  When this step was stopped there were
         0 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


MPRINT(LOOP):   proc datasets;
MPRINT(LOOP):   append base=Estimates_nut data=NUT_whsub force;
NOTE: Appending WORK.NUT_WHSUB to WORK.ESTIMATES_NUT.
NOTE: There were 0 observations read from the data set WORK.NUT_WHSUB.
NOTE: 0 observations added.
NOTE: The data set WORK.ESTIMATES_NUT has 0 observations and 1 variables.
MPRINT(LOOP):   delete NUT_whsub;
MPRINT(LOOP):   quit;
NOTE: Deleting WORK.NUT_WHSUB (memtype=DATA).
NOTE: PROCEDURE DATASETS used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


MPRINT(LOOP):   ods exclude none;

Hi please see this

Tom
Super User Tom
Super User

Looks like you either did not tell PROC MIXED to output anything.  Or perhaps it did not output anything because of some issue with the model being tested?

greenie
Obsidian | Level 7

Hi, output is this

%loop(worksgrqnutrmerged, FEV1postBD);

after %mend; statement

Tom
Super User Tom
Super User

@greenie wrote:

Hi, output is this

%loop(worksgrqnutrmerged, FEV1postBD);

after %mend; statement


That is just a macro call.  It does not tell us what code the macro generated.

greenie
Obsidian | Level 7

I'm not very sure. I used these code to run proc phreg and proc glm, both works. Only this proc mixed does not work..

ballardw
Super User

@greenie wrote:

I'm not very sure. I used these code to run proc phreg and proc glm, both works. Only this proc mixed does not work..


Run one model manually, i.e. with NO macro looping or macro variables.

Add before you run the procedure:

Ods trace on;

Then run Ods Trace off; afterwards to turn the trace off.

 

That will show you the names of the tables generated by your code that you can place on the ODS OUTPUT statement.

The log is telling you that ParameterEstimates is not create by Proc Mixed. So you need to find the name of the table that is generated to use in your ODS OUTPUT.

 

greenie
Obsidian | Level 7

Hi I run one manually: but what is the table name you mean?

97   Ods trace on;
98   proc mixed data=work.sgrqnutrmerged method = REML covtest plots(MAXPOINTS=10000);
99   class SmkNow sex hisp NHW education_missing education_college /ref=FIRST;
100  model FEV1postbd = prot smoke smoke*prot calor years smoke*years prot*years
100! prot*smoke*years calor*years SmkNow PY height AgeEntry sex hisp NHW BMI
100! education_missing education_college/ solution ddfm = sat;
101  random intercept years / subject = RID;
102  run;


Output Added:
-------------
Name:       ModelInfo
Label:      Model Information
Template:   Stat.Mixed.ModelInfo
Path:       Mixed.ModelInfo
-------------

Output Added:
-------------
Name:       ClassLevels
Label:      Class Level Information
Template:   Stat.Mixed.ClassLevels
Path:       Mixed.ClassLevels
-------------

Output Added:
-------------
Name:       Dimensions
Label:      Dimensions
Template:   Stat.Mixed.Dimensions
Path:       Mixed.Dimensions
-------------

Output Added:
-------------
Name:       NObs
Label:      Number of Observations
Template:   Stat.Mixed.NObs
Path:       Mixed.NObs
-------------
NOTE: 1167 observations are not included because of missing values.

Output Added:
-------------
Name:       IterHistory
Label:      Iteration History
Template:   Stat.Mixed.IterHistory
Path:       Mixed.IterHistory
-------------

Output Added:
-------------
Name:       ConvergenceStatus
Label:      Convergence Status
Template:   Stat.Mixed.ConvergenceStatus
Path:       Mixed.ConvergenceStatus
-------------
NOTE: Convergence criteria met.

Output Added:
-------------
Name:       CovParms
Label:      Covariance Parameter Estimates
Template:   Stat.Mixed.CovParms
Path:       Mixed.CovParms
-------------

Output Added:
-------------
Name:       FitStatistics
Label:      Fit Statistics
Template:   Stat.Mixed.FitStatistics
Path:       Mixed.FitStatistics
-------------

Output Added:
-------------
Name:       SolutionF
Label:      Solution for Fixed Effects
Template:   Stat.Mixed.SolutionF
Path:       Mixed.SolutionF
-------------

Output Added:
-------------
Name:       Tests3
Label:      Type 3 Tests of Fixed Effects
Template:   Stat.Mixed.Tests3
Path:       Mixed.Tests3
-------------
NOTE: PROCEDURE MIXED used (Total process time):
      real time           1.08 seconds
      cpu time            1.03 seconds


103  Ods Trace off;

 

PaigeMiller
Diamond | Level 26

There is no PARAMETERESTIMATES table that can be output from PROC MIXED.

 

I believe that if you want estimates of the fixed terms in the model, you need to use

 

 

ods output solutionF=NUT_whsub;

 

 

--
Paige Miller
greenie
Obsidian | Level 7

This works! OMG problem solved! Thank you so much and thank eveybody's help!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 10 replies
  • 758 views
  • 0 likes
  • 4 in conversation