Pear2011: Pear2011: Sugar Content in Four Pear Varieties

Pear2011R Documentation

Pear2011: Sugar Content in Four Pear Varieties

Description

The data in this data set was collected from an experiment performed by Bioforsk (NIBIO) at Ås. Juice was made from four different pear varieties with six pears of each type. The sugar content in the juice was measured.

Usage

Pear2011

Format

A data frame with 24 observations (rows) and 3 variables (columns).

Column name Data type Description Values
[,1] Sort factor 4 types of pears (KvedeA, kvedeadams, KvedeC, Pyrodwarf)
[,2] Year integer The year of the experiment (2011)
[,3] REF numeric The amount of sugar (10.80 - 13.80)

Details

The quality of fruits is often judged by the index of refraction (REF) and measured by means of a refractometer. The REF value is connected to the amount of sugar in a liquid solution.

The Pear2011 data set was used in:

  • Exam STAT340 2017-05-19, Exercise 1

  • Exam STAT340 2021-05-28, Exercise 1

Examples


# Table 1b, Exam STAT340 2017-05-19
options(contrasts = c("contr.sum","contr.poly"))
LinearModel.2 <- lm(REF ~ Sort, data = Pear2011)
summary(LinearModel.2)

# The following hack improves the output
colnames(contrasts(Pear2011$Sort)) <- levels(Pear2011$Sort)[1:3]
LinearModel.2 <- lm(REF ~ Sort, data = Pear2011)
summary(LinearModel.2)


thoree/stat340 documentation built on June 30, 2024, 4:04 p.m.