Learn R Programming

bayesmix (version 0.7-6)

darwin: Differences in heights between plants

Description

A numeric vector containing 15 observations of differences in heights between pairs of self-fertilized and cross-fertilized plants grown in the same condition.

Usage

data(darwin)

Arguments

Format

A numeric vector of length 15.

Details

Darwin's data set contains two extremely small values. Therefore, this data set can be used for outlier modelling.

Examples

Run this code
data("darwin", package = "bayesmix")
## Estimated sample density
plot(density(darwin[[1]]), ylim = c(0, 0.02), main = "Outlier modelling")
ss <- seq(-100, 100, by = 1)
## Normal density with estimated mean and sd of whole sample
lines(ss, dnorm(ss, mean = mean(darwin[[1]]), sd = sd(darwin[[1]])), col = "red")
## Normal density with estimated mean and sd of sample, where the 2
## extremely small values are removed
lines(ss, dnorm(ss, mean = mean(darwin[-c(1:2),1]),
      sd = sd(darwin[-c(1:2),1])), col = "green")

Run the code above in your browser using DataLab