BookmarkSubscribeRSS Feed
AHSU12
Calcite | Level 5

 

Dear SAS community,

I am trying to run weighted models for nested data (a panel survey) using PROC GLIMMIX; however, I keep getting an error and a warning (please see the SAS code and log below). I modified the Glimmix code a bit (added points and specified GCONV), but the error and the warning are still the same. When I remove the "obsweight=HCNSWGTR" and use method=laplace, the code runs just fine. Do you have any suggestions on how to address this issue? I have also attached my data. Thanks.

 

PROC GLIMMIX DATA = test1 METHOD=QUAD(FASTQUAD QPOINTS=100) plots=all;
CLASS RAHHIDPN STRATCLUS GENDER(REF='1') RACE_ETH(ref='1') MARITAL(ref='1');
MODEL MOBILITY = BSAGE_C BSAGE_C*BSAGE_C  GENDER  GENDER*BSAGE_C RACE_ETH RACE_ETH*BSAGE_C RACE_ETH*GENDER 
TIME TIME*TIME TIME*BSAGE_C TIME*GENDER TIME*RACE_ETH/solution obsweight=HCNSWGTR ;/**LEVEL 1 VARIABLES**/
RANDOM INTERCEPT /subject=STRATCLUS  type=VC ;  
RANDOM INTERCEPT /subject=RAHHIDPN(STRATCLUS) type=VC ;  
NLOPTIONS  GCONV=0.00001;
COVTEST/WALD;
ODS OUTPUT parameterestimates=FIXED1 covparms=RAND1;
RUN;

 

 

NOTE: PROCEDURE GLIMMIX used (Total process time):
      real time           24.92 seconds
      cpu time            11.03 seconds

326  PROC GLIMMIX DATA = test1 METHOD=QUAD(FASTQUAD QPOINTS=100) plots=all;
327  CLASS RAHHIDPN STRATCLUS GENDER(REF='1') RACE_ETH(ref='1') MARITAL(ref='1');
328  MODEL MOBILITY = BSAGE_C BSAGE_C*BSAGE_C  GENDER  GENDER*BSAGE_C RACE_ETH RACE_ETH*BSAGE_C RACE_ETH*GENDER TIME TIME*TIME TIME*BSAGE_C TIME*GENDER TIME*RACE_ETH/solution obsweight=HCNSWGTR ;
330  RANDOM INTERCEPT /subject=STRATCLUS  type=VC ;
331  RANDOM INTERCEPT /subject=RAHHIDPN(STRATCLUS) type=VC ;
332  NLOPTIONS  GCONV=0.00001;
333  COVTEST/WALD;
334  ODS OUTPUT parameterestimates=FIXED1 covparms=RAND1;
335  RUN;

WARNING: Class levels for RAHHIDPN are not printed because of excessive size.
ERROR: QUANEW Optimization cannot be completed.
WARNING: The initial estimates did not yield a valid objective function.
NOTE: The data set WORK.RAND1 has 3 observations and 4 variables.
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 GLIMMIX used (Total process time):
      real time           5:39.58
      cpu time            2:48.00

 

 

6 REPLIES 6
Ksharp
Super User
Your variable "RAHHIDPN" have too many levels (245).
Did you really want it to be CATEGORY variable, not NUMERIC variable ?
AHSU12
Calcite | Level 5
That is my respondent ID variable. Respondents (RAHHIDPN) are nested within strata and cluster (STRATCLUS).
Ksharp
Super User

And I found the same RAHHIDPN almost have the same STRATCLUS.

Ksharp_0-1716429120941.png

 

Therefore, I suggest to use

subject=STRATCLUS*RAHHIDPN 

not

subject=RAHHIDPN(STRATCLUS) 

 

AHSU12
Calcite | Level 5
Thank you. When I use subject=STRATCLUS*RAHHIDPN, the error is still the same.
Ksharp
Super User

Emm, Suggest you to post it at STAT Forum, since it is about statistical question.

https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures

 

And Calling @StatDave  @SteveDenham  @Rick_SAS 

SteveDenham
Jade | Level 19

I was able to run your model without errors, but there are some results that make me wonder if your model could be over specified. Here is the code I used:

 

PROC GLIMMIX DATA = test1/*(where=(stratclus<999))*/ METHOD=QUAD(FASTQUAD QPOINTS=20) plots=all;
CLASS RAHHIDPN STRATCLUS GENDER(REF='1') RACE_ETH(ref='1') MARITAL(ref='1');
PARMS (0.01) (1.72) (0.5);
MODEL MOBILITY = BSAGE_C BSAGE_C*BSAGE_C GENDER  GENDER*BSAGE_C RACE_ETH RACE_ETH*BSAGE_C RACE_ETH*GENDER 
TIME TIME*TIME TIME*BSAGE_C TIME*GENDER TIME*RACE_ETH/solution obsweight=HCNSWGTR ;/**LEVEL 1 VARIABLES**/
RANDOM INTERCEPT /subject=STRATCLUS  type=VC ;  
RANDOM INTERCEPT /subject=RAHHIDPN(STRATCLUS) type=VC ;  
NLOPTIONS  GCONV=0.00001 tech=congra;
COVTEST/WALD;
ODS OUTPUT parameterestimates=FIXED1 covparms=RAND1;
RUN;

The two changes were to reduce the number of quadrature points, and to use the PARMS statement to provide some better starting values for the random effects.  Regarding my thought of over-specification, the F values for five of the terms in the model went to infinity. These were GENDER, RACE_ETH*GENDER, TIME*TIME, TIME*RSAGE_C and TIME*GENDER. You may want to look to see if there is something unusual with the strata and the number of observations available in the various cells.

 

SteveDenham

 

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 626 views
  • 4 likes
  • 3 in conversation