\( \newcommand{\bm}[1]{\boldsymbol{\mathbf{#1}}} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\var}{var} \DeclareMathOperator{\cov}{cov} \DeclareMathOperator{\corr}{corr} \newcommand{\indep}{\perp\!\!\!\perp} \newcommand{\nindep}{\perp\!\!\!\perp\!\!\!\!\!\!/\;\;} \)

3.2 trees data

trees contains data on the volume, height and girth (diameter) of 31 felled black cherry trees; girth is measured four feet six inches above ground. The problem is to find a simple linear model for predicting volume from height and girth.

pairs(trees, panel = panel.smooth)
pairs(log(trees), panel = panel.smooth)

coplot generates conditioning plots, in which the relationship between two variables is displayed conditional on subsets of values of other variables. This is useful to see if the relationship is stable over the range of other variables. To assess this for the relationship of log volume and log girth, conditional on height:

attach(trees)
coplot(log(Volume) ~ log(Girth) | Height, panel = panel.smooth)

Try this on the orginal scale also. For an initial fit, we take a linear model and assess model fit using diagnostic plots:

fit <- glm(Volume ~ Girth + Height)
summary(fit)
plot.glm.diag(fit)

What do you make of the fit?

To assess the possibility of transformation:

boxcox(fit)

Both \(\lambda = 1\) and \(\lambda = 0\) lie outside the confidence interval, though the latter is better supported. One possibility is to take \(\lambda = 1/3\), corresponding to response \(\texttt{Volume}^{1/3}\). What transformations for Girth and Height are then needed for dimensional compatibility? Fit this model, give interpretations of the parameter estimates, and discuss its suitability.

An alternative is to suppose that a tree is conical in shape, in which case \[\texttt{Volume} \propto \texttt{Height} \times \texttt{Girth}^2.\] Equivalently, we fit

fit <- glm(log(Volume) ~ log(Girth) + log(Height))
summary(fit)
plot.glm.diag(fit)

Are the parameter estimates consistent with this model? Does it fit adequately? What advantage has it over the others for prediction of future volumes?

(Chapter 8; Atkinson, 1985, p. 63)