darwin               package:bayesmix               R Documentation

_D_i_f_f_e_r_e_n_c_e_s _i_n _h_e_i_g_h_t_s _b_e_t_w_e_e_n _p_l_a_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     data(darwin)

_F_o_r_m_a_t:

     A numeric vector of length 15.

_D_e_t_a_i_l_s:

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

_S_o_u_r_c_e:

     Abraham, B. and G. Box (1978) Linear models and spourious
     observations. _Applied Statistics_, *27*, 131-8.

_E_x_a_m_p_l_e_s:

     data(darwin)
     ## 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), sd = sd(darwin)), 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")

