| DataExam5.2 | R Documentation |
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.
data(DataExam5.2)
A data frame with 222 rows and 4 columns:
factor, 6 sites.
factor, 37 seedlot numbers.
height (cm); NA when the seedlot was not measured at the site.
the mean of ht at the site (one value per site).
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).
Williams, E. R., Matheson, A. C. and Harwood, C. E. Experimental Design and Analysis for Tree Improvement, 3rd edition. CSIRO Publishing, Table 5.2.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.