BookmarkSubscribeRSS Feed
DIHS
Calcite | Level 5

Hi,

 

I am trying to compare covariance parameters using covtest with the general specification in Proc Glimmix. Without using covtest everything seems to work. With the covtest statement I get the warning ‘The initial estimates did not yield a valid objective function’ and I get no p value for the comparison of the covariance parameters. Does anyone have any idea why this is happening? My code essentially looks at the covariance between two traits (age at maturity and size) with family as the subject. All the covariance parameters are positive except the two for the covariance between the two traits (one for each of the two treatments), i.e the families which matured later were smaller in both treatments.  I would like to know if the treatment changes the covariance between the traits with family as the subject. My code is:

 

proc glimmix data=mydata;

class family trait ID treatment;

model response=trait treatment;

random trait  / subject = family   group= treatment type=un;

random _residual_/subject=family(ID)  group=treatment type=un;

covtest general . 1 . . -1 /estimates;

run;

 

 

Thanks for your time

 

 

 

2 REPLIES 2
plf515
Lapis Lazuli | Level 10

In this paper by Kiernan, Tao and Gibbs (all with SAS), there is a section about this error.   I tried to cut and paste that section, but the formatting got all messed up.

 

SteveDenham
Jade | Level 19

This may be something as simple as replacing the '.'s in the GENERAL option with zeroes:

 

covtest general 0 1 0 0 -1;

 

Steve Denham

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 2 replies
  • 3687 views
  • 1 like
  • 3 in conversation