filterAnchors: Filter Outlier Ordered Pairs

Description Usage Arguments Value

View source: R/fit_model.R

Description

Helper function for fit_gam & fit_loess. It filters the set of ordered pairs using the residuals calculated from multiple GAM / loess fits.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
filterAnchors(
  rts,
  fit,
  vals,
  iterFilter,
  ratio,
  frac,
  bs,
  m,
  family,
  method,
  optimizer,
  loess.pars,
  ...
)

Arguments

rts

Data frame of ordered retention time pairs.

fit

Either "gam" for GAM fits, or "loess" for loess fits

vals

numeric values: k values for GAM fits, spans for loess fits

iterFilter

integer number of residual filtering iterations

ratio

numeric. A point is an outlier if the ratio of residual to mean residual of a fit exceeds this value. Must be greater than 1.

frac

numeric. A point is excluded if deemed a residual in more than this fraction value times the number of fits. Must be between 0 & 1.

bs

character. Choice of spline method from mgcv; either "bs" or "ps"

m

integer. Basis and penalty order for GAM; see ?mgcv::s

family

character. Choice of mgcv family; see: ?mgcv::family.mgcv

method

character. Smoothing parameter estimation method; see: ?mgcv::gam

optimizer

character. Method to optimize smoothing parameter; see: ?mgcv::gam

loess.pars

parameters for LOESS fitting; see ?loess.control

...

other arguments passed to mgcv::gam.

Value

anchor rts data frame with updated weights.


metabCombiner documentation built on Dec. 10, 2020, 2 a.m.