APPENDIX D

Data Analysis

     I developed several computer programs to manipulate and
analyze data.  The following is a brief description of each,
including the input and output formats.

     ASPECT13.FOR -  This program calculates the aspect and slope
for a grid cell based on a matrix of elevation values.  The
elevation file must be named 'ELEV.DAT' and include the control
point number and the corresponding elevation (I5,F6.1). ELEV.DAT 
must start with the control point at the southwest corner of the
area, move east across each row, then north up the rows,
otherwise the aspect calculations will not be oriented correctly. 
Output is: column, row, average elevation, aspect (eight number
code 1: NE moving clockwise to 8: N. ) is used for flat grid
cells), and slope percent (2I5,F10.1,I8,F10.1).

     FIT.FOR - This program calculates the Fit (Fw) between two
maps at all possible window sizes, and the Average Fit (Ft). To
compare two maps, or to compare a simulated map to empirical
data. Input files are the two maps, in a matrix.  Orientation can
be in any direction as long as the two maps aline.  The input
data format is unstructured.  This program uses a set-up file
(INFO.DAT) to enter the number of rows and columns in each map,
the number of possible values in the parameter being mapped, and
the names of the two map files.

     TMAP.FOR - This program calculates distances for the TSQUARE
method of measuring spatial pattern.  A set-up files is used to:
establish the dimensions of the reference grid and to name the
data input file. From each reference point the distance to the
nearest data point is determined.  The second distance is the
closest data point to the first data point that is also past a
line drawn perpendicular to the vector from the grid point to the
first data point.  The input data file, named in INFO.DAT, must
be formatted with the total number of data points on the first
line in the first 10 columns, and each location as first X then Y
on each successive line in the format F8.2.  Currently, the
maximum number of data points is 5000. A search window is defined
(20 meters) to speed the processing of the data points.  This
window is increased if no suitable points are found. The output
file is formatted to input into the BASIC program TSQUARE.BAS
(Ludwig & Reynolds 1988).

     NEIGHBOR.BAS - This program calculates the Index of
Aggregation and tests of significance (Krebs 1989), the Index of
Aggregation adjusted for a border bias (Donnelly 1978), the Chi2
test (Thompson 1956) and its adjustment to a normal
approximation, and the Goodness-of-Fit Test (Campbell and Clark
1971).  The user may select all points to process or a random
subset of plots (with or without replacement), and may choose to
define a boundary strip around the edge of the plot to eliminate
border bias.  One input file is required.  It must be three
columns of data: individual, x coordinate, y coordinate.  Two
output files are created.  DISTANCE.DAT lists the first five
nearest neighbors for processed individual, and sums of the
distances.  NEIGHBOR.DAT lists the results of each analysis.

     BIOMASS.FOR - This program calculates biomass values for
individual stems using the equations shown in chapter 4 Table 27.
The input file named DIAMETER.TXT.  This file lists the total
number of stems to be processed, then the data for each stem on
successive lines: plot number, species name (six letter code -
see Appendix A), final diameter, and diameter change (both in
cm). The input file format is unstructured.  The output file,
(BIOMASS.DAT) includes: plot, species code, original biomass,
final biomass, and biomass change (in kg dry weight).

     CONTTAB.FOR - This program is written to analyze categorical
data using two methods:  chi-square test and G-test of
independence.  The program is interactive, the user selects the
type of analysis, and whether data will be input by hand or with
an input file.  The output is labeled and written to the screen
and to the file RESULTS.OUT.  An additional input file,
CHITABLE.ASC, which contains the table values for comparison,
must be present to run the analysis.

Return to the Table of Contents