1
***********************************************;
2
*** Data from Freund & Wilson
(1993) ***;
3
*** TABLE 8.24 : ESTIMATING TREE
WEIGHTS ***;
4
***********************************************;
5
options ps=256 ls=132 nocenter nodate
nonumber;
6
7
data one; infile cards missover;
8
TITLE1 'EXST7015:
Estimating tree weights from other morphometric variables';
9
input ObsNo Dbh Height Age Grav
Weight ObsID $;
10
********
label ObsNo = 'Original
observation number'
11
Dbh = 'Diameter at breast height (inches)'
12
Height = 'Height of
the tree (feet)'
13
Age = 'Age of the tree (years)'
14
Grav
= 'Specific gravity of the wood'
15
Weight = 'Harvest
weight of the tree (lbs)'
16
ObsId = 'Identification letter added to dataset';
17
lweight = log(weight);
18
ldbh = log(DBH);
19
cards;
NOTE:
The data set WORK.ONE has 47 observations and 9 variables.
NOTE:
DATA statement used:
real time
0.06 seconds
cpu
time
0.06 seconds
19
!
run;
67
;
68
proc print data=one; TITLE2 'Raw data
print'; run;
NOTE:
There were 47 observations read from the data set WORK.ONE.
NOTE:
The PROCEDURE PRINT printed page 1.
NOTE:
PROCEDURE PRINT used:
real time
0.03 seconds
cpu time
0.03 seconds
EXST7015:
Estimating tree weights from other morphometric variables
Raw
data print
Obs
Obs
Obs
No Dbh
Height Age
Grav
Weight ID
lweight ldbh
1 1
5.7
34 10
0.409
174 a
5.15906
1.74047
2 2
8.1
68 17
0.501 745
b
6.61338 2.09186
3 3
8.3
70 17
0.445 814
c
6.70196 2.11626
. . .
(see previous handout for
full listing)
45
45
8.0
61 13
0.508 614
S
6.41999 2.07944
46
46
5.2
47 13
0.432 194
T
5.26786 1.64866
47
47
3.7
33 13
0.389 66
U
4.18965 1.30833
70
options ls=99 ps=55; TITLE2 'Scatter
plot';
71
proc plot data=one; plot
weight*Dbh=obsid;
72
run;
73
options ps=256 ls=132;
74
NOTE:
There were 47 observations read from the data set WORK.ONE.
NOTE:
The PROCEDURE PLOT printed page 2.
NOTE:
PROCEDURE PLOT used:
real time
0.01 seconds
cpu
time
0.01 seconds
EXST7015:
Estimating tree weights from other morphometric variables
Scatter
plot
Plot of Weight*Dbh. Symbol is value of ObsID.
Weight |
|
1800
+
|
|
f q
|
1600
+
|
|
g
|
1400
+
|
|
|
1200
+
|
|
|
1000
+
|
|
|
800
+
c z
|
b
t
|
N
|
600
+
S
|
y
|
s
|
D
400
+
d
|
l u
|
B COj
o
|
F Pe
200
+
A L mk J
|
G a
| Kn Hw h
| iI p r
0
+
|
-+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
3
4
5
6
7 8
9
10
11
12 13
Dbh
NOTE: 8 obs
hidden.
75
proc reg data=one lineprinter; ID
ObsID;
76
TITLE2 'Simple linear regression';
77
model Weight = Dbh / CLB; output
out=next1 p=yhat r=e;
78
run;
NOTE:
47 observations read.
NOTE:
47 observations used in computations.
78
!
options ls=99 ps=55;
79
plot residual.*predicted.=obsid
/ VREF=0;
80
run;
80
!
options ps=256 ls=132;
81
NOTE:
The data set WORK.NEXT1 has 47 observations and 11 variables.
NOTE:
The PROCEDURE REG printed pages 3-4.
NOTE:
PROCEDURE REG used:
real time
0.10 seconds
cpu
time
0.10 seconds
EXST7015:
Estimating tree weights from other morphometric variables
Simple
linear regression
The
REG Procedure
Model:
MODEL1
Dependent
Variable: Weight
Analysis of
Variance
Sum of Mean
Source
DF
Squares
Square F Value
Pr > F
Model
1
6455980
6455980 433.49
<.0001
Error
45
670191 14893
Corrected
Total
46 7126171
Root
MSE
122.03740 R-Square
0.9060
Dependent
Mean 369.34043 Adj
R-Sq
0.9039
Coeff
Var
33.04198
Parameter Estimates
Parameter Standard
Variable
DF
Estimate
Error t Value
Pr > |t| 95% Confidence
Limits
Intercept
1
-729.39630
55.69366 -13.10
<.0001 -841.56910
-617.22350
Dbh
1
178.56371
8.57640
20.82
<.0001
161.28996 195.83747
---+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----
RESIDUAL
|
|
|
|
|
|
400
+
+
|
|
|
f
|
|
|
|
|
300
+
+
|
|
|
q |
|
|
|
|
200
+
+
|
|
|
i
|
R
|
?K
g
|
e
|
|
s
100 +
?
+
i
| p
G
|
d
|
Hw
c
|
u
|
?
A
B
N
|
a
|
b
|
l
0 +
r
?
l
+
|
F
z
|
|
C
|
|
?
O
|
|
E
u
S
|
-100
+
j
y
+
|
a P
d D
|
|
J
|
|
e
o
t
|
|
|
-200
+
+
|
|
|
|
|
|
|
|
-300
+
s
+
|
|
|
|
---+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----
-100 0
100 200 300
400 500 600
700 800 900 1000 1100 1200 1300 1400 1500
Predicted Value of Weight
PRED
82
proc univariate data=next1 normal
plot; var e;
83
TITLE3 'Residual analysis'; run;
NOTE:
The PROCEDURE UNIVARIATE printed page 5.
NOTE:
PROCEDURE UNIVARIATE used:
real time
0.03 seconds
cpu
time
0.03 seconds
EXST7015:
Estimating tree weights from other morphometric variables
Simple
linear regression
Residual
analysis
The
UNIVARIATE Procedure
Variable:
e
(Residual)
Moments
N
47 Sum
Weights
47
Mean
0 Sum
Observations
0
Std
Deviation 120.703619
Variance
14569.3637
Skewness
0.47869472
Kurtosis
1.04153074
Uncorrected
SS 670190.732 Corrected
SS 670190.732
Coeff
Variation
. Std Error Mean
17.6064324
Basic Statistical Measures
Location
Variability
Mean
0.00000 Std
Deviation
120.70362
Median
-0.14041
Variance
14569
Mode
.
Range
660.02160
Interquartile Range 161.40929
Tests for Location: Mu0=0
Test
-Statistic- -----p Value------
Student's
t t
0
Pr > |t| 1.0000
Sign
M -0.5
Pr >= |M| 1.0000
Signed
Rank S
-25
Pr >= |S| 0.7946
Tests
for Normality
Test
--Statistic--- -----p Value------
Shapiro-Wilk
W
0.973389 Pr < W
0.3544
Kolmogorov-Smirnov
D
0.084574 Pr > D >0.1500
Cramer-von
Mises W-Sq
0.044081
Pr > W-Sq >0.2500
Anderson-Darling
A-Sq
0.354877 Pr > A-Sq >0.2500
Quantiles
(Definition 5)
Quantile
Estimate
100%
Max 368.769960
99%
368.769960
95%
162.423301
90%
138.710558
75%
Q3 75.141444
50%
Median -0.140413
25%
Q1 -86.267841
10%
-135.842356
5%
-153.980584
1%
-291.251641
0%
Min -291.251641
Extreme Observations
------Lowest-----
-----Highest-----
Value
Obs
Value
Obs
-291.252
19
138.711 35
-165.246
20
149.057 7
-153.981
15
162.423 9
-151.699
5
260.775 17
-135.842
36
368.770 6
Stem Leaf
#
Boxplot
Normal Probability Plot
3
7
1
0
375+
*
3
|
+
2
6
1
|
|
* ++++
2
|
|
++++
1
56
2
|
|
+++*
1
00334
5
|
|
+*****
0
5555666899
10 +-----+
|
*****
0
0033
4 |
+ |
|
+****
-0
3210
4 *-----*
|
++***
-0
997766665
9 +-----+
|
******
-1 4321110
7
|
|
******
-1
755
3
|
| * *+*+
-2
|
| ++++
-2
9
1 |
-275+ ++*+
----+----+----+----+
+----+----+----+----+----+----+----+----+----+----+
Multiply Stem.Leaf by
10**+2
-2
-1
0
+1 +2
85
proc reg data=one lineprinter; ID
ObsID;
86
TITLE2 'Simple linear regression on
logarithms';
87
model lWeight = lDbh / CLB; output
out=next2 p=yhat r=le;
88
run;
NOTE:
47 observations read.
NOTE:
47 observations used in computations.
88
!
options ls=99 ps=55;
89
plot
residual.*predicted.=obsid /
VREF=0;
90
run;
90
!
options ps=256 ls=132;
91
NOTE:
The data set WORK.NEXT2 has 47 observations and 11 variables.
NOTE:
The PROCEDURE REG printed pages 6-7.
NOTE:
PROCEDURE REG used:
real time
0.08 seconds
cpu
time
0.07 seconds
EXST7015:
Estimating tree weights from other morphometric variables
Simple
linear regression on logarithms
The
REG Procedure
Model:
MODEL1
Dependent
Variable: lweight
Analysis
of Variance
Sum of Mean
Source
DF
Squares
Square F Value
Pr > F
Model
1
35.94979 35.94979
1236.37
<.0001
Error
45
1.30846 0.02908
Corrected
Total
46 37.25825
Root
MSE
0.17052 R-Square
0.9649
Dependent
Mean
5.49466 Adj R-Sq
0.9641
Coeff
Var
3.10337
Parameter
Estimates
Parameter Standard
Variable
DF
Estimate
Error t Value
Pr > |t| 95% Confidence
Limits
Intercept
1
0.55219
0.14275
3.87
0.0004
0.26469
0.83970
ldbh
1
2.79854
0.07959
35.16
<.0001
2.63824 2.95884
------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+------
RESIDUAL
|
|
|
|
|
|
|
|
|
|
0.4
+
+
|
B
|
|
|
|
|
|
l
N
|
|
K
c
|
0.2
+
G
A
b
+
|
|
|
L
C
|
|
T
F
|
|
Q
O
u
z
f
|
R
|
I
?
y
S
|
e
0.0 +
i
n
M
d
+
s
|
U
w
?k j
D
|
i
|
E
|
d
|
R
g
q
|
u
|
H
P
o
|
a
|
t
|
l
-0.2
+
J
+
|
e
|
|
a
|
|
|
|
p
s
|
|
|
-0.4
+
+
|
|
|
r
|
|
|
|
|
|
|
-0.6
+
+
|
|
|
|
|
|
|
|
|
|
------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+------
4.00 4.25 4.50 4.75
5.00 5.25 5.50 5.75 6.00 6.25 6.50 6.75 7.00 7.25 7.50 7.75
Predicted Value of lweight
PRED
92
proc univariate data=next2 normal
plot; var le;
93
TITLE3 'Residual analysis (log
model)'; run;
NOTE:
The PROCEDURE UNIVARIATE printed page 8.
NOTE:
PROCEDURE UNIVARIATE used:
real time
0.02 seconds
cpu
time
0.02 seconds
EXST7015:
Estimating tree weights from other morphometric variables
Simple
linear regression on logarithms
Residual
analysis (log model)
The
UNIVARIATE Procedure
Variable:
le
(Residual)
Moments
N
47
Sum
Weights
47
Mean
0 Sum
Observations
0
Std
Deviation 0.16865578
Variance
0.02844477
Skewness
-0.3773174
Kurtosis
0.45701405
Uncorrected
SS 1.30845959 Corrected
SS 1.30845959
Coeff
Variation
. Std Error Mean
0.02460097
Basic Statistical Measures
Location
Variability
Mean
0.000000 Std
Deviation
0.16866
Median
0.002340
Variance
0.02844
Mode
.
Range
0.82049
Interquartile Range 0.20289
Tests for Location: Mu0=0
Test
-Statistic- -----p Value------
Student's
t t
0
Pr > |t| 1.0000
Sign
M 0.5
Pr >= |M| 1.0000
Signed
Rank S
28
Pr >= |S| 0.7705
Tests for Normality
Test
--Statistic--- -----p Value------
Shapiro-Wilk
W
0.979294 Pr < W
0.5634
Kolmogorov-Smirnov
D
0.128993 Pr > D
0.0483
Cramer-von
Mises W-Sq
0.069887
Pr > W-Sq >0.2500
Anderson-Darling
A-Sq
0.396238 Pr > A-Sq >0.2500
Quantiles
(Definition 5)
Quantile
Estimate
100%
Max 0.36313835
99%
0.36313835
95%
0.26733332
90%
0.22733737
75%
Q3 0.10182481
50%
Median 0.00234038
25%
Q1 -0.10106254
10%
-0.23773581
5%
-0.32982307
1%
-0.45735158
0%
Min -0.45735158
Extreme Observations
------Lowest------
------Highest-----
Value
Obs
Value Obs
-0.457352
18
0.227337 3
-0.337451
16
0.234177 37
-0.329823
19
0.267333 40
-0.263905
1
0.268304 12
-0.237736
5
0.363138 28
Stem
Leaf
#
Boxplot
Normal Probability Plot
3
6
1
|
0.375+
+*+
3
|
|
+++
2
77
2
|
|
+*+*
2
1133
4
|
|
****
1
9
1
|
|
+*+
1
0123
4 +-----+
|
+***
0
556668
6 |
|
|
+***
0
013334
6 *--+--*
|
****
-0
333332210
9 |
|
|
*****
-0
8
1 |
|
|
*+++
-1
443000
6 +-----+
|
****+
-1
5
1
|
|
*++
-2
40
2
|
| +**
-2
6
1
|
| +++*
-3
43
2
|
| ++* *
-3
| +++
-4
|++
-4
6
1 0
-0.475+ *
----+----+----+----+
+----+----+----+----+----+----+----+----+----+----+
Multiply Stem.Leaf by
10**-1
-2
-1
0
+1 +2
Modified: August 16, 2004
James P. Geaghan