BookmarkSubscribeRSS Feed
miyumo
Calcite | Level 5

Am working with repeated measures on body weight at various ages. I want to test for fixed effects and then have their LSMEANS listed by age. I have tried the PROC GLM with "repeated" statement after the model to define animal as being repeated but the model in itself is not significant. So i tried PROC MIXED fitting age as a continous variable, the model is still not significant and all the fixed effects non is significant except age. How do i sort out this problem? Could i be using the wrong model? Below is the model i have used for the GLM and Mixed procedures

PROC GLM DATA=TRIAL13;

CLASS SEX GENOTYPE CLUSTER HATCH;

MODEL RG=SEX GENOTYPE CLUSTER HATCH AGE;

REPEATED AGE/ TYPE=CSH SUB=BIRD;

RUN;

Model significance Pr>F (0.8003)

                         R-Square     Coeff Var      Root MSE       RG Mean

                         0.001716    5.34157E17      0.385440    7.2159E-17

       Source                      DF     Type III SS     Mean Square    F Value    Pr > F

        SEX                          1      0.01325207      0.01325207       0.09    0.7652

        GENOTYPE              2      0.00011833      0.00005916       0.00    0.9996

        CLUSTER                 2      0.01722666      0.00861333       0.06    0.9437

        HATCH                    10      0.37976781      0.03797678       0.26    0.9900

        AGE                          1      1.64635823      1.64635823      11.08    0.0009

PROC MIXED DATA=TRIAL13;

CLASS SEX GENOTYPE CLUSTER HATCH BIRD AGE;

MODEL RG=HATCH GENOTYPE SEX CLUSTER AGE/DDFM=KENWARDROGER;

RANDOM BIRD;

REPEATED AGE/ TYPE=CSH SUB=BIRD;

RUN;

ERROR: Out of memory.

NOTE: The SAS System stopped processing this step because of insufficient memory

PROC MIXED DATA=TRIAL13;

CLASS SEX GENOTYPE CLUSTER HATCH BIRD AGE;

MODEL RG=HATCH GENOTYPE SEX CLUSTER AGE/DDFM=KENWARDROGER;

RANDOM BIRD;

REPEATED AGE;

RUN;

WARNING: Stopped because of infinite likelihood

6 REPLIES 6
SteveDenham
Jade | Level 19

Change your PROC MIXED code to:

PROC MIXED DATA=TRIAL13;

CLASS SEX GENOTYPE CLUSTER HATCH BIRD AGE;

MODEL RG=HATCH GENOTYPE SEX CLUSTER AGE/DDFM=KENWARDROGER;

RANDOM BIRD;

REPEATED AGE/subject=bird type=<insert logical covariance structure type here>;

RUN;

The infinite likelihood is because you have multiple observations per age.  You need to separate these per observational unit.  I assume that BIRD uniquely identifies each observational unit.  If not, you may have to specify BIRD within the other fixed effects.  The logical covariance structure type depends on many things, but CSH may be a logical first try if the data are unequally spaced in time.

Steve Denham

miyumo
Calcite | Level 5

Hi, Steve.

Thank you for taking time to assist me.

I have tried the above suggestion you have given on the model and i keep getting an out of memory message.

PROC MIXED DATA=TRIAL13;

CLASS SEX GENOTYPE CLUSTER HATCH BIRD AGE;

MODEL RG=HATCH GENOTYPE SEX CLUSTER AGE/DDFM=KR;

RANDOM BIRD;

REPEATED AGE/subject=bird type=CSH;

RUN;

ERROR: Out of memory.

NOTE: The SAS System stopped processing this step because of insufficient memory.

I wanted to ask if its safe to consider age as a covariable rather than fixed effect because age has 100 levels per bird(experimental unit). In which the model below is what i have tried, no results yet as it has been running for the past one hour.

PROC MIXED DATA=TRIAL13;

CLASS SEX GENOTYPE CLUSTER HATCH BIRD;

MODEL RG=HATCH GENOTYPE SEX CLUSTER AGE/DDFM=KR;

RANDOM BIRD;

REPEATED / TYPE=CSH SUB=BIRD;

RUN;

Sophie.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

You should switch to PROC HPMIXED. Will be much faster and will allow for much larger matrices. But you must accept the default df method (there is no KR option).

By the way, with CSH structure, you are getting a separate variance of each level of each fixed effect. This could be a lot of variances to be estimating.

miyumo
Calcite | Level 5

Hi Ivm,

Thanks for the response.

Question: what criteria do i use to decide which covariance model to use or do i have to test for the various models (CS, CSH, UN, AR, Toeplitz) then check the likelihood/information criterion?

Then when you say default df method, that means nothing should be added in the model statement after all the effects have been put?

Just tried a run and my SAS version doesn't have HPMIXED. My version is SAS 9.1.3 portable

Sophie

miyumo
Calcite | Level 5

Hi Steve,

Having tried the PROC mixed with age as a covariable, i got a warning from SAS: Unable to make hessian positive definite. Ideally my main agenda is to test for the fixed effects before moving into genetic analysis using a different software that requires one to fit only significant fixed effects using a random regression model. By the way, reason why age has upto 100 levels per experimental unit is because am dealing with daily feed intake data that has been combined with growth data to determine feed efficiency.  Question, the fact that the feed efficiency trait is considered good when the value is negative, does that affect the analysis since most of the values are in negative?

SteveDenham
Jade | Level 19

Negaitve values are not a problem, but having a covariate (age) that is almost certainly completely confounded with the growth data is probably what is leading to the problem with the hessian.

Have you considered calculating the cumulative feed efficiency at various ages?  Select 8 or 10 meaningful ages, and calculate total food consumption divided by weight change (both since baseline), and then try fitting that.  Otherwise, I would say fitting age with a spline would help, but I don't think 9.1.3 has the capability.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1732 views
  • 0 likes
  • 3 in conversation