outlierCriteria: a function for several outlier criteria

Description Usage Arguments Details Value Examples

View source: R/outlierDetection.R

Description

this function calculates outlier criteria on plants for each parameter

Usage

1
2
outlierCriteria(datain, typeD, residin, typeR, trait, resRawName,
  resStdName, threshold)

Arguments

datain

input dataframe of parameters

typeD

type of datain dataframe (1==wide, 2==long)

residin

input dataframe of residuals

typeR

type of residin dataframe (1==wide, 2==long)

trait

character, trait of interest to model (example biovolume24, PH24 ...)

resRawName

character, names of the raw residual in datain

resStdName

character, names of the standardized residual in datain

threshold,

numeric threshold for the normal quantile in raw criteria

Details

This function needs in input a dataframe with residuals extracted from a mixed linear model (for instance using asreml or nlme libraries) and an another dataframe with the estimated parameters (biovolume, plantHeight, leafArea etc...). Several criteria will be calculated using different types of residuals. The 2 input dataframe must contain the following columns names: "experimentAlias","Line" and "Position".

raw and quartile criteria

use raw residuals

influence criterion

uses standardized residuals

The function must be executed for each parameter of interest: biovolume, plantHeight and phy. Each criteria will be used according with some rules:

Small plant

biovolume and phy

Big plants

biovolume and plantHeight

Value

a dataframe with columns identifiying criteria used to detect outlier plants with 1==plant OK - 0==plant KO to suppress

critraw

raw criterion, critci: quartiles criterion

critinfl

influence criterion with standardized residuals

Examples

1
2
# Not run
# dt1<-outlierCriteria()

sanchezi/phisStatR documentation built on Nov. 14, 2019, 7:10 p.m.