llrTest: Method for hypothesis testing

View source: R/02_exported_functions.R

llrTestR Documentation

Method for hypothesis testing

Description

Two outputs of alignReplicates can be tested as nested hypothesis. This can be used to test if e.g. buffer material influence can be neglected or a specific measurement point is an outlier.

Usage

llrTest(H0, H1, check = TRUE)

Arguments

H0

output of alignReplicates obeying the null hypothesis. A special case of H1.

H1

output of alignReplicates, the general case

Value

list with the log-likelihood ratio, statistical information and the numerical p-value calculated by the evaluating the chi-squared distribution at the present log-likelihood ratio with the current degrees of freedom.

Examples

## load provided example data file
lrrDataPath <- system.file(
    "extdata", "exampleLlrTest.csv",
    package = "blotIt"
)

## import data
llrData <- readWide(
    file = lrrDataPath,
    description = seq(1, 4),
    sep = ",",
    dec = "."
)

## generate H0: the buffer column is not named as a biological effect e.g.
## not considered as a biological different condition
H0 <- alignReplicates(
    data = llrData,
    model = "yi / sj",
    errorModel = "value * sigmaR",
    biological = yi ~ name + time + stimmulus,
    scaling = sj ~ name + ID,
    error = sigmaR ~ name + 1,
    fitLogscale = FALSE,
    normalize = TRUE,
    averageTechRep = FALSE,
    verbose = FALSE,
    normalizeInput = TRUE
)

## generate H1: here the buffer column is named in the biological parameter
## therefore different entries are considered as biologically different
H1 <- alignReplicates(
    data = llrData,
    model = "yi / sj",
    errorModel = "value * sigmaR",
    biological = yi ~ name + time + stimmulus + buffer,
    scaling = sj ~ name + ID,
    error = sigmaR ~ name + 1,
    fitLogscale = FALSE,
    normalize = TRUE,
    averageTechRep = FALSE,
    verbose = FALSE,
    normalizeInput = TRUE
)

## perform test
llrTest(H0, H1)

JetiLab/blotIt documentation built on June 19, 2024, 7:18 a.m.