Skip to contents

A reproducibly simulated agronomy field trial relating crop yield to rainfall, fertiliser, soil pH and a management treatment. Used for the regression, coefficient-plot, scatter-trend and interaction examples. The data-generating process contains a genuine fertiliser-by-treatment interaction: fertiliser raises yield far more under the enhanced treatment than under standard, so interaction_plot(lm(yield ~ fertiliser * treatment + ..., crop_yield), "fertiliser", "treatment") shows real, diverging slopes rather than noise. The main effects (rainfall, fertiliser, soil pH and treatment) are retained.

Usage

crop_yield

Format

A data frame with 200 rows and 6 variables:

field

Field identifier.

treatment

Management treatment (factor): standard or enhanced.

rainfall

Seasonal rainfall, in millimetres.

fertiliser

Fertiliser applied, in kilograms per hectare.

soil_ph

Soil pH.

yield

Crop yield, in tonnes per hectare.

Source

Simulated; see data-raw/generate_datasets.R.

Details

The data are synthetic, generated by data-raw/generate_datasets.R with a fixed seed.