Spline

A PC program for plant growth analysis, analysing series of plant data by means of fitted polynomial splines

Package contents: spline.exe the program file

splndata.txt a test dataset

splnres.txt correct results from the above

spline_brochure.doc this document

______

Introduction

The program Spline accepts sequential estimates of two plant variates Y and Z. These are both fitted by spline curves to an independent variate x (normally time). The program then delivers a series of fitted values for ln Y and ln Z, and for the relative growth rates (l/Y)(dY/dx) [which is d(ln Y)/dx], and (l/Z)(dZ/dx) [which is d(ln Z)/dx], and for the ratio Z/Y and the compounded rate (l/Z)(dY/dx), and also for the rates of change of relative growth rates d2(ln Y)/dx2 and d2(ln Z)/dx2), and the rates of change of absolute growth rates (1/Y)(d2Y/dx2) and (1/Z)(d2Z/dx2), and of the compounded second derivative (1/Z)(d2Y/dx2). All of these quantities carry standard errors and 95 percent confidence limits.

The program was first described by

Hunt R. 1982. Plant growth analysis: second derivatives and compounded second derivatives of splined plant growth curves. Annals of Botany 50: 317-328.

and is an extension of the earlier methods developed by

Hunt R, Parsons IT. 1974. A computer program for deriving growth-functions in plant growth analysis. Journal of Applied Ecology 11: 297-307

Parsons IT, Hunt R. 1981. Plant growth analysis: a program for the fitting of lengthy series of data by the method of B-splines. Annals of Botany 48: 341-352.

Creating a data file

·  The data file must be a plain text file (of type .txt) and have no more than 8 characters in its filename (because the program runs on a PC under a DOS-type environment).

·  Zero values are inadmissible in the plant data (because the program transforms the primary data to natural logarithms before fitting the spline curves).

The file called splndata.txt contains a test dataset. The following annotations describe the contents of each section of this file.

[1] SIMPLE DATASET FOR TESTING PURPOSES

[2] 1

[3] Kreusler’s maize : Badischer Frueh 1878, harvest means only

[4] 14

[5] 162 169 176 183 190 197 204

211 218 225 232 239 246 253

[6] .255 .308 .637 2.319 4.654 9.019 20.001

34.557 57.587 70.095 85.165 111.649 124.76 121.99

[7] .00179 .00292 .01244 .04192 .07622 .1301 .2136

.2805 .3384 .3047 .3025 .2976 .2684 .2387

[8] 2 2

[9] 0

0

0

0

[1]  A line of text describing the whole run

[2]  An integer specifying the total number of datasets being presented in this run

[3]  A line of text describing the first dataset

[4]  The number of data points present in this dataset (14 in this case)

[5]  A list of 14 x-values, one for each data point

[6]  A list of 14 values for the first dependent variable, Y

[7]  A list of 14 values for the second dependent variable, Z

[8]  (Both on the same line) the number of spline knots to be used for the Y-series

and the number to be used for Z-series

[9]  (All on new lines) the initial positions (in the x-dimension) of the knots in the Y-series

and the knots in the Z-series (see below)

·  To add further datasets, sections [3]-[9] inclusive should be repeated and the integer in section [2] updated accordingly.

·  In sections [5]-[7], any positive units may be used for any variate, but these should be used consistently throughout any one dataset. Values should be arithmetic, not transformed. Harvests need not be spaced equally, nor need there be equal, if any, replication at each harvest although, naturally, such considerations will affect the results obtained. The specimen dataset given in splndata.txt is unreplicated (having just one data point per harvest); replication simply involves listing multiple values of the x, Y and Z variables at each harvest.

·  In sections [8]-[9], the program is given information on how many knots to place in each of the splined chains, and where these knots should be positioned:

(i)  If neither the number nor the position of knots is to be specified, use the two values -1 –1 in section [8] and omit all of section [9]. The program will then determine the positions of n/4 knots, where n is the number of harvests (discrete abscissal coordinates), up to a maximum of five knots.

(ii)  If the number of knots and their positions are to be set then section [8] must contain two positive integers, the first indicating the number of knots to be placed in the curve fitted to Y and the second likewise for Z. In the section [9] which then follows, the abscissal values of the points at which the knots are to be placed are specified (in the same units as x), first for series Y and then for series Z. For example, to place two knots in the curve for Y at x-values 10, and 20, and three knots in the curve for Z at x-values 8, 15 and 24, section [8] should contain the two values 2 3 and section [9] the five values 10 20 8 15 24 (with each of the latter put onto a new line).

(iii)  If the number of knots but not their positions are to be set (as is the case with the example in splndata.txt), proceed as in (ii) but in place of the finite values usually given in section [9] use the appropriate number of zeros. For example, to place one knot in the curve for Y and two in the curve for Z, in both cases in positions to be decided by the program, section [8] should contain the two values 1 2 and section [9] the three values 0 0 0 (again, put each of the latter onto a new line).

(iv)  To a limited extent these options can be mixed. For example, to set three (unknown) knots for Y and four known knots for Z at positions 10, 15, 26 and 32, section [8] should contain the two values 3 4 and section [9] the seven values 0 0 0 10 15 26 32 (as always, with each of the latter on a new line).

Running the program

Simply double-click on the program file spline.exe and an interactive window will appear:

Give the name of the input file that you have prepared, including its filename extension:

Next, name the file where you would like the results to be placed:

The program will then run to its conclusion:

When ‘STOP’ appears you can close the DOS window and look at your results file. If error messages appear in the DOS window, you will probably have made a mistake in the formatting of your data file, or in the naming of either or both of the files. You may need to restart your PC if this happens, so try to get it right first time around. After a successful run, the results file will be of type .txt, but you can re-edit it into a format of your own choosing, or even import sections of it into Excel for plotting, etc.

R Hunt

Exeter, November 2004

2

spline_brochure.doc