Agriculture Reference
In-Depth Information
consumption of hens based on body weight. Body weight in this con-
text is fixed because there is a finite range for hen weights.
As you might remember from algebra class, the formula for a line is
Y = a + bX, where a represents the y-intercept and b is the slope. It is
this equation that we are trying to fit with the data. Trying to fit a line
to data points that best represents where those data points occur is the
purpose of linear regression. The criterion for determining this line is to
minimize the sum of squares of these deviations. This method is often
referred to as the least-squares method. The formula for estimating the
slope ( b ) is
(
XXYY
)(
)
=
b
) 2
(
XX
Y is an estimate of Y defined as
ˆ
YYbX
=+
(
X
)
Open the dataset Hen Regression.dta, which is a small dataset
of leghorn hen weight and food consumed over 350 days (Steel and
Torrie, 1980). Enter the command
regress food weight
This will result in the following output:
Source | SS df MS Number of obs = 10
---------+------------------------------ F( 1, 8) = 16.23
Model | 90.8354996 1 90.8354996 Prob > F = 0.0038
Residual | 44.7685335 8 5.59606669 R-squared = 0.6699
---------+------------------------------ Adj R-squared = 0.6286
Total | 135.604033 9 15.0671148 Root MSE = 2.3656
----------------------------------------------------------------
food | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+------------------------------------------------------
weight | 7.690104 1.908736 4.03 0.004 3.288551 12.09166
_cons |55.26328 9.534895 5.80 0.000 33.27578 77.25079
----------------------------------------------------------------
Search WWH ::




Custom Search