BookmarkSubscribeRSS Feed
PSB
Fluorite | Level 6 PSB
Fluorite | Level 6

Hi all,

Back again with another question re: covariance parameter estimates through PROC GLIMMIX.

In PROC MIXED, I am able to add in the "COVTEST" and TYPE = UN commands to obtain a covariance parameter estimate table where my intercept is labeled as UN(1,1), slope UN(2,2), and their covariance (2,1). 

 

I am trying to get this same table via PROC GLIMMIX but am running into issues. Here is my code:

PROC GLIMMIX DATA = mydata method = laplace;
Model Y = cweek / solution dist = negbin link = log;
Random intercept cweek / subject = ID type = VC CL;
COVTEST / WALD;
Run;

 

This model converges and I get a cov param. table, where I get residual estimates and sig. testing for both the intercept and slope (and scale). The ONLY thing I am missing is a value that highlights the covariance between the intercept and slope. When I change VC to UN, I get the error message stating "The function value of the objective function cannot be computed at the starting point." My online research has not provided me with a helpful solution and has only led to more confusion.

 

Any feedback would be greatly appreciated - Thank you!

9 REPLIES 9
sbxkoenk
SAS Super FREQ

Hello,

 

Use your PROC MIXED estimates in PROC GLIMMIX as starting values, by using the PARMS statement !

 

Koen

PSB
Fluorite | Level 6 PSB
Fluorite | Level 6

Hi,

Thanks for your reply. I am not sure what you mean by that. My PROC GLIMMIX model uses a different outcome variable (because it is not normally distributed) relative to my PROC MIXED outcome variable (which is normally distrbuted). So, using the intercept/slope cov param estimates from PROC MIXED for PROC GLIMMIX does not make sense to me. Could you clarify your comment for me? Thanks again for you input!

sbxkoenk
SAS Super FREQ

Hello,

 

If you use a different outcome variable (MIXED versus GLIMMIX), then it makes no sense indeed.

 

However you could still use the PARMS statement !

The PARMS statement specifies initial values for the covariance or scale parameters, or it requests a grid search over several values of these parameters in generalized linear mixed models.

 

Here's the doc :

SAS/STAT User's Guide
The GLIMMIX Procedure
PARMS Statement
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_glimmix_syntax20.htm

 

Koen

PSB
Fluorite | Level 6 PSB
Fluorite | Level 6

Hi,

Thanks for your feedback. Using the PARMS statement did not even produce any results. I am surely missing and overlooking something and likely will require more robust assistance from mentors. Thanks again. 

Rick_SAS
SAS Super FREQ

Here is the doc for the RANDOM statement in PROC GLIMMIX.

Note the following sentence: "It is recommended to model unstructured covariance matrices in terms of their Cholesky parameterization (TYPE=CHOL) rather than TYPE=UN." This will constrain the diagonal estimates to be positive, as they should be. See if that modification gets you the table that you want.

 

If it doesn't, then please paste your output as a table or image.  If you don't get any output, then please include the entire log from the PROC GLIMMIX call.

PSB
Fluorite | Level 6 PSB
Fluorite | Level 6

Hi @Rick_SAS ,

Thanks for your reply and the documentation. I had reviewed that yesterday and attempted the TYPE=CHOL with little success. Here is my code. The output has produced a table that I am looking for (with the unstructured parameter estimates) but with the following error as seen in the picture:

title "Model B - Uncon Growth Model";
PROC GLIMMIX DATA = data method = laplace;
Model Y = cweek / solution dist = negbin link = log;
Random intercept cweek / subject = ID type = CHOL CL;
COVTEST / WALD;
Run;

SAS GLIMMIX TYPE=CHOL_20220303.JPG

Thanks again so much, I appreciate all the help.

-PSB

 

Rick_SAS
SAS Super FREQ

1. If CWEEK is a categorical variable, you'll want to add a CLASS statement.

2. Are you sure your code matches your output? Your code says SUBJECT=ID but the output indicates that the SUBJECT= variable is named STPID.  Please post the LOG (as I have previously requested) so that we can see the exact code you submit as well as any errors.

3. Doesn't the table display the covariance estimates that you want? Isn't CHOL(2,1) = 0.3286 the covariance?  Please explain what additional information you want.

 

PSB
Fluorite | Level 6 PSB
Fluorite | Level 6

Hi,

Thanks for the feedback! Here are my responses.

1. cweek is a continuous (centered) time variable which is why I do not have a CLASS statement.

2. Yes, I modified by syntax when posting it here, but my ID variable is STPID and matches with what is in my output. I'm really sorry for the confusion.

3. Yes, I see that I get a covariance parameter estimates table, but the table does not produce standard errors nor p-values, both of which are necessary pieces of information for my project. The attached log notes an optimization error which does not produce any fixed effects estimates (sorry for forgetting to include this in my prior message).

 

My original syntax included TYPE=VC which ran all my models perfectly fine. It is only when I've changed to TYPE=CHOL do I start getting errors.

 

PSB_0-1646341811003.png

Thanks very much!

 

sbxkoenk
SAS Super FREQ

Hello,

 

My colleague Kathleen Kiernan has written a few papers to help customers with MIXED, GLIMMIX, NLMIXED issues (diverse issues) :

 

https://support.sas.com/resources/papers/proceedings12/332-2012.pdf

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

 

And here are some Model Convergence tips for PROC GLIMMIX (sorry for the blue highlighting, but you can still read it after clicking the image to maximize) :

sbxkoenk_0-1646401987519.png

 

If you cannot sort it out, you can also contact Technical Support in your country!

 

Cheers,

Koen

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