DataExam5.2: Heights of Trees: 37 Seedlots at 6 Sites

DataExam5.2R Documentation

Heights of Trees: 37 Seedlots at 6 Sites

Description

Mean heights of 37 seedlots (26 Acacia, Allocasuarina and Casuarina species) grown at six sites in Thailand, the data of Table 5.2 of Williams, Matheson and Harwood, used there for a regression of each seedlot on the site mean (Finlay-Wilkinson regression). 30 site-seedlot combinations have no height.

Usage

data(DataExam5.2)

Format

A data frame with 222 rows and 4 columns:

site

factor, 6 sites.

seedlot

factor, 37 seedlot numbers.

ht

height (cm); NA when the seedlot was not measured at the site.

sitemean

the mean of ht at the site (one value per site).

Details

sitemean takes one value per site, so in ht ~ site + sitemean * seedlot it is aliased with site (its coefficient is NA); see the section "Covariates aliased with a factor" of predictmeans. On the four sites and 27 seedlots with complete data (and sitemean recomputed for them) predictmeans() reproduces the means and slopes of the book's Table 5.7 (tests/testthat/test-level-covariate.R).

Source

Williams, E. R., Matheson, A. C. and Harwood, C. E. Experimental Design and Analysis for Tree Improvement, 3rd edition. CSIRO Publishing, Table 5.2.

Examples

data(DataExam5.2)
fit <- lm(ht ~ site + sitemean * seedlot, data = DataExam5.2)
head(predictmeans(fit, "seedlot", plot = FALSE)$mean_table)
# each seedlot averaged over the sites where it was measured
head(predictmeans(fit, "seedlot", plot = FALSE, weights = "cells")$mean_table)

predictmeans documentation built on Nov. 24, 2026, 5:10 p.m.