1.1System of Equation and Matrices

Total Page:16

File Type:pdf, Size:1020Kb

1.1System of Equation and Matrices

Annex 1. Basic Algebra of Matrices

1.1 System of Equation and Matrices

One equation in one unknown, is something easy to solve, per example:

3x = 6

The exact solution to find the value of the unknown is display 3 to the right side of the equal and divide 6 by it to obtain x=2

Now consider two equations with two unknown:

3x1+x2 = 10 2x1-x2 = 0

Eliminating variables the solution for the system is x1= 2, x2 =4.

Consider system next three equations with three unknown:

4x1+3x2+2x3 = 0 2x1-2x2+5x3 = 6 x1-x2-3x3 = 1

As the number of unknown increase solving the system become more complex in practice but not in principle. But the same system of equation can be re-written in a matrix arrange without loss any information:

4 3 2   x1 0       2  2 5   x2 =6       1 1  3  x3 1

1.2 Definitions

 By definition a matrix is a rectangular array of symbols (Number, variables, function, etc.).

 The dimensions of the matrix are the numbers of row and columns. A matrix with m row and n columns is of dimension (m x n).

 A column vector is a (mx1) matrix. A row vector is a (nx1) matrix.

 A escalar is an ordinary number, or if you will, a (1x1) matrix. 1.3 Matrix Multiplication Quite common matrix operations are addition and transposition of matrices, and even the scalar product.

Multiplying a Vector by a Matrix

1 2  x1 5     =  3 4  x2 6

The rule of the matrix multiplication must be at least (for 2x2 matrices, and in fact for matrices of any dimension)

 a11 a12   x1  a11x1  a12x2      =  a21 a22  x2 a21x1  a22x2

An alternative expression for real matrices is, if Ax=b, then

b1 = scalar product of x and the first row of A b2 = scalar product of x and the second row of A . . .

bn = scalar product of x and the nth row of A

Multiplying Two Matrices

The product of AB of tow matrices A and B is obtained by treating each column of B as a column vector begin multiplied by A, and writing the resulting vectors side-by-side to form the product. Thus if

 a11 a12  A =   a21 a22 and

 b11 b12  B =   b21 b22 then

 a11b11  a12b21 a11b12  a12b22  AB =   a21b11  a22b21 a21b12  a22b22

The two matrices need not have the same dimension to be multiplied, but each column of B must be a vector of the appropriate size to be multiplied by A. That is, the number of rows of B must be equal to the number of columns of A. In general AB  BA, even if both product are defined (i.e., even if both matrices are square and of the same dimension). This is an important distinction between matrix and scalar multiplication.

1.4 Calculating eigenvectors, eigenvalues and Standard Stable Distribution (SSD)

Consider matrix C and its vector which are the simplest matrix system:

3 1  x1 A =     2 4  x2 by definition:

A Xk-1 =  Xk this way matrix A can be represented as:

3 1  x1  x1     =    2 4  x2  x2

where X1 and X2 could be trees of tow different stages:

Then it equality is expressed in a system or two equation with two unknown:

3x1 + x2 =  x1

2x1 + 4x2 =  x2 where

3   1 = 0 2 4   while can be expressed as a polynomial in , as follow:

(3- ) (4- ) – 2 = 0 2-7 +12-2 = 0 2-7+10 = 0

(-5) (-2) = 0 were: 1 = 5

2 = 2

If 1 = 5 in the original system of equations then

3x1 + x2 = 5 x1 2x1 + 4x2 = 5 x2

Solving the system equations the eigenvector is:

 x1  5    =    x2 10 If 2 = 2 in the original system of equations then

3x1 + x2 = 2 x1 2x1 + 4x2 = 2 x2

Solving the system equations the eigen vector is:

 x1  1    =    x2 1

Since SSD is associate with the larger eigen vector: SSD = 5 2. Databases and database management

2.1 Two Databases: big and small trees.

Since hurricane Joan has been gathered data of the regeneration of all woody species >10 cm in circumference in a database for all woody trees including within those species V. ferruginea. During or right after the data collection all figure of big V. ferruginea are copied in an independent database too, and it is the first database used here (See database 2.1.2). For individuals of V. ferruginea with circumference <10 cm (including seedlings), other data collection is conducted, normally at the same time that for big trees but for other group of researchers; data are write down in a small tree databases’ field book. (See database 2.1.3). Reasons to split the field measurement in two groups is because it is a way fast and accurate.

Headline Meaning sit site of measurement trans transect of measurement side side left or right in the transect x abscise of the transect y ordinate of the transect (values has been changed to negative) nr tree numeration g90,…,g99 circumference in all period of measurement h94,…,h99 height in all period of measurement in-growth year of first measurement mort year of mortality dba diameter at ground level dap diameter at breast level b90,…, b99 "be-in" the database = 1 or not "be-in" = 0 md90,…, md99 measured diameter = 1 and not measured = 0 mh90,…, mh99 measured height = 1 and not measured = 0 st94,…, st99 height development stages s94,…, s99 if previous height record exist and former record is missing, then s94,…, s99 = 0 Table 2.1.1. Databases' headlines and its meaning. 2.2 Solving problem of missing values in databases.

One common source of miss-measurement in the field is forgot to measure some or every of the variable in target individuals in a specific measurement time. To search for these kind of errors in the databases computer programs were wrote in the module of syntax editor of SPSS for each database. See examples 2.2.3 and 2.2.4. In the first two programs the value 0 represent not "be-in" or not measured and value 1 represent "be-in" or measured. To find those measurement errors a new program was write (see example 2.2.5), and it help to find the years in which individuals were still there but not measured; then all errors-output = 1 were selected and filtered. With this "error-program" all missing values were detected and a new value were wrote down in the place of the missing value after compare them with other individuals but with equal and complete set of data. Linear regressions to find the missing values were set a side because was considered that this does not fit better that the "educate guessing" way to fill blank in. After fill the blanks it is recommendable to assign a new code in the column of "be-in" to its record i.e. 2. Value 2 will mean that this specific record was guessed, and can be easily replaced in case that by other method the missing values will be calculated.

1 COMPUTE b90=0. 2 COMPUTE b91=0. 3 COMPUTE b92=0. 4 COMPUTE b93=0. 5 COMPUTE b94=0. 6 COMPUTE b95=0. 7 COMPUTE b96=0. 8 COMPUTE b97=0. 9 COMPUTE b98=0. 10 COMPUTE b99=0. 11 IF ((not sysmis(g94)) or (not sysmis(h94))) b94=1. 12 IF ((not sysmis(g95)) or (not sysmis(h95))) b95=1. 13 IF ((not sysmis(g96)) or (not sysmis(h96))) b96=1. 14 IF ((not sysmis(g97)) or (not sysmis(h97))) b97=1. 15 IF ((not sysmis(g98)) or (not sysmis(h98))) b98=1. 16 IF ((not sysmis(g99)) or (not sysmis(h99))) b99=1. 17 IF ((b90 eq 1) and (b99 eq 1)) b91=1. 18 IF ((b90 eq 1) and (b99 eq 1)) b92=1. 19 IF ((b90 eq 1) and (b99 eq 1)) b93=1. 20 IF ((b90 eq 1) and (b99 eq 1)) b94=1. 21 IF ((b90 eq 1) and (b99 eq 1)) b95=1. 22 IF ((b90 eq 1) and (b99 eq 1)) b96=1. 23 IF ((b90 eq 1) and (b99 eq 1)) b97=1. 24 IF ((b90 eq 1) and (b99 eq 1)) b98=1. 25 IF ((b90 eq 1) and (b98 eq 1)) b91=1. 26 IF ((b90 eq 1) and (b98 eq 1)) b92=1. 27 IF ((b90 eq 1) and (b98 eq 1)) b93=1. 28 IF ((b90 eq 1) and (b98 eq 1)) b94=1. 29 IF ((b90 eq 1) and (b98 eq 1)) b95=1. 30 IF ((b90 eq 1) and (b98 eq 1)) b96=1. 31 IF ((b90 eq 1) and (b98 eq 1)) b97=1. 32 IF ((b90 eq 1) and (b97 eq 1)) b91=1. 33 IF ((b90 eq 1) and (b97 eq 1)) b92=1. 34 IF ((b90 eq 1) and (b97 eq 1)) b93=1. 35 IF ((b90 eq 1) and (b97 eq 1)) b94=1. 36 IF ((b90 eq 1) and (b97 eq 1)) b95=1. 37 IF ((b90 eq 1) and (b97 eq 1)) b96=1. 38 IF ((b90 eq 1) and (b96 eq 1)) b91=1. 39 IF ((b90 eq 1) and (b96 eq 1)) b92=1. 40 IF ((b90 eq 1) and (b96 eq 1)) b93=1. 41 IF ((b90 eq 1) and (b96 eq 1)) b94=1. 42 IF ((b90 eq 1) and (b96 eq 1)) b95=1. 43 IF ((b90 eq 1) and (b95 eq 1)) b91=1. 44 IF ((b90 eq 1) and (b95 eq 1)) b92=1. 45 IF ((b90 eq 1) and (b95 eq 1)) b93=1. 46 IF ((b90 eq 1) and (b95 eq 1)) b94=1. 47 IF ((b90 eq 1) and (b94 eq 1)) b91=1. 48 IF ((b90 eq 1) and (b94 eq 1)) b92=1. 49 IF ((b90 eq 1) and (b94 eq 1)) b93=1. 50 IF ((b90 eq 1) and (b93 eq 1)) b91=1. 51 IF ((b90 eq 1) and (b93 eq 1)) b92=1. 52 IF ((b90 eq 1) and (b92 eq 1)) b91=1. 53 IF ((b91 eq 1) and (b99 eq 1)) b92=1. 54 IF ((b91 eq 1) and (b99 eq 1)) b93=1. 55 IF ((b91 eq 1) and (b99 eq 1)) b94=1. 56 IF ((b91 eq 1) and (b99 eq 1)) b95=1. 57 IF ((b91 eq 1) and (b99 eq 1)) b96=1. 58 IF ((b91 eq 1) and (b99 eq 1)) b97=1. 59 IF ((b91 eq 1) and (b99 eq 1)) b98=1. 60 IF ((b91 eq 1) and (b98 eq 1)) b92=1. 61 IF ((b91 eq 1) and (b98 eq 1)) b93=1. 62 IF ((b91 eq 1) and (b98 eq 1)) b94=1. 63 IF ((b91 eq 1) and (b98 eq 1)) b95=1. 64 IF ((b91 eq 1) and (b98 eq 1)) b96=1. 65 IF ((b91 eq 1) and (b98 eq 1)) b97=1. 66 IF ((b91 eq 1) and (b97 eq 1)) b92=1. 67 IF ((b91 eq 1) and (b97 eq 1)) b93=1. 68 IF ((b91 eq 1) and (b97 eq 1)) b94=1. 69 IF ((b91 eq 1) and (b97 eq 1)) b95=1. 70 IF ((b91 eq 1) and (b97 eq 1)) b96=1. 71 IF ((b91 eq 1) and (b96 eq 1)) b92=1. 72 IF ((b91 eq 1) and (b96 eq 1)) b93=1. 73 IF ((b91 eq 1) and (b96 eq 1)) b94=1. 74 IF ((b91 eq 1) and (b96 eq 1)) b95=1. 75 IF ((b91 eq 1) and (b95 eq 1)) b92=1. 76 IF ((b91 eq 1) and (b95 eq 1)) b93=1. 77 IF ((b91 eq 1) and (b95 eq 1)) b94=1. 78 IF ((b91 eq 1) and (b94 eq 1)) b92=1. 79 IF ((b91 eq 1) and (b94 eq 1)) b93=1. 80 IF ((b91 eq 1) and (b93 eq 1)) b92=1. 81 IF ((b92 eq 1) and (b99 eq 1)) b93=1. 82 IF ((b92 eq 1) and (b99 eq 1)) b94=1. 83 IF ((b92 eq 1) and (b99 eq 1)) b95=1. 84 IF ((b92 eq 1) and (b99 eq 1)) b96=1. 85 IF ((b92 eq 1) and (b99 eq 1)) b97=1. 86 IF ((b92 eq 1) and (b99 eq 1)) b98=1. 87 IF ((b92 eq 1) and (b98 eq 1)) b93=1. 88 IF ((b92 eq 1) and (b98 eq 1)) b94=1. 89 IF ((b92 eq 1) and (b98 eq 1)) b95=1. 90 IF ((b92 eq 1) and (b98 eq 1)) b96=1. 91 IF ((b92 eq 1) and (b98 eq 1)) b97=1. 92 IF ((b92 eq 1) and (b97 eq 1)) b93=1. 93 IF ((b92 eq 1) and (b97 eq 1)) b94=1. 94 IF ((b92 eq 1) and (b97 eq 1)) b95=1. 95 IF ((b92 eq 1) and (b97 eq 1)) b96=1. 96 IF ((b92 eq 1) and (b96 eq 1)) b93=1. 97 IF ((b92 eq 1) and (b96 eq 1)) b94=1. 98 IF ((b92 eq 1) and (b96 eq 1)) b95=1. 99 IF ((b92 eq 1) and (b95 eq 1)) b93=1. 100 IF ((b92 eq 1) and (b95 eq 1)) b94=1. 101 IF ((b92 eq 1) and (b94 eq 1)) b93=1. 102 IF ((b93 eq 1) and (b99 eq 1)) b94=1. 103 IF ((b93 eq 1) and (b99 eq 1)) b95=1. 104 IF ((b93 eq 1) and (b99 eq 1)) b96=1. 105 IF ((b93 eq 1) and (b99 eq 1)) b97=1. 106 IF ((b93 eq 1) and (b99 eq 1)) b98=1. 107 IF ((b93 eq 1) and (b98 eq 1)) b94=1. 108 IF ((b93 eq 1) and (b98 eq 1)) b95=1. 109 IF ((b93 eq 1) and (b98 eq 1)) b96=1. 110 IF ((b93 eq 1) and (b98 eq 1)) b97=1. 111 IF ((b93 eq 1) and (b97 eq 1)) b94=1. 112 IF ((b93 eq 1) and (b97 eq 1)) b95=1. 113 IF ((b93 eq 1) and (b97 eq 1)) b96=1. 114 IF ((b93 eq 1) and (b96 eq 1)) b94=1. 115 IF ((b93 eq 1) and (b96 eq 1)) b95=1. 116 IF ((b93 eq 1) and (b95 eq 1)) b94=1. 117 IF ((b94 eq 1) and (b99 eq 1)) b95=1. 118 IF ((b94 eq 1) and (b99 eq 1)) b96=1. 119 IF ((b94 eq 1) and (b99 eq 1)) b97=1. 120 IF ((b94 eq 1) and (b99 eq 1)) b98=1. 121 IF ((b94 eq 1) and (b98 eq 1)) b95=1. 122 IF ((b94 eq 1) and (b98 eq 1)) b96=1. 123 IF ((b94 eq 1) and (b98 eq 1)) b97=1. 124 IF ((b94 eq 1) and (b97 eq 1)) b95=1. 125 IF ((b94 eq 1) and (b97 eq 1)) b96=1. 126 IF ((b94 eq 1) and (b96 eq 1)) b95=1. 127 IF ((b95 eq 1) and (b99 eq 1)) b96=1. 128 IF ((b95 eq 1) and (b99 eq 1)) b97=1. 129 IF ((b95 eq 1) and (b99 eq 1)) b98=1. 130 IF ((b95 eq 1) and (b98 eq 1)) b96=1. 131 IF ((b95 eq 1) and (b98 eq 1)) b97=1. 132 IF ((b95 eq 1) and (b97 eq 1)) b96=1. 133 IF ((b96 eq 1) and (b99 eq 1)) b97=1. 134 IF ((b96 eq 1) and (b99 eq 1)) b98=1. 135 IF ((b96 eq 1) and (b98 eq 1)) b97=1. 136 IF ((b97 eq 1) and (b99 eq 1)) b98=1. 137 COMPUTE md90=0. 138 COMPUTE md91=0. 139 COMPUTE md92=0. 140 COMPUTE md93=0. 141 COMPUTE md94=0. 142 COMPUTE md95=0. 143 COMPUTE md96=0. 144 COMPUTE md97=0. 145 COMPUTE md98=0. 146 COMPUTE md99=0. 147 COMPUTE mh94=0. 148 COMPUTE mh95=0. 149 COMPUTE mh96=0. 150 COMPUTE mh97=0. 151 COMPUTE mh98=0. 152 COMPUTE mh99=0. 153 IF (not sysmis(g90)) md90=1. 154 IF (not sysmis(g91)) md91=1. 155 IF (not sysmis(g92)) md92=1. 156 IF (not sysmis(g93)) md93=1. 157 IF (not sysmis(g94)) md94=1. 158 IF (not sysmis(g95)) md95=1. 159 IF (not sysmis(g96)) md96=1. 160 IF (not sysmis(g97)) md97=1. 161 IF (not sysmis(g98)) md98=1. 162 IF (not sysmis(g99)) md99=1. 163 IF (not sysmis(h94)) mh94=1. 164 IF (not sysmis(h95)) mh95=1. 165 IF (not sysmis(h96)) mh96=1. 166 IF (not sysmis(h97)) mh97=1. 167 IF (not sysmis(h98)) mh98=1. 168 IF (not sysmis(h99)) mh99=1. 169 if (mort eq 90) md90=0. 167 if (mort eq 90) b90=0. 168 if (mort eq 91) md91=0. 169 if (mort eq 91) b91=0. 170 if (mort eq 92) md92=0. 171 if (mort eq 92) b92=0. 172 if (mort eq 93) md93=0. 173 if (mort eq 93) b93=0. 174 if (mort eq 94) md94=0. 175 if (mort eq 94) mh94=0. 176 if (mort eq 94) b94=0. 177 if (mort eq 95) md95=0. 178 if (mort eq 95) mh95=0. 179 if (mort eq 95) b95=0. 180 if (mort eq 96) md96=0. 181 if (mort eq 96) mh96=0. 182 if (mort eq 96) b96=0. 183 if (mort eq 97) md97=0. 184 if (mort eq 97) mh97=0. 185 if (mort eq 97) b97=0. 186 if (mort eq 98) md98=0. 187 if (mort eq 98) mh98=0. 188 if (mort eq 98) b98=0. 189 if (mort eq 99) md99=0. 190 if (mort eq 99) mh99=0. 191 if (mort eq 99) md99=0. 192 format 193 md90(f1.0) md91(f1.0) md92(f1.0) md93(f1.0) md94(f1.0) md95(f1.0) 194 md96(f1.0) md97(f1.0) md98(f1.0) md99(f1.0) 195 mh94(f1.0) mh95(f1.0) mh96(f1.0) mh97(f1.0) mh98(f1.0) mh99(f1.0) 196 g90(f5.1) g91(f5.1) g92(f5.1) g93(f5.1) g94(f5.1) g95(f5.1) 197 g96(f5.1) g97(f5.1) g98(f5.1) g99(f5.1) 198 h94(f5.1) h95(f5.1) h96(f5.1) h97(f5.1) h98(f5.1) h99(f5.1). 199 EXECUTE. Example 2.2.3. Source code used for SPSS to find missing values in the big trees database.

In example 2.2.3 has been add a number previous to each syntax line for explanation purposes. Lines 1-10 compute variables "be-in" since 1994 until 1999 (b90-b99) = 0. From lines 11-16 can be read: if both diameter and height were measured in the same year then "be- in" variable for that year = 1. More specifically from lines 17-136 SPSS is called to compute "be-in" = 1 for all years and for different sequences of missing values and can easy read from the source code similar as lines 1-10 were done. Lines 137-152 compute a variable "measured" (md) for both height and diameter = 0; then if a value (height or diameter), was measured md = 1. Lines 169- 191, can be read in this way, if mortality (mort) = 90 ,…, or, 99 then measurement for height and diameter (mdh and md) = 0 and "be-in" = 0 for the mortality year. Lines 192-198 are format of the computed variables (f1.0): sting without decimal point. Line 199 is the executable command. Output of this source code can be read in database 1.2 COMPUTE b94=0. COMPUTE b95=0. COMPUTE b96=0. COMPUTE b97=0. COMPUTE b98=0. COMPUTE b99=0. IF ((not sysmis(dap94)) or (not sysmis(dba94)) or (not sysmis(h94))) b94=1. IF ((not sysmis(dap95)) or (not sysmis(dba95)) or (not sysmis(h95))) b95=1. IF ((not sysmis(dap96)) or (not sysmis(dba96)) or (not sysmis(h96))) b96=1. IF ((not sysmis(dap97)) or (not sysmis(dba97)) or (not sysmis(h97))) b97=1. IF ((not sysmis(dap98)) or (not sysmis(dba98)) or (not sysmis(h98))) b98=1. IF ((not sysmis(dap99)) or (not sysmis(dba99)) or (not sysmis(h99))) b99=1. IF ((b94 eq 1) and (b99 eq 1)) b95=1. IF ((b94 eq 1) and (b99 eq 1)) b96=1. IF ((b94 eq 1) and (b99 eq 1)) b97=1. IF ((b94 eq 1) and (b99 eq 1)) b98=1. IF ((b94 eq 1) and (b98 eq 1)) b95=1. IF ((b94 eq 1) and (b98 eq 1)) b96=1. IF ((b94 eq 1) and (b98 eq 1)) b97=1. IF ((b94 eq 1) and (b97 eq 1)) b95=1. IF ((b94 eq 1) and (b97 eq 1)) b96=1. IF ((b94 eq 1) and (b96 eq 1)) b95=1. IF ((b95 eq 1) and (b99 eq 1)) b96=1. IF ((b95 eq 1) and (b99 eq 1)) b97=1. IF ((b95 eq 1) and (b99 eq 1)) b98=1. IF ((b95 eq 1) and (b98 eq 1)) b96=1. IF ((b95 eq 1) and (b98 eq 1)) b97=1. IF ((b95 eq 1) and (b97 eq 1)) b96=1. IF ((b96 eq 1) and (b99 eq 1)) b97=1. IF ((b96 eq 1) and (b99 eq 1)) b98=1. IF ((b96 eq 1) and (b98 eq 1)) b97=1. IF ((b97 eq 1) and (b99 eq 1)) b98=1. COMPUTE md94=0. COMPUTE md95=0. COMPUTE md96=0. COMPUTE md97=0. COMPUTE md98=0. COMPUTE md99=0. COMPUTE mh94=0. COMPUTE mh95=0. COMPUTE mh96=0. COMPUTE mh97=0. COMPUTE mh98=0. COMPUTE mh99=0. IF ((not sysmis(dap94)) or (not sysmis(dba94))) md94=1. IF ((not sysmis(dap95)) or (not sysmis(dba95))) md95=1. IF ((not sysmis(dap96)) or (not sysmis(dba96))) md96=1. IF ((not sysmis(dap97)) or (not sysmis(dba97))) md97=1. IF ((not sysmis(dap98)) or (not sysmis(dba98))) md98=1. IF ((not sysmis(dap99)) or (not sysmis(dba99))) md99=1. IF (not sysmis(h94)) mh94=1. IF (not sysmis(h95)) mh95=1. IF (not sysmis(h96)) mh96=1. IF (not sysmis(h97)) mh97=1. IF (not sysmis(h98)) mh98=1. IF (not sysmis(h99)) mh99=1. if (mort eq 94) md94=0. if (mort eq 94) mh94=0. if (mort eq 94) b94=0. if (mort eq 95) md95=0. if (mort eq 95) mh95=0. if (mort eq 95) b95=0. if (mort eq 96) md96=0. if (mort eq 96) mh96=0. if (mort eq 96) b96=0. if (mort eq 97) md97=0. if (mort eq 97) mh97=0. if (mort eq 97) b97=0. if (mort eq 98) md98=0. if (mort eq 98) mh98=0. if (mort eq 98) b98=0. if (mort eq 99) md99=0. if (mort eq 99) mh99=0. if (mort eq 99) md99=0. format md94(f1.0) md95(f1.0) md96(f1.0) md97(f1.0) md98(f1.0) md99(f1.0) b94(f1.0) b95(f1.0) b96(f1.0) b97(f1.0) b98(f1.0) b99(f1.0) mh94(f1.0) mh95(f1.0) mh96(f1.0) mh97(f1.0) mh98(f1.0) mh99(f1.0) dap94(f3.0) dap95(f3.0) dap96(f3.0) dap97(f3.0) dap98(f3.0) dap99(f3.0) dba94(f3.0) dba95(f3.0) dba96(f3.0) dba97(f3.0) dba98(f3.0) dba99(f3.0) h94(f5.1) h95(f5.1) h96(f5.1) h97(f5.1) h98(f5.1) h99(f5.1). EXECUTE. Example 2.2.4. Source code used for SPSS to find missing values in the small tress' database. This can be read similarly to the source code for big trees the difference is that here diameter at ground level (dba) or at diameter at breath level were measured instead that circumference at breath level as in big trees database were measured. Output of this source code can be read in database 2.1.3.

1 USE ALL 2 compute e94=0. 3 compute e95=0. 4 compute e96=0. 5 compute e97=0. 6 compute e98=0. 7 compute e99=0. 8 IF(((b94 eq 1) AND (md94 eq 0)) OR ((b94 eq 1) AND (m94 eq 0))) e94=1. 9 IF(((b95 eq 1) AND (md95 eq 0)) OR ((b95 eq 1) AND (m95 eq 0))) e95=1. 10 IF(((b96 eq 1) AND (md96 eq 0)) OR ((b96 eq 1) AND (m96 eq 0))) e96=1. 11 IF(((b97 eq 1) AND (md97 eq 0)) OR ((b97 eq 1) AND (m97 eq 0))) e97=1. 12 IF(((b98 eq 1) AND (md98 eq 0)) OR ((b98 eq 1) AND (m98 eq 0))) e98=1. 13 IF(((b99 eq 1) AND (md99 eq 0)) OR ((b99 eq 1) AND (m99 eq 0))) e99=1. 14 IF(((b94 eq 1) AND (mdh94 eq 0)) OR ((b94 eq 1) AND (m94 eq 0))) e94=1. 15 F(((b95 eq 1) AND (mdh95 eq 0)) OR ((b95 eq 1) AND (m95 eq 0))) e95=1. 16 IF(((b96 eq 1) AND (mdh96 eq 0)) OR ((b96 eq 1) AND (m96 eq 0))) e96=1. 17 IF(((b97 eq 1) AND (mdh97 eq 0)) OR ((b97 eq 1) AND (m97 eq 0))) e97=1. 18 IF(((b98 eq 1) AND (mdh98 eq 0)) OR ((b98 eq 1) AND (m98 eq 0))) e98=1. 19 IF(((b99 eq 1) AND (mdh99 eq 0)) OR ((b99 eq 1) AND (m99 eq 0))) e99=1. 20 format e94(f1.0). 21 format e95(f1.0). 22 format e96(f1.0). 23 format e97(f1.0). 24 format e98(f1.0). 25 format e99(f1.0). 26 EXECUTE. Example 2.2.5. Source code used for SPSS to find measurement errors in an specific year of measurement.

From example 2.2.5. Line 1 is the command that indicate to SPPS use all lines of the source code. Lines 2-7 compute variable errors for the period (1994-1999) = 0. Lines 8-19 can be read in the following way; if a tree in one year was not measured (md and mdh = 0), or addressed to "be-in" (b = 1), and was not measured (m = 0), then error = 1. Lines 20-25 format of the variable (f 1.0): string without decimal point. Line 26 is the executable command. The output of this variable was erased from the database after find all measurement errors value.

2.3 Joining both databases.

In order to assess transition matrices for the current measurement of the populations of V. ferruginea is necessary to join both databases. This join was done in a way that permit to read in every row of the joined database all the data set for every single individual of the populations. SPSS commands: Data-Sort Cases-Sort by-nr-Ascending make possible arrange the data in both database in an ascending way according to the number of the tree (nr), and afterwards using the commands merge files-Add Variables; from small trees database to big trees database join both data bases. (See database 2.3.1)

Once an small individual reached a circumference >10 cm its entire row is cut from small trees database and pasted into the big tree database. This way makes possible avoid the problem of duplication of information in both databases. Anyway after merge both files was observed an small amount of this redundancy (about 20 individuals), clearly noticed by way of using the LAG function of SPSS on the variable number (nr), of all individuals (See example 2.3.2). A close look to those redundancy showed that they did not belongs to the same individual, in most of the cases they even did not belongs to individuals of the same size (height or diameter), either site. Sources for this repetition are (1), individuals were labelled with the same number or (2), the number series for big and small trees in this small amount of individuals overlapped each other. Operative solution to this problem to change the number to one of them both with a new number. Compute help = 0 . IF not (LAG(Nr)) help = 1 . EXECUTE .

Example 2.3.2. Source code used in the syntax of SPSS that help to find individuals with same (nr), in the database. Where LAG function gives the n-case earlier in the column (nr), in database. When a duplicate number occur help = 1.

Big trees database as well as small trees databases were measured using different metric units due to differences in stages sizes they belong to. For example in small data base height were measured in millimetres for all individuals on the big database were measured in meters. For this reason the height in small database and divided above 100 to make the conversion to meter. Also circumference were measured for big database were for small individuals were assessed the diameter. Then a program was wrote to make the conversion from diameter to circumference (see example 2.3.3)

1 compute 2 g94 = g94. 3 g95 = g95. 4 g96 = g96. 5 g97 = g97. 6 g98 = g98. 7 g99 = g99. 8 IF (SYSMIS(g94)) g94 = 3.141592 *(dap94) . 9 IF (SYSMIS(g95)) g95 = 3.141592 *(dap95) . 10 IF (SYSMIS(g96)) g96 = 3.141592 *(dap96) . 11 IF (SYSMIS(g97)) g97 = 3.141592 *(dap97) . 12 IF (SYSMIS(g98)) g98 = 3.141592 *(dap98) . 13 IF (SYSMIS(g99)) g99 = 3.141592 *(dap99) . 14 format g94(f1.0) . 15 format g95(f1.0) . 16 format g96(f1.0) . 17 format g97(f1.0) . 18 format g98(f1.0) . 19 format g99(f1.0). 20 EXECUTE . Example 2.3.3. Source code used for SPSS re-compute (dap) as diameter in the database.

From example 2.3.3. Line 1 is the command of SPPS need to compute variables g94 = g94. In lines 8-13, if g94 is a missing value in the joined database and (dap) was measured then diameter in all the period of study is 3.141592*(dap) in all period of study. Lines 14-19 are the format of the variable; string without decimal point. Line 20 is the executable command. 2.4 Assessing height categories.

In chapter 5 was pointed out about the selection of stages. Here will be presented the practical way in which the height stages were accessed from the database.

1 use all. 2 IF (h94 gt 10) st94 = 5 . 3 IF (h94 le 10) st94 = 4 . 4 IF (h94 le 5) st94 = 3 . 5 IF (h94 le 3) st94 = 2 . 6 IF (h94 le 1) st94 = 1 . 7 IF (h95 gt 10) st95 = 5 . 8 IF (h95 le 10) st95 = 4 . 9 IF (h95 le 5) st95 = 3 . 10 IF (h95 le 3) st95 = 2 . 11 IF (h95 le 1) st95 = 1 . 12 IF (h96 gt 10) st96 = 5 . 13 IF (h96 le 10) st96 = 4 . 14 IF (h96 le 5) st96 = 3 . 15 IF (h96 le 3) st96 = 2 . 16 IF (h96 le 1) st96= 1 . 17 IF (h97 gt 10) st97 = 5 . 18 IF (h97 le 10) st97 = 4 . 19 IF (h97 le 5) st97 = 3 . 20 IF (h97 le 3) st97 = 2 . 21 IF (h97 le 1) st97 = 1 . 22 IF (h98 gt 10) st98 = 5 . 23 IF (h98 le 10) st98 = 4 . 24 IF (h98 le 5) st98 = 3 . 25 IF (h98 le 3) st98 = 2 . 26 IF (h98 le 1) st98 = 1 . 27 IF (h99 gt 10) st99 = 5 . 28 IF (h99 le 10) st99 = 4 . 29 IF (h99 le 5) st99 = 3 . 30 IF (h99 le 3) st99 = 2 . 31 IF (h99 le 1) st99 = 1 . 32 format st94(f1.0) st95(f1.0) st96(f1.0) st97(f1.0) st98(f1.0) st99(f1.0). 33 EXECUTE .

Example 2.4.1 Source code used for SPSS to access height stages.

In example 2.4.1 a number was add to the beginning of each syntax line for explanation proposes. Line 1: Syntax command how calls SPSS to use all following lines. Line 2 can be read as follow: height stages for 1994 (st94) = 5 if height > 10 m. In line 3 can be read in this way: if st94 = 4 then height is  10 m. It can be read for year 1994 in the same way till line 6. In the same order the range within line 2-31 calculate the height stages defined in advance for all the period of study. Line 32 is the format (f1.0) of the resultants variables’columns which mean the variable is string and without decimal point. Line 33 is the executable command. 2.5 Cross-tabulation: Assessing Matrices of Transition.

In this section will be presented the practical way to assess transition matrix using a program wrote in the syntax editor of SPSS. See in chapter 5 for more information about transition matrix. 1 compute s98=st98. 2 compute s99=st99. 3 IF (sysmis(st98) and not sysmis(st99)) s98 = 0. 4 IF (sysmis(st99) and not sysmis(st98)) s99 = 0. 5 format s98(f1.0) s99(f1.0). 6 SROSSTABS 7 /TABLES=s99 BY s98 8 /FORMAT= AVALUE TABLES 9 /SELLS= SOUNT . 10 EXESUTE.

11 compute s98=st98. 12 compute s97=st97. 13 IF (sysmis(st98) and not sysmis(st97)) s98 = 0. 14 IF (sysmis(st97) and not sysmis(st98)) s97 = 0. 15 format s98(f1.0) s97(f1.0). 16 SROSSTABS 17 /TABLES=s98 BY s97 18 /FORMAT= AVALUE TABLES 19 /SELLS= SOUNT . 20 EXESUTE .

21 compute s97=st97. 22 compute s96=st96. 23 IF (sysmis(st97) and not sysmis(st96)) s97 = 0. 24 IF (sysmis(st96) and not sysmis(st97)) s96 = 0. 25 format s97(f1.0) s96(f1.0). 26 SROSSTABS 27 /TABLES=s97 BY s96 28 /FORMAT= AVALUE TABLES 29 /SELLS= SOUNT . 30 EXESUTE .

31 compute s96=st96. 32 compute s95=st95. 33 IF (sysmis(st96) and not sysmis(st95)) s96 = 0. 34 IF (sysmis(st95) and not sysmis(st96)) s95 = 0. 35 format s96(f1.0) s95(f1.0). 36 SROSSTABS 37 /TABLES=s96 BY s95 38 /FORMAT= AVALUE TABLES 39 /SELLS= SOUNT . 40 EXESUTE .

41 compute s95=st95. 42 compute s94=st94. 43 IF (sysmis(st95) and not sysmis(st94)) s95 = 0. 44 IF (sysmis(st94) and not sysmis(st95)) s94 = 0. 45 format s95(f1.0) s94(f1.0). 46 SROSSTABS 47 /TABLES=s95 BY s94 48 /FORMAT= AVALUE TABLES 49 /SELLS= SOUNT . 50 EXESUTE .

Example 2.5.1 Source code used for SPSS to transition matrices.

Example 2.5.4 Calculate transition matrices for all period of study. For matrix 98-99 line 1 and 2 create variables stage 1998 and 1999 (s98, s99) in the way of two new columns. Line 3 help to find in-growths in the database can be read in the following way: if the value of stages 98 (st98) is missing but it is not missing in stages 99 (st99) then the new variable (s98) = 0. It means that when an individual is an in-growth in 1999 it can not have records in 1998 (s98=0). Line 4 can be read similarly to line 3. Line 5 is the format of the column: string with 0 decimal point. Lines 6-9 cross tabulation function, in which s99 and s98 are used as input variables. Line 10 is the executable command. In the same way lines 11-50 can be read. Outputs are presented in chapter 7 section 7.1. 3. Descriptive statistic applied to data

3.1 Mean, n and standard deviation of height increment per each class.

In section 6.1 were discussed two method to assess time of passage. The firs method use the fundament of formula (11), which need in its denominator the mean of height increment (see example 3.1)

1 COMPUTE ih9495 = h95-h94 . 2 COMPUTE ih9596 = h96-h95 . 3 COMPUTE ih9697 = h97-h96 . 4 COMPUTE ih9798 = h98-h97 . 5 COMPUTE ih9899 = h99-h98 . 6 EXECUTE . Example 3.1. Source code of SPSS to calculate height increment in the database.

In example 3.1 as usual has been wrote a number to each line for explanation purposes. Line 1-5 compute the new variables of high increment as the subtraction of the latest year of measurement to the former one. It can be read like this: Height increment 95-96 = height 96 – height 95. Line 6 is the executable command of SPSS.

Then, descriptive statistic: mean, n and standard deviation was assessed as follow: Statistic- Compare Mean-Means. The complete source code is as follow:

1 MEANS 2 TABLES=ih9495 BY s94 3 TABLES=ih9596 BY s95 4 TABLES=ih9697 BY s96 5 TABLES=ih9798 BY s97 6 TABLES=ih9899 BY s98 7 /CELLS MEAN COUNT STDDEV .

Example 3.1.2 Source code of SPSS that calculate mean, n and standard deviation.

In example 3.1.2. Line 1 call to compare means analysis. Line 2-7 calculate mean, n and standard deviation in a table organised by stages. The complete solution is shown below:

Height increment in period 1994-1995 S94 Mean N Std. Deviation 1 5.386E-02 207 0.1582 2 0.1206 79 0.3776 3 0.4198 81 0.7926 4 0.7328 191 1.1257 5 -7,82E-02 5 1.1379 Total 0.345 563 0.849

Height increment in period 1995-1996 S95 Mean N Std. Deviation 1 6.343E-03 376 0.1052 2 3.108E-02 102 0.3227 3 0.2301 68 0.5108 4 1.0088 197 0.9357 5 0.4171 19 0.8629 Total 0.2990 762 0.6845 Height increment 1996-1997 S96 Mean N Std. Deviation 1 3.459E-02 367 0.1448 2 5.520E-02 102 0.3366 3 0.1237 64 0.5079 4 0.7926 171 0.9965 5 0.9753 51 1.0156 Total 0.2802 755 0.6853

Height increment 1997-1998 S97 Mean N Std. Deviation 1 1.297E-02 254 0.1877 2 5.753E-03 73 0.3607 3 0.1057 56 0.3999 4 0.6696 145 0.8889 5 1.1289 82 0.9397 Total 0.3267 610 0.7220

Height increment 1999-1999 S98 Mean N Std. Deviation 1 3.236E-02 55 0.2013 2 2.353E-03 17 0.3510 3 -4.33E-02 24 0.3393 4 0.2428 110 0.5768 5 0.5359 113 1.0496 Total 0.2760 319 0.7549

3.2 Confidence interval calculation:

To see if different height increment overlap each other the coefficient (see formula) interval per every period of measurement (the very period of the matrices too) were determined. Indeed all of them overlap each other

Confidence interval = mean +- t * std.D/root n

Where t = 2

Period Mean t Std. Dev. n lower Upper 94-95 0.35 2 0.85 563 0.27 0.42 95-96 0.30 2 0.68 762 0.25 0.35 96-97 0.28 2 0.69 755 0.23 0.33 97-98 0.33 2 0.72 610 0.27 0.39 98-99 0.28 2 0.75 319 0.19 0.36

Recommended publications