data GIS; infile "ANOVA DATA.csv" dlm=',' firstobs=2; input field $ fieldtype $ year buff $ CC_year prop_ind; run; data GIS_FINAL; set GIS; if prop_ind < 0 then prop_ind=0; run; proc glimmix data=GIS_FINAL; /*full model*/ class fieldtype year buff CC_year; model prop_ind=fieldtype|buff|CC_year; random year year*fieldtype year*buff year*fieldtype*buff year*fieldtype*CC_year year*CC_year year*buff*CC_year year*fieldtype*buff*CC_year; run; proc glimmix data=GIS_FINAL; /*2nd model*/ class fieldtype year buff CC_year; model prop_ind=fieldtype|buff|CC_year; random year year*fieldtype year*buff year*fieldtype*buff year*fieldtype*CC_year year*CC_year year*buff*CC_year; run; proc glimmix data=GIS_FINAL; /*3rd model - without year*buff*CC_year*/ class fieldtype year buff CC_year; model prop_ind=fieldtype|buff|CC_year; random year year*fieldtype year*buff year*fieldtype*buff year*fieldtype*CC_year year*CC_year; run; proc glimmix data=GIS_FINAL; /*4th model - without year*buff*/ class fieldtype year buff CC_year; model prop_ind=fieldtype|buff|CC_year; random year year*fieldtype year*CC_year year*fieldtype*CC_year; run; proc glimmix data=GIS_FINAL; /*5th model - without year*fieldtype*CC_year* <<< this is SIG, so keep/*/ class fieldtype year buff CC_year; model prop_ind=fieldtype|buff|CC_year; random year year*fieldtype year*CC_year; run; proc glimmix data=GIS_FINAL; /*6th model - without year*fieldtype*/ class fieldtype year buff CC_year; model prop_ind=fieldtype|buff|CC_year; random year year*CC_year year*fieldtype*CC_year; run; proc glimmix data=GIS_FINAL; /*7th model - without year*CC_year*/ class fieldtype year buff CC_year; model prop_ind=fieldtype|buff|CC_year; random year year*fieldtype year*fieldtype*CC_year; run; proc glimmix data=GIS_FINAL; /*8th model - without year */ class fieldtype year buff CC_year; model prop_ind=fieldtype|buff|CC_year; random year*CC_year year*fieldtype year*fieldtype*CC_year; run; proc glimmix data=GIS_FINAL; /*FINAL MODEL */ class fieldtype year buff CC_year; model prop_ind=fieldtype|buff|CC_year/ ddfm=res; random year year*fieldtype year*CC_year year*fieldtype*CC_year; lsmeans fieldtype*buff / pdiff adjust=bon; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 2+ (SM)' 0 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 2+ (MED)' 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 2+ (LG)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 3+ (SM)' 0 0 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 3+ (MED)' 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 3+ (LG)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 4+ (SM)' 0 0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 4+ (MED)' 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 4+ (LG)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 5+ (SM)' 0 0 0 0 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 5+ (MED)' 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 5+ (LG)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 6+ (SM)' 0 0 0 0 0 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 6+ (MED)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 6+ (LG)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 7+ (SM)' 0 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 7+ (MED)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 7+ (LG)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 8+ (SM)' 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 8+ (MED)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 8+ (LG)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 9+ (SM)' 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 9+ (MED)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 ; lsmestimate fieldtype*buff*CC_year 'all contiuous corn 9+ (LG)' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ; lsmestimate fieldtype*buff*CC_year 'con vs exp A1' -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 /adjust=bon ; lsmestimate fieldtype*buff*CC_year 'con vs exp B1' 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0/adjust=bon ; lsmestimate fieldtype*buff*CC_year 'con vs exp C1' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0/adjust=bon ; run;