BookmarkSubscribeRSS Feed
jescam05
Calcite | Level 5
data TMT;
input trat rep c1 c2 c3 c4 c5 c6 c7 c8 c9;
y=c1; conteo=1; output;
y=c2; conteo=2; output;
y=c3; conteo=3; output;
y=c4; conteo=4; output;
y=c5; conteo=5; output;
y=c6; conteo=6; output;
y=c7; conteo=7; output;
y=c8; conteo=8; output;
y=c9; conteo=9; output;
drop c1-c9;
datalines;
1	1	57.9	71.4	87.5	74.3	95.6	92.0	94.1	85.7	94.5
1	2	42.9	69.2	90.5	80.0	98.0	96.7	95.9	94.9	93.6
1	3	37.5	71.4	88.9	54.5	100.0	93.8	88.9	100.0	87.5
1	4	30.8	92.3	85.2	82.8	92.5	94.9	88.4	95.5	92.7
2	1	76.0	47.1	80.6	64.7	97.4	85.4	89.5	86.8	91.4
2	2	55.6	31.6	82.4	78.9	96.4	96.8	76.5	90.0	85.7
2	3	33.3	100.0	100.0	80.0	100.0	100.0	94.4	90.5	88.1
2	4	100.0	100.0	100.0	100.0	94.4	100.0	100.0	100.0	75.0
3	1	66.7	3.3	66.7	100.0	94.4	95.2	83.3	94.1	80.6
3	2	75.0	18.2	100.0	93.5	83.0	94.6	82.8	91.2	88.5
3	3	66.7	54.5	84.6	94.4	73.9	95.0	90.5	90.9	95.2
3	4	44.4	25.0	50.0	100.0	100.0	100.0	90.0	100.0	71.4
4	1	57.9	65.0	73.9	52.4	87.0	100.0	74.2	91.7	81.0
4	2	42.9	50.0	50.0	83.3	100.0	100.0	87.5	100.0	100.0
4	3	100.0	100.0	100.0	100.0	100.0	100.0	100.0	100.0	100.0
4	4	50.0	70.4	94.1	56.4	100.0	95.1	84.4	79.1	92.5
;
proc mixed data=TMT;
class trat rep conteo;
model y = trat conteo trat*conteo;
repeated conteo / type= CS sub= rep r rcorr;
random rep; 
LSMEANS trat conteo trat*conteo/ pdiff adjust=tukey;
run;

Hi! 

Hello
I did this program within a model of repeated measures, using CS as a covatianza structure (it was the only one that did not give me an error).
The procedure runs normally, but I want the literals to appear as in the lsmeans like glm; I tried to run in glmmix but send me error.

1 REPLY 1
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

In this thread https://communities.sas.com/t5/SAS-Statistical-Procedures/Proc-mixed/m-p/489027#M25407 I noted that you cannot include "random rep;" with type=un. You cannot include it with type=cs either, or with most of the other commonly used types. You can optionally include it with type=ar(1), to generate "AR(1) + RE". Refer to the paper by Littell et al. that I linked in the other thread, as well as https://www.sas.com/store/books/categories/usage-and-reference/sas-for-mixed-models-second-edition/p...

 

I am not entirely sure what you mean by "the literals to appear as in the lsmeans like glm". I'm guessing you mean letter assignments, which you can get using the LINES option on the LSMEANS statement.

 

Tukey-adjusted pairwise comparisons among main effects means are fine. But I do not recommend using Tukey-adjusted comparisons among interaction means; they are too conservative because they control for all pairwise comparisons (of which there are 630, for 4 x 9 = 36 means) whereas you are typically interested in only a subset of comparisons (198, if I've computed correctly). Consider SLICE and SLICEDIFF.

 

In general, I believe pairwise comparisons are a poor approach to interpreting an interaction (especially when factors have many levels, for example 4 x 9), so I generally test what I consider to be contextually useful hypotheses with CONTRAST or ESTIMATE statements. 

 

If you post your GLIMMIX code, the Community might be able to make suggestions.

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of 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
  • 1 reply
  • 1195 views
  • 0 likes
  • 2 in conversation