Agriculture Reference
In-Depth Information
Y = 0.00326* (X 2 .511754)
300
200
100
Weight (gms)
Y
0
40
60
80
100
Bulb Diameter (mm)
Figure 10.8
Data points of onion bulb diameter and weight with regression line.
twoway (scatter weight diameter ) (function y
=.00325993*x^2.511754, range (diameter ))
The equation was added to the graph (Figure 10.8) to show what the Y
function was. The graph also shows the entire number after X should
be an exponent as follows:
Y = 0.00326 * ( X 2.511754 )
Another type of curve that is often seen in agriculture is the expo-
nential curve, which can be a growth or decay curve (see Figure 10.6).
This type of curve will have the general form of
Y = aX b
Open the dataset Cabbage Height.dta, which is a small dataset of
plant height above the cotyledons measured on a weekly basis (Steel
and Torrie, 1980, p. 456) (Figure 10.9). Graph this data with
twoway ( scatter height week )
Now add a variable with a logarithmic transformation of the plant
height (Figure 10.10).
generate logheight = log (helght)
In this case, only the plant height is transformed, not the weeks since
this variable is already linear. Now, do the regression with the trans-
formed plant height against weeks and plot the results.
regress logheight week
twoway (scatter logheight week ) (lfit logheight week )
 
Search WWH ::




Custom Search