Skip to contents

Use the method M4 in Bernal Vasquez (2016). Bonferroni Holm test to judge residuals standardized by the re scaled MAD (BH MADR).

Usage

outliers_remove(data, trait, model)

Arguments

data

Experimental design data frame with the factors and traits.

trait

Name of the trait.

model

The fixed or random effects in the model.

Value

list. 1. Table with date without outliers. 2. The outliers in the dataset.

Details

Function to remove outliers in MET experiments

References

Bernal Vasquez, Angela Maria, et al. “Outlier Detection Methods for Generalized Lattices: A Case Study on the Transition from ANOVA to REML.” Theoretical and Applied Genetics, vol. 129, no. 4, Apr. 2016.

Examples


library(inti)

rmout <- outliers_remove(
  data = potato
  , trait ="hi"
  , model = "0 + (1|bloque) + geno"
  )
  
rmout$outliers
#>     bloque geno   hi       resi   res_MAD  rawp.BHStud index         adjp
#> 68      IV  G05 0.19 -0.3299352 -7.261199 3.836931e-13    68 3.836931e-13
#> 124     II  G15 0.45 -0.1742304 -3.834454 1.258434e-04   124 1.258434e-04
#>            bholm out_flag
#> 68  5.755396e-11  OUTLIER
#> 124 1.875067e-02  OUTLIER