llr_test: Method for hypothesis testing

View source: R/02_exported_functions.R

llr_testR Documentation

Method for hypothesis testing

Description

Two outputs of align_me 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

llr_test(H0, H1, check = TRUE)

Arguments

H0

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

H1

output of align_me, 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
lrr_data_path <- system.file(
    "extdata", "example_llr_test.csv",
    package = "blotIt3"
)

## import data
llr_data <- read_wide(
    file = lrr_data_path,
    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 <- align_me(
    data = llr_data3,
    model = "yi / sj",
    error_model = "value * sigmaR",
    biological = yi ~ name + time + stimmulus,
    scaling = sj ~ name + ID,
    error = sigmaR ~ name + 1,
    parameter_fit_scale_log = FALSE,
    normalize = TRUE,
    average_techn_rep = FALSE,
    verbose = FALSE,
    normalize_input = TRUE
)

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

## perform test
llr_test(H0, H1)

SeverinBang/blotIt3 documentation built on April 4, 2022, 5 a.m.