lmResDiff: linear model residual differences by subtraction and...

Description Usage Arguments Value

Description

linear model residual differences by subtraction and continuous var (i.e. days to diagnosis)

Usage

1
2
3
lmResDiff(batchAdjusted = NULL, obsNames = NULL, resDiffId = NULL,
  contVar = NULL, minPintercept = 0.005, minPcontVar = 0.005,
  MTC = "BH")

Arguments

batchAdjusted

a matrix or data.frame output of batch adjusted residuals obtained from linear modelling of analytical batch covariate batchAdj. The matrix/ data.frame must take the form observations (samples) in columns and mass spectral variable residuals in rows.

obsNames

character vector of observation (i.e. sample/ QC/ Blank) names to identify appropriate observation (sample) columns.

resDiffId

a character or logical vector containing the pair/ class identity of observations. This identity will be used to substract the batchAdjusted residuals. (e.g. case-control status).

contVar

a character/ factor/ numeric vector containing a continuous variable which will be modelled lm against the residual difference values. This vector will be subset and only the TRUE, maximum factor level from resDiffId will be included.

minPintercept

the minimum p value threshold for the intercept value of lm.

minPcontVar

he minimum p value threshold for the continuous variable contVar of lm

MTC

multiple testing correction method see(p.adjust). default = "BH".

minPintercept

the minimum p value threshold for the intercept value of lm.

Value

returns a list containing two elements: 1. resultsTable = a data.frame containing the variables found to be below both p value thresholds (minPintercept and minPcontVar). 2. resDiff = a data.frame containing the substraction of the resDiffId groups.


WMBEdmands/MetMSLine documentation built on May 9, 2019, 10:03 p.m.