"Lattice Design - 5x5 Simple Lattice."

"Incomplete blocks design"

DELETE [REDEFINE=yes] _PfL
POINTER [NVALUES=2] _PfL
FACTOR [LEVELS=5; NVAL=NVALUES(Rep)] _PfL[]
GENERATE [TREATMENTS=Variety; REPLICATES=Rep; BLOCKS=Block] _PfL[1...2]
BLOCK Rep/Block
TREATMENTS Variety//_PfL[1...2]
ANOVA [PRINT=aovtable,information,means,%cv,cbmean; FPROB=yes; PSE=diff,lsd; LSDLEVEL=5]\
 Yield


"REML analysis"
VCOMPONENTS [FIXED=Variety] RANDOM=Rep/Block; INITIAL=1,1; CONSTRAINTS=positive,\
positive
REML [PRINT=model,components,means,deviance,waldTests; PSE=differences; MVINCLUDE=*;\
 METHOD=AI] Yield


Vkeep terms=Variety; means=vmean; sedmeans=SEDmean
Calc MaxSED=Max(SEDmean)
&    MinSED=MIN(SEDmean)
&    AvSED=Mean(SEDmean)

print MaxSED,MinSED,AvSED; dec=3; field=9
print SEDmean; dec=3; field=9

Factor[nvalues=25; values=1...25; levels=25] VARIETY
Calc RANK = rank(vmean)

Print VARIETY,vmean,RANK; dec=*,3,0; field=7

