Agriculture Reference
In-Depth Information
weight with increasing bulb diameter [ twoway (scatter weight
diameter ) ]. Input the following command and see the results:
regress weight diameter
Source | SS df MS Number of obs = 30
-----------+---------------------------- F( 1, 28) = 503.26
Model | 152562.215 1 152562.215 Prob > F = 0.0000
Residual | 8488.0869 28 303.145961 R-squared = 0.9473
-----------+---------------------------- Adj R-squared = 0.9454
Total | 161050.302 29 5553.45868 Root MSE = 17.411
----------------------------------------------------------------
weight | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-----------+----------------------------------------------------
diameter |4.143827 .1847158 22.43 0.000 3.765454 4.522201
_cons |-138.2188 11.63165 -11.88 0.000 -162.0451 -114.3924
----------------------------------------------------------------
The analysis suggests that the data have a significant linear fit with an
R 2 of 0.9473. There are, however, some problems with this analysis.
For one thing, the y -intercept is -138.2188, which means that as the
bulb diameter gets below about 30 mm the bulb weights are negative.
Obviously, this can't be so. In addition, the data points appear to be
above the expected linear function with very low and very high bulb
diameters (FigureĀ 10.7). The data points should occur randomly above
and below the predicted linear function. This type of data can often
be explained with a power curve, which has the general equation of
Y = aX b
Now, generate new variables with the following command:
generate lgdiameter = log10( diameter )
generate lgweight = log10( weight )
The new variables are the base 10 logarithmic transformation of the
bulb diameter and weight data. The original data and the transforma-
tion are graphed below with a linear prediction line for each. Notice
how the transformed data better fit a straight line.
Now, enter the following command with the transformed variables
and see the results:
Search WWH ::




Custom Search