Proc glimmix model/coding question

Reply
N/A
Posts: 1

Proc glimmix model/coding question

I am attempting to analyze my data in proc glimmix and have had numerous problems with my output (from Covariance Parameter Est. appearing and disappearing for different variables, to contrast statements working for some and not others as well.)

Split-plot in RCBD

Fixed effects: Cultivar (1, 2), Inoculation (whole-plot factor)(1, 2), Seed Treatments (1,2,3,4)

Random effect: Rep nested within Environment [1,2,3,4 (enviro is year and location combined)]

I am basically trying to make a table of main effects and interactions with their pvalues but I've had so much trouble and inconsistency so I'm just starting from square one and seeing where I may be going wrong. The goal of the contrast included is to determine the E*T effect for this table (just want to see if my logic is correct here). 

Any comments are greatly appreciated!

proc glimmix data=Fieldtrialssplit plots=studentpanel;                  

class Enviro rep var trt inoc;

model yld = var|trt|inoc/ ddfm=KR;

random Enviro inoc*rep(Enviro) Enviro*var Enviro*trt Enviro*inoc rep(Enviro)  Enviro*var*trt Enviro*trt*inoc  Enviro*var*trt*inoc;

contrast 'Enviro by trt' | Enviro 1 -1 0 0 Enviro*trt .25 .25 .25 .25 -.25 -.25 -.25 -.25, | Enviro 0 1 -1 0 Enviro*trt 0 0 0 0 .25 .25 .25 .25 -.25 -.25 -.25 -.25 0 0 0 0, | Enviro 0 0 1 -1

Enviro*trt 0 0 0 0 0 0 0 0 .25 .25 .25 .25 -.25 -.25 -.25 -.25;

run;

Respected Advisor
Posts: 2,655

Re: Proc glimmix model/coding question

Not sure, as I usually don't look at treatment by random effects, but I think you will have to include the fixed effect part as well.  Try the following for the first contrast to see if it gives what looks like the correct answer:

contrast 'Enviro 1,2 by trt 1,2' trt 1 -1 0 0 | Enviro 1 -1 0 0 Enviro*trt .125 .125 .125 .125 -.125 -.125 -.125 -.125 -.125 -.125 -.125 -.125 .125 .125 .125 .125;

Here I am not at all certain about the coefficients for Enviro*trt. I think they are going to be .125 and -.125, and there should be some zeroes added at the end as placeholders (not necessary, but it will make it easier for the subsequent contrasts.

Steve Denham

Ask a Question
Discussion stats
  • 1 reply
  • 169 views
  • 3 likes
  • 2 in conversation