Planning of field experiments using a microcomputer

Planning of field experiments using a microcomputer

Computers and Electronics in Agriculture, 1 (1985) 87--94 Elsevier Science Publishers, B.V., Amsterdam -- Printed in The Netherlands 87 PLANNING OF ...

346KB Sizes 0 Downloads 51 Views

Computers and Electronics in Agriculture, 1 (1985) 87--94 Elsevier Science Publishers, B.V., Amsterdam -- Printed in The Netherlands

87

PLANNING OF FIELD EXPERIMENTS USING A MICROCOMPUTER

G.V. DYKE* Rothamsted Experimental Station, Harpenden, Hefts. AL5 2JQ (Great Britain) (Accepted 25 March 1985)

ABSTRACT Dyke G.V., 1985. Planning of field experiments using a microcomputer. Cornput. Electron. Agric., 1 : 87--94. The paper lists the information needed in the plan of a field experiment. Such plans can be produced on a 64K microcomputer and archived on 5.25" disks. Plans retrieved from disk may be printed with certain optional simplifications. Simple randomisation is optional, and plots may be numbered in any order. Two versions of the program are available, one in MBASIC, one in COMAL-80. Possible extensions are indicated, particularly the summarising of logistic needs of a series of experiments.

INTRODUCTION A n y e x p e r i m e n t designed to c o m p a r e the effects o f several t r e a t m e n t s (e.g. c r o p varieties, o r d i f f e r e n t c o m b i n a t i o n s o f fertilisers) applied to a field or p l a n t a t i o n c r o p needs a plan. S u c h a plan m u s t include all (or nearly all) o f the f o l l o w i n g i n f o r m a t i o n : t h e d i m e n s i o n s o f each p l o t ; spaces ( ' p a t h s ' or ' h e a d l a n d s ' ) b e t w e e n a d j a c e n t p l o t s ; overall d i m e n s i o n s o f the e x p e r i m e n t ; o r i e n t a t i o n (usually b y an i n d i c a t i o n o f N o r t h ) ; the a l i g n m e n t s o f p l o t s in rows and p e r h a p s c o l u m n s ; s y m b o l ( s ) t o r e p r e s e n t the t r e a t m e n t s applied t o each p l o t ; e x p l a n a t o r y t e x t , title etc.; p l o t - n u m b e r s . A t y p i c a l plan, d r a w n b y h a n d , is s h o w n in Fig. 1. Even a single e r r o r in t r e a t m e n t - s y m b o l s or p l o t - n u m b e r s m a y d o severe d a m a g e to an experim e n t , and e x p e r i m e n t s with 1 0 0 or m o r e p l o t s and six o r m o r e t r e a t m e n t f a c t o r s are n o t u n c o m m o n ; o f t e n plans o f m a n y e x p e r i m e n t s are n e e d e d at the same season o f the year. The task o f p r e p a r i n g and c h e c k i n g plans by h a n d in such c i r c u m s t a n c e s is i n d e e d f o r m i d a b l e b u t it can be greatly eased b y the use o f a m i c r o c o m p u t e r . T h e p r o g r a m I describe in this paper, t h o u g h it has certain limitations, can deal with a wide range o f plans. It satisfies all Anyone interested in using either of the programs described is invited to write to the author at his present address. *Present address: Applied Statistics Research Unit, University of Kent, Canterbury, Kent CT2 7NF, Great Britain. 0168-1699/85/$03.30

© 1985 Elsevier Science Publishers B.V.

88

Web ~ G~'s

so,-',~

~cl~-r

F_..Pohok-o~s

Iq(o3

WAU 4

I

'I

2.

-

I

3J

I,

7

~

3

5

II

-

12_

T

5

,°I z

z

--

A

A

-

-

IS l I q l

2.

2_

S ,

I ++ .212 o~

I

~+0I

31 ) g2

~.-I

~-~ 1-24 ~S I

-

I

T A

I

TIP-.

15 (~~0"

3

3

A,, S',~

5

I

1

+'+I'+

+

I

iT!-r

I7

l&

S

k I I

2_

T

2.

-

3

RN

I

3

-

I -

I -

J

i

I

i

'

!

fJO~

P,. I

5 I A,

A

I

I f,++o~'

Fig. 1. Example of plan drawn by hand (part omitted for clarity). the requirements just listed and, in addition, it enables the user to store i n f o r m a t i o n on a floppy disk for later retrieval, and to prepare simplified plans ('overlays') omitting certain treatment-factors. For example, if an exp e r i m e n t involves sowing seed of several varieties which are later treated with several sprays, an overlay showing varieties only, and a n o t h e r showing sprays only, will be useful t o the field workers. OUTLINE Two versions of t he program have been written, one in MBASIC, the o t h e r in COMAL-80. An example of a plan p r o d u c e d by the f o r m e r is given in Fig. 2. Both have been developed on a 64K machine (Gemini Galaxy 1, with CP/M operating system and dual 5.25" disk-drive). The MBASIC program, which was used to p r o d u c e Figs. 2 and 3, requires a pin-addressable dot-matrix printer (e.g. Epson MX100); the COMAL-80 program uses only ASCII characters to print a less elegant plan. I believe either program can be

89 (Title)

E~lample

(sub-title>

and

o~:

a plan

of

a simplified

created

and

~,r'chived o r l

overlay

i Baker-

2 Able

2; Able

Ni

NI+I

Nt+I

Early

Late

called

disc{

from

4 Baker ]

Baker-

I

NI~i

....

d i s c ....

Faler

I

ADle

Able

N1

i

Mt

NI+I

Iql+l

Eariy I Lat~_~

F-------

I a er, I NI+I

66.eel

Early

O:l , ANI o, Cer, NI NI

I

Late

I E a. r. . . t. y

'I

Baker- ~ A b l e

Late

Early

N1

(able

~NI+I

N1

] .Ear l ' x

L,~t:r~

. . . . . . . . . . . . . . l {c3

17

Baker 2e.~m

}3al::E'r

N1

/

Nl+l

[=arly

ILar-].y

I I I

I

:Z')

i! t

2:1

Abl e

ALl] e

I.l~,l er

l l a l or

N]~ 1

I~1

I dL{:

I

I'll

~: :

HI~I

E a r ly I I_aLe

I~1:11 e~ !

NI+I

t_~:,te

I{ariy

5. :5~,)rll

49.29m

.

.

.

Fig. 2. Example of plan c r e a t e d a n d a r c h i v e d on disk.

PLAN

KL [Ix!EVED

FITUI': r,,] SE

4x

I: ]LID :

X~',,'IF'[li

i

c,

1 Baler

A,~IE ! Able

]

10

Baker ] ~ai:Er

B~l:er

ii

12

Able

AbLe

A31e

3EHEr

I

5 Eaier

i

AbLe

A~le I 2aksr

~]

14

~kEr

AOie

i

i?, :~.~¢~

17

18

i?

~i,Er

G~l:~r

Able

20

LLatE. !,i-

1
~:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

I Baker ]Nl+l

21

Able I ~aker

22

25

24

Baker

Able

Ade

L

49,29~

Fig. 3. Example of a simplified overlay called from disk.

]

.

.

j4 A b ] £:

i'll I_aLe

i

90 m o u n t e d on any 8-bit, 64K microcomputer with disk-drive, provided a userdefined set of characters can be generated, together with a dot-matrix printer; bit-image mode is required for the MBASIC program, not for the COMAL-80 version. Logical flow of the program is indicated by the flow chart in the Appendix. The use of either program proceeds by question and answer, the general order being: (1) Establish the treatment-structure: number of plots, number of factors, number(s) of factor-levels and the symbols to be used. (2) Establish alignments of plots in rows and perhaps columns. (3) Establish plot numbering. (4) Allocate treatments to plots (with optional randomisation). (5) Create disk-file for later retrieval. (6) Print hard copy or copies. The remainder of this paper gives some detail, and some present limitations, under these headings. DETAILS

Treatment-structure etc. The user enters the total number of plots, the number of treatment-factors, the number of levels of each treatment-factor and the symbols required on the plan to represent these levels. The user is next given three options: (a) to enter, from the keyboard, the formal level (1,2, . . .) of each treatment-factor on each plot. This allows the copying of existing plans. (b) to call a disk-file containing a listing of treatment-factor levels. This option is included in order to allow the program to be linked to another which is capable of generating complex designs such as fractional replicates, lattices, and confounded factorial designs; DSIGNX (Franklin and Patterson, 1978) is such a program. (c) to generate factorial sets of treatment-combinations automatically, using the information already entered. In this case the treatment-list is generated in standard order, starting with the lowest level of each factor, last factor changing fastest. Split-plot designs cannot in general be produced at present. (But see below for a minor exception.)

Alignments of plots. Plots must be in (horizontal) rows but spaces of variable width may be inserted into rows of plots or at the beginning of any row. Before constructing the layout of plots in rows (and perhaps columns), the user is asked to enter the number of rows of plots and the m a x i m u m number of spaces per row. After a row has been created the user has the option to copy its l a y o u t in the next row, plots of the two rows being aligned, and the option to add plots (and spaces) to the later row. He can,

91 of course, create each row i ndependent l y if he wishes. The l a y o u t may optionally be inspected on the m o n i t o r at any stage of the creation. When the last plot is added the plan is presented w i t h o u t request, this time with treatment-symbols. If plots are r e num ber e d , or if t reat m ent s are randomised (or both), the plan is presented again before the option to archive or to print hard copy.

Allocation o f treatments to plots. The user has the opt i on to randomise within blocks of any n u m b e r of plots each (but all blocks must contain the same number). Since factorial sets are generated in standard order (with last factor changing most rapidly) this allows a limited class of splitplot designs to be generated automatically.

Plot numbering. Plots are, by default, n u m b e r e d from 1 onward, by rows, left to right. Numbering m a y be modified: (a) by adding a constant, so that, for example, plots m ay be n u m b e r e d 17, 1 8 , . . . (b) by arbitrarily changing the order in which plots are numbered. If a modified numbering is established this will be used in the allocation of t r eatmen ts to plots; if, for example, there are eight treatments (whether or n o t randomisation is called for) plots with modified numbers 1, 2, 3 , . . . , 8 will form a replicate (Fig. 2 shows an example). Either the modified or u n m o d i f i e d numbering m ay be used on the plan.

Archiving. The user has the option to create a file on disk containing all the i n f o r m a t i o n of the plan in c ode d form.

Hard copy. When the plan is first created, the optional hard c o p y contains all symbols for levels of all factors. On retrieving from disk-file, the user has the o p tio n to om i t the symbols of some (or all) of the treatment-factors. Before a hard co py is printed the user is told the width per plot (assuming that the full width of the paper is used) and is given the opt i on to set a narrower width. When necessary the printer selects a narrower f o r m a t using compressed print, as in Figure 3. A single row of plots in narrow f o r m a t c a n n o t contain m or e than 33 plots; if spaces are present the possible n u m b e r is less. If there are two or m o r e rows of plots the n u m b e r is less because of the presence o f the second vertical dimensional arrow.

Dimensions. The user enters the dimensions of each plot; these are entered as text, limited to eight characters in length. In all plans the user also enters the total width (i.e. horizontal dimension) of the whole experiment; the program does n ot calculate this. F o r any e x p e r i m e n t with two or more rows o f plots he enters also the (vertical) length of the whole experiment. The three (or four) dimensions listed are printed in the plan in dimensional arrows in appropriate places. Widths of paths, and of gaps in rows of plots, may be included in the final text.

92

Orientation. A north-point may be added, using any one of eight standard diagrams; thus the direction of the head of the paper is North, East, South, West or (approximately) North-East, South-East, South-West, North-West. Recovery from errors. (a) Treatment-structure: If, while entering the treatment-structure from the keyboard, the user enters an illegal character (e.g. zero, or a number greater than the number of levels) he is asked to try again. When the levels of any one factor have been entered for all plots the user is given the option to re-enter them in case a mistake has been made. (b) Alignments of plots: At any stage during the construction of the layout the user has the option to delete the last plot he has added; by repeatedly using this option he can delete any number of plots. (c) Plot-numbering: If the user modifies the standard plot-numbering and in so doing makes an error (e.g. by giving the same number to two plots, or by omitting one of the numbers expected) the program prints a suitable message and asks him to try again. POSSIBLE EXTENSIONS (a) Split-plot experiments. Such experiments, with one or more factors confounded with whole plots, call for boundaries of two types (solid and broken lines perhaps) and for the printing of certain symbols in or near the centres of whole plots irrespective of sub-plot boundaries. (b) Confounding, Latin Squares, etc. An extension to allow the generation of a limited class of confounded designs, for example 24 in blocks of 8, 33 in blocks of 9, would be useful to users who do not have access to a program specifically for producing such designs, and it would not be unduly difficult to add to the program. Any a t t e m p t to add a comprehensive system for confounding, and for row-and-column designs, would, I think, involve storing a large library of designs on disc. (c) Narrower format. The permissible number of plots per row may be increased by printing plot numbers vertically (e.g. 1 instead of 1 2 3). 2 3 (d) 'House-keeping'. Lists of plots (by plot-numbers) allocated to each treatment (or to each block) could be made. The net area of each experiment could be calculated from the product: (length of p l o t ) . ( w i d t h of plot)*(number of plots) Similarly the gross area could be calculated: (length of experiment)*(width of experiment) From these, and appropriate additional input, total requirements of seed, fertilisers, etc. for a set of experiments could be calculated.

93 Some progress has been made with several of these possible extensions and any or all c o u l d p r o b a b l y be q u i c k l y c o m p l e t e d if a user so requested.

APPENDIX FLOWCHART Start

New

p ] a n "~ . . . . . . . N o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Yes

+ Name

of

f J ] e'-' i

Number Number

of plots? of r o w s -~ etc. !

Number per Level

Read

÷ i i e L

Omit

of levels factor'? -names?

factor

L

Se] ect fetal ned factor(s) iT a n ~ i .................

!

of

plots columns.

Inspect

on

?

[ns]ert

CRT

Assign plot-numbers to plan (optional non-standard. )

Randomi

se?--No---+

Yes Number

of

! blocks?

Inspect

! !

! ...............

÷

Di mensi ons? Paths? !

Archive? (optional) !

Hard

............................................................

copy?

......

Yes Set

width ! F'rint ! .................. Stop

"

Yes

Create treatmentstructure Layout rows,

(s)

N o ........ +

No

.......

94 CONCLUSION

It is feasible to create plans of field experiments, store them on magnetic disk, and print full or simplified copies on a dot-matrix printer. Simple randomisation is available in the existing proprams, but for more complex designs a link with a design-generating program is desirable. The use of either of these programs is expected to save time (especially in checking) and lessen the risk of mistakes.

REFERENCE Franklin, M.F. and Patterson, H.D., 1978. A computer program for the construction of experimental plans. Proc. COMPSTAT Conf., Leiden.