BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AMThant
Fluorite | Level 6

Hi All,
This is my first post in SAS community. I am SAS beginner and very low statistical knowledge in complex models. So, thank you in advanced for any suggestions and expect a comprehensive advise with the detail SAS codes from the expert too.

 

I have done four cropping trials in RCB design. Each trial include four crops with four replications. For simple ANOVA analysis of each trial, it is fine. Beyond that, I would like to do combined analysis of these four trials in the mixed model. In this case, I would like to treat these four trials as one factor like four Managements since each trial is managed with different agronomic practices, e.g. irrigated for Trial 1, non-irrigated for Trial 2, late sowing for Trial 3 and late sowing for Trial 4 (but different location where high altitude/lower temperature condition). Then, I would like to investigate the two objectives from these experiments; (1) to compare the treatment means of four crops in combining all trials, and (2) to investigate any interactions between the crop (Treatment) factor and the management factor.

 

I have read some analysis models that recommend "the analysis of combined experiments" of such data, using PROC MIXED in SAS but still confuse. These SAS examples are for different locations and times. The difference here is management rather than the location.

My questions are -

(1) Can I do combined analysis of these four trials?

(2) If yes, whether should I assign Crop/Management as "Fixed" or "Random" effect in the Mixed model?

(3) For objective 1, I would like to separate Treatment means by LSD test, how could I syntax in PROC MIXED model of SAS.

(4) If LSD is not feasible in Proc mixed, what kind of mean comparisons should I perform? [I have tried, LSD is not recognized in the mixed model]

(5) Should Replication be nested in Management factor? [I see some syntax Replication is nested in Location factor]

 

I have tried this SAS code but not entirely confident whether it meets to my objectives or not.

 

 

proc mixed data= combined method=type3;
class Rep Mang Treat;
model Yield=Treat;
random Mang Rep(Mang) Mang*Treat;
run;

 

Thanks all.

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

It appears that you have four management schemes applied.  I doubt that you can treat management as a random effect - you would need some sort of replication of the entirety of the scheme or many more different management schemes, not just plots within each scheme, to be able to estimate the variance component due to management.

 

So why not fit management as a fixed effect.

 

SteveDenham

 

 

View solution in original post

8 REPLIES 8
SteveDenham
Jade | Level 19

It appears that you have four management schemes applied.  I doubt that you can treat management as a random effect - you would need some sort of replication of the entirety of the scheme or many more different management schemes, not just plots within each scheme, to be able to estimate the variance component due to management.

 

So why not fit management as a fixed effect.

 

SteveDenham

 

 

AMThant
Fluorite | Level 6

Thanks @SteveDenham. Yes, four management schemes applied but not replicated those schemes. That is a good point, Steve. So, just Rep (Mang) and Treat*Mang interaction in the random effect.

 

By the way, please also suggest me the further analysis after the combined ANOVA. Whether should I do LSD test or other comparisons. Thanks.

SteveDenham
Jade | Level 19

Take a look through the ADJUST= option for the LSMEANS statement.  There are many options for the case of multiple comparisons.  If you wish to stay with the LSD, simply add the DIFF option to the LSMEANS statement.  This is not a protected LSD, but inspection of the overall F test would enable this.

 

If I were to choose, I would select the method of Berry and Edwards (ADJUST=SIMULATE) rather than the LSD.

 

SteveDenham

AMThant
Fluorite | Level 6

Thanks @SteveDenham, will try other options too rather than LSD.

SteveDenham
Jade | Level 19
LSD is what you get with the DIFF option in the LSMEANS statement.

SteveDenham
AMThant
Fluorite | Level 6

Hi @SteveDenham Steve and All, 

 

I got some results but not clear myself yet which approach is correct.

I just also try with Proc GLM, just to confirm the result. The Proc Mixed and Proc GLM give the same result. Treatments are not significant in both Proc mixed and GLM model (Pr> F = 0.0721), apparently should be significant by looking at the interaction plot. While Adj P values by Tukey are not significant in Proc Mixed model, Pr>t are significant. Which values should I look at?

 

And also changing the factors "fixed" or "random" in the model change the result a lot. Rather than deciding which one goes to "random" or "fixed" effect by the researcher, do I need to choose the best model based on AIC values?

 

Thanks

Aung

title "Combined ANOVA";
data comb;
input Mang$ Treat$ Rep Var;
datalines;
1	A	1	155.9
1	A	2	117.05
1	A	3	131.04
1	A	4	114.41
1	B	1	83.83
1	B	2	98.63
1	B	3	147.01
1	B	4	87.3
1	C	1	220.42
1	C	2	155.49
1	C	3	146.12
1	C	4	76.81
1	D	1	186.43
1	D	2	130.17
1	D	3	185.99
1	D	4	171.87
2	A	1	294.99
2	A	2	258.93
2	A	3	290.02
2	A	4	314.44
2	B	1	146.55
2	B	2	141.5
2	B	3	160.41
2	B	4	159.75
2	C	1	247.67
2	C	2	176.8
2	C	3	250.07
2	C	4	183.77
2	D	1	160.17
2	D	2	196.73
2	D	3	172.3
2	D	4	166.91
3	A	1	313.01
3	A	2	311.58
3	A	3	245.51
3	A	4	271.26
3	B	1	187.51
3	B	2	229.42
3	B	3	226.67
3	B	4	158.57
3	C	1	87.36
3	C	2	112.64
3	C	3	87.56
3	C	4	75.44
3	D	1	159.85
3	D	2	102.51
3	D	3	105.97
3	D	4	96.97
4	A	1	160.54
4	A	2	202.7
4	A	3	253.24
4	A	4	186.56
4	B	1	113.69
4	B	2	122.32
4	B	3	115.42
4	B	4	75.48
4	C	1	93.53
4	C	2	80.03
4	C	3	95.11
4	C	4	85.87
4	D	1	53.23
4	D	2	83.91
4	D	3	63.13
4	D	4	62.21
;
ods graphics on;
proc glm; /***HOV test for Treatment***/;
class Mang Treat Var;
model Var=Treat/ss3;
means Treat/HOVtest=bartlett;
means Treat/HOVtest=BF;
means Treat/HOVtest=levene(type=ABS);
run;
proc glm; /***HOV test for interaction***/;
class Mang Treat Var;
model Var=Mang*Treat/ss3;
means Mang*Treat/HOVtest=bartlett;
means Mang*Treat/HOVtest=BF;
means Mang*Treat/HOVtest=levene(type=ABS);
run;
proc mixed plots=residualpanel method=type3;
class Mang Treat Rep;
model Var = Treat Mang;
random Rep(Mang) Mang*Treat;
lsmeans Treat/DIFF;
lsmeans Treat/adjust=Tukey;
lsmeans Treat/adjust=simulate;
run;
proc glm;
class Mang Treat Rep;
model Var = Rep(Mang) Mang Treat Mang*Treat;
random Rep(Mang) Mang*Treat/test;
means Treat/tukey;
means Mang*Treat/tukey;
run;

 

SteveDenham
Jade | Level 19

Here are 3 approaches that I would consider using these data.

 

proc mixed data=comb;
class mang treat rep;
model var = mang treat mang*treat;
lsmeans mang treat mang*treat/diff adjust=tukey;
run;

proc mixed data=comb;
class mang treat rep;
model var = treat;
random mang rep(mang*treat);;
lsmeans treat/diff adjust=tukey;;
run;

proc glimmix data=comb;
class mang treat rep;
model var = treat;
random _residual_/group=treat;
random mang rep(mang*treat);
covtest homogeneity;
lsmeans treat/diff adjust=tukey;;
run;

 These are a narrow inference space analysis for management type, a broad inference space analysis for management type and a broad inference space analysis for management with heterogeneous variances for the treatments.  Since the test for homogeneity is not significant, the second analysis is probably most appropriate.

 

When applying adjustments for multiple comparisons, the adjusted p values are the ones to report, unless you are in a situation where controlling for false negatives is of concern (safety studies, for instance).

 

SteveDenham

 

AMThant
Fluorite | Level 6

Thanks Steve. It is really useful and thanks for the code and full explanation.

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
  • 8 replies
  • 909 views
  • 2 likes
  • 2 in conversation