soya: Soybeans Experiment Data

soyaR Documentation

Soybeans Experiment Data

Description

Dataset from an experiment conducted in a vegetation house with soybeans. Each plot contained two plants and the experiment involved three levels of soil water (water) and five levels of potassium fertilization (pot), arranged in five blocks (block). Three response variables are recorded: grain yield, number of seeds, and number of viable peas per plant. The dataset contains 75 observations and 7 variables.

Usage

data(soya)

Format

A data.frame with 75 observations and 7 variables:

pot

Factor with five levels of potassium fertilization.

water

Factor with three levels of amount of water in the soil.

block

Factor with five levels representing experimental blocks.

grain

Continuous variable representing grain yield per plant.

seeds

Count variable representing number of seeds per plant.

viablepeas

Binomial variable representing number of viable peas per plant.

totalpeas

Binomial variable representing total number of peas per plant.

Source

Bonat, W. H. (2018). Multiple Response Variables Regression Models in R: The mcglm Package. Journal of Statistical Software, 84(4):1–30.

Examples

library(mcglm)
library(Matrix)
data(soya, package = "mcglm")

# Linear predictor example
formu <- grain ~ block + factor(water) * factor(pot)
Z0 <- mc_id(soya)
fit <- mcglm(linear_pred = c(formu), matrix_pred = list(Z0),
            data = soya)
anova(fit)

mcglm documentation built on Jan. 9, 2026, 1:07 a.m.