BookmarkSubscribeRSS Feed
AaronJ
Obsidian | Level 7

I have a data set that i want to analyze using proc GLM. The design is a split-plot factorial RCBD that has a repeated measure of  N2O (and CH4) over 9 measurements. The main-plot is Fert, the sub-plot is Nfix.

There are 2 things that i would like assistance with: 

1) the Type 3 tests of effects indicates that the Fert*Nfix*Date interaction is highly significant (p<0.0001), but the LSMeans slice for that interaction  doesn't seem to give relevant information, as it does for the other interactions. I have a suspicion that i need to code the Date2 input differently so that the code reflects that there are in fact multiple Dates for it to read. The file is an imported excel data set, not cards directly input into the program. How do i input the Date data so that Proc GLM analyses the two levels of treatment and the multiple Dates and their interactions for analysis?

2) How can i write a code to provide an output for the interactions in which each interaction is given a letter to indicate significant differences, like Tukey's HSD?

 

proc mixed data=AllEvents covtest;
Class Block Fert Nfix PlotID Date2;
Model logN2O=
Fert Nfix Fert*Nfix
Date2 Fert*Date2 Nfix*Date2 Fert*Nfix*Date2;
Random Block Block*Fert Block*Fert*Date2;
Repeated Date2 / subject=plotID Type=CS r;
lsmeans Fert Nfix Fert*Nfix Fert*Date2 Nfix*Date2/pdiff adjust=tukey;
lsmeans Fert*Date2 / slice=Fert;
lsmeans Fert*Date2 / slice=Date2;
lsmeans Nfix*Date2 / slice=Nfix;
lsmeans Nfix*Date2 / slice=Date2;
lsmeans Fert*Nfix*Date2 / slice=Fert*Nfix;
run;

 

much appreciation

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

Although you say "GLM", I see that you are using MIXED which is a better choice. I typically use GLIMMIX rather than MIXED because it has more nice bells and whistles, like making interaction plots from the LSMEANS statement and doing letter assignments to pairwise mean comparisons.

 

Does PLOTID identify the subplot?

 

Your Q1: I doubt there is anything wrong with DATE2 coding. When you slice the FERT*NFIX*DATE2 interaction by FERT*NFIX, you get a contrast with 8 df that tests H0: all DATE2 means equal for a particular combination of FERT and NFIX. If this contrast is significant, then there is evidence that at least one date differs from at least one other, which as you note does not help much with interpretation of a 3-way interaction.

 

In my opinion, pairwise comparisons are of limited use in interpretation of interaction. I prefer to build contrasts that are sensible in context, i.e., that reflect important research questions. For example, I might build a set of contrasts to compare the FERT*NFIX interactions pairwise among levels of DATE2. Is the interaction on date 1 different than the interaction on date 2, or on date 3, etc. You can control family-wise error rate among these comparisons if need be. This paper is a good resource for this coding

 

https://support.sas.com/resources/papers/proceedings11/351-2011.pdf

 

Your Q2: I'm not sure that I'm interpreting your question correctly, so you may need to elaborate.

 

You can do pairwise comparisons among interaction means with Type I error control, but it is not at all desirable. Say that FERT has 3 levels, NFIX has 2 levels, and DATE2 has 9 levels, hence 3x2x9 = 54 means and 1431 (!) pairwise comparisons. Tukey will control for 1431 tests, most of which are of no interest to you because they compare something like F1_N1_D1 to F3_N2_D8. So you lose a tremendous amount of (if not essentially all) power by controlling for a set of comparisons that is much too big. If for some insane reason, you wanted to do that anyway, or just see how it turns out, use 

 

lsmeans fert*nfix*date2 / diff adjust=tukey lines;

Other thoughts:

 

Q: Why have you included BLOCK*FERT*DATE2 in the RANDOM statement rather than pooling it into residual error? 

 

Q: Is compound symmetry (TYPE=CS) the best choice for covariance among 9 dates?

 

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