BookmarkSubscribeRSS Feed
aliceyang1102
Fluorite | Level 6

Hi, all.

i got an warning that 

WARNING:  Obtaining minimum variance quadratic unbiased estimates as starting values for the covariance parameters failed.

 

In the study, I want to know whether feeling sad can predict level of act.

and my sas is university edition, v94.

 

 

acting=level of act(0,1)

sadcw=within subject variable(sad)

sadcb=between subject variable (sad)

timec=time

 

I could do this and got results.

 

proc glimmix data=data;

class id time;

model acting(event="1") = sad_lag1 sadcb_lag1 timec / link=logit

dist=binary  DDF=95, 94, 95, 95 solution cl;

random intercept / subject=id type=un g solution cl;

random time/ subject=id type=ar(1) residual;

run;

 

but got warning about this.

 

PROC GLIMMIX DATA=data;

CLASS id time;

MODEL acting (EVENT="1")=sadcw sadcb timec/LINK=logit

DIST=binary DDF=95, 94, 95, 95 SOLUTION CL;

RANDOM intercept/SUBJECT=id TYPE=un g SOLUTION CL;

RANDOM time/SUBJECT=id TYPE=ar(1) RESIDUAL;

run;

 

if someone know about this problem. please help me.

also, i got something weird about variables.

I got variables like, sadcb, sadcw, sad_lag1, sadcb_lag1 through sas.

I think if i could not get data today, then there are no sadcb data. am i right?

but there are sadcb data on sas outcome data(calculated).

could it be a cause of the warning sign?

sorry for my poor English and thank you for reading.

 

 

 

3 REPLIES 3
lkeyes
Obsidian | Level 7

*I should make it clear that I'm not an expert in this arena, by any means. So I hope that someone chimes in to correct me, if you have a more solid understanding of the topic. That being said, here are some tips that i have learned along the way*

 

So, I'm not exactly sure what you are trying to measure; however, I'll give my best guess as to how you should set up your model, based on what you have written. Or at least a model that you can start out with.

 

By the way, the error is basically saying that it can't find covariance parameters during it's initial search that will satisfy the model as it has been specified. So what we will do is start out with a simple model, and then pass those parameters as starting values for a more complex model.

 

You will notice that i've changed several things within the model:

  1. Model Statement
    1. I've left the model Null because i wasn't sure exactly what you meant by the "between-subject" and "within-subject" variables. 
    2. the model is going to estimate/output the Between/Within Co-variance estimates of the subject already...
    3. All that being said, you know more about what you are modeling, so keep it in there if you need it. And the second set of SAS code will try to successfully fit these fixed-effects in the model. 
  2. Denominator Degrees of Freedom
    1. You may also have a reason to specify these manually; however, i would stick with the, "BW, Con, KR2, Sat" options. I choose BW as it is going to be the least computationally expensive. 
    2. Again, you know your data, so you may have a reason to specify them manually. 
  3. NLOPTIONS
    1. tech = nrridg 
      1. From everything that I've read, this is the appropriate optimization technique when modeling binary data.
      2. Here is also a whitepaper that illustrates modeling binary data that also uses this optimization technique, and it may also help you setting up your model: http://www2.sas.com/proceedings/sugi31/151-31.pdf 
    2. Gconv = 1e-6
      1. The default value is 1e-8, all i have done here is set it two orders of magnitude different. This should not affect your estimates, and hopefully help out with convergence issues.
    3. Maxititer/Maxfunc
      1. Basically, we are telling SAS to not give up based on the number of iterations or function calls when optimizing the model. The defaults are set ridiculously low...
      2. No matter what model I'm running, I always reset these numbers so that the model doesn't give up pre-maturely
  4. Random Statement
    1. Type
      1. Since in your first random statement you are only modeling "Intercepts" without any slopes...the UN structure is not necessary. Changing to VC should significantly reduce the complexity of the model. If you feel like you absolutely have to use the Unstructured Covariance Structure then i would use the CHOL option as SAS suggests in their GLIMMIX documentation (https://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_glimmix_sec...)
      2. I can't be sure, but i don't think that you would want the second Random Statement to have an R-Side Structure given the type of model that you have specified??? So I've left the Residual option out of the second random statement. 
        1. Here is a link that may explain it better than I can: https://communities.sas.com/t5/SAS-Statistical-Procedures/R-side-vs-G-side-for-PROC-GLIMMIX/td-p/102...
  5. ods Output
    1. Covparms
      1. This is going to save the covariance parameters from the "Null" model so that we can use them as starting values for the more complex model.  

 

Model Code (using null model): This is where we will try and find some good starting values.

 

ods SELECT FitStatistics CovParms IterHistory;
Proc GLIMMIX Data=data;
CLASS id time;
MODEL acting(EVENT="1") = /
     link=LOGIT DIST=Binary DDFM=BW SOLUTION CL;
NLOPTIONS
     tech=NRRIDG
     gconv=1e-6
     maxiter=100000 maxfunc=100000;
RANDOM int/ Subject=id TYPE=VC g SOLUTION CL;
RANDOM time / Subject=id TYPE=AR(1);
ods output CovParms=CovParmEstimate;
run;
QUIT;
ods listing close;

Model Code (using more complex model with covariance starting values from above)Again, from what i understood about how you've named the fixed variables, I'm not sure that this is the most appropriate model; however, you know more about it than i do, so proceed with caution with inference. 

ods SELECT FitStatistics CovParms IterHistory;
Proc GLIMMIX Data=data;
CLASS id time;
MODEL acting(EVENT="1") = sadcw sadcb timec/
     link=LOGIT DIST=Binary DDFM=BW SOLUTION CL;
NLOPTIONS
     tech=NRRIDG
     gconv=1e-6
     maxiter=100000 maxfunc=100000;
PARMS /pdata=CovParmEstimate;
RANDOM int/ Subject=id TYPE=VC g SOLUTION CL;
RANDOM time / Subject=id TYPE=AR(1);
run;
QUIT;
ods listing close;

 

I hope this provides some insight!! And like i said, if anyone knows anymore about it, please chime in to correct me/help them out!!

lkeyes
Obsidian | Level 7

Just out of curiosity, was any of that able to help you out?

aliceyang1102
Fluorite | Level 6
I got results, but it was not what i want to get. So still trying to solve the problem. I think i have to use “un” and “residual” to get the results what i want. But im relly appreciate to your answer and it was helpful to know about syntax. Thankyou and sorry for late comment.

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
  • 3 replies
  • 3021 views
  • 2 likes
  • 2 in conversation