BookmarkSubscribeRSS Feed
Shoriuchi
Calcite | Level 5

Hi, SAS experts.

 

I am analying my data with glimmix after multiple imputation.

The following code does not work.

I would really appreciate any comments/suggestions you have.

 

proc glimmix data=miout2 method=quad(qpoints=50);
class unit_no sex(ref="1") earlyedu_6m(ref="1") m_age_c(ref="1") mt1_k6_c(ref="1")
repellent_mt2(ref="3") home_insecticide_mt2_c4(ref="1") mosq_repellent_mt2_c4(ref="1") liquid_insecticide_mt2_c4(ref="1") home_herbicide_mt2_c4(ref="1") spray_mt2_c4(ref="1") smoke_mt2_c(ref="1")
care(ref="1") cry(ref="1") beat(ref="1") out(ref="1") support_partner_1m(ref="1") helper_1m(ref="1") tv_1m(ref="1") game_1m(ref="1") month(ref="1") sibling(ref="1") maritalstatus(ref="1") drink_mt2(ref="1") breastfeeding(ref="1")
Dr0m_0030401(ref="1") Dr0m_0030601(ref="1") m_job_cat(ref="1") smoking_m(ref="1") excercise(ref="1") MT2_1100001(ref="1") bw(ref="0");

model c6m_ASQ_cat(event="1")= repellent_mt2 m_age_c home_insecticide_mt2_c4 mosq_repellent_mt2_c4 liquid_insecticide_mt2_c4 home_herbicide_mt2_c4 spray_mt2_c4 smoke_mt2_c
income sex earlyedu_6m mt1_k6_c care cry beat out support_partner_1m helper_1m tv_1m game_1m month sibling maritalstatus drink_mt2 breastfeeding Dr0m_0030401 Dr0m_0030601 m_job_cat smoking_m excercise MT2_1100001 bw
/ D=bin link=logit solution cl or;
random intercept / subject=unit_no type=un ;
ods output ParameterEstimates=imputeout;
by _imputation_;
run;

7 REPLIES 7
SteveDenham
Jade | Level 19

When you say "does not work" we can't really help as we don't have a dataset to use for this code.  To get help, please copy and paste the log (or at least the part of the log relating to GLIMMIX), using either </> or the running man icon to open a window that is designed for this.  There may also be messages in the .lst file that would be helpful in debugging.

 

In addition, this paper https://support.sas.com/resources/papers/proceedings12/332-2012.pdf  and this quick look https://resources.cste.org/JLVToolkit/Convergence%20Questions%20Resource.pdf  may help.

 

SteveDenham 

ballardw
Super User

Doesn't work is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the "<>" to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the "</>" icon or attached as text to show exactly what you have and that we can test code against.

Shoriuchi
Calcite | Level 5

Thank you for your response.
The message below appears on the log.

ERROR: An integer overflow has occurred in the calculation of memory
requirements.
ERROR: This step has been aborted due to lack of memory.
NOTE: PROCEDURE GLIMMIX processing time:
 processing time 2.58 second
CPU time 1.90 second

SteveDenham
Jade | Level 19

Well, that seems to say that during the set-up for GLIMMIX something unusual happened.

 

In my opinion, I think this is due to too many independent variables, such that there is either complete separation or quasi-separation of the response variable when considered with all of the independent variables.  My suggestion is rather brute force, but try the following:  First, look at the cross-tabulations of your response with the independent variables to examine for separation.  If there are some independent variables that lead to complete or quasi-complete separation, set those aside. Next, answer the question as to why you are seeking the covariances between all of your subjects.  The use of type=un means that you are trying to estimate N + N*(N-1)/2 parameters.  If you have 20 units, this means you are trying to estimate 210 parameters in your Z matrix.  To get a reasonable estimate for these would require at least ten times that many records. So, try running this with the following:

 

RANDOM intercept/subject=unit_id;

This random intercept model means a single variance component in common across the units is estimated.  Your fixed effects in the MODEL statement supply the "slope" in 26 dimensional space.  This over parameterizaion of the Z matrix is probably the cause of the integer overflow.  At least I have seen this happen with some of the GLIMMIX models we have run where we have used type=un for R side components and there have been a large number of levels for each subject.

 

SteveDenham

 

Shoriuchi
Calcite | Level 5

Thank you Steve for the advice!

I have removed some variables that lead  to separation of the independent variable, and removed type=un based on your suggestion,

but the same error still comes out. 

It may be because of too many variables included in the model?

I really appreciate it if you can give me further advice to solve this issue.

SteveDenham
Jade | Level 19

It may be due to too many variables.  A good approach here would be stepping up from a model that does converge.  Try wrapping your code in a macro so that you can step through each of the single variables one at a time.  If there are any that still give this message, then you are probably going to leave them out of any analysis.  For those that do run, you can then try adding in more of the variables to the MODEL statement.

 

Note that this puts you in exploratory territory, rather than confirmatory.  You would wind up with a model that is specific to your dataset, rather than being able to infer to a larger population.

 

Another possibility is to step away from adaptive quadrature as a method.  What happens if you try method=laplace, or even to leave the method= option out, resulting in a linearized pseudo-likelihood approach (see the paper by Stoup and Claassen from earlier this year that touts this method for binomial response models).

 

SteveDenham

STAT_Kathleen
SAS Employee

Rather than using QPOINTS=50. I would suggest try using 

 

       METHOD=QUAD(FASTQUAD)

 

to see if your model can be estimated.  If  you still obtain the message about memory, then check the memsize option associated with your operating system?  How much memory do you have available?  You can try increasing the memsize to larger value.

 

However, I would also be concerned given the number of variables in your model you might have some quasi-separation issues and might have consider an alternative model with fewer effects.

 

You might find the following paper

 

https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2179-2018.pdf

 

helpful as it discuss various model issues such memory, quasi separation, etc when using PROC GLIMMIX

 

 

 

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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