lmms.filter.lines: Filter Linear Profiles from Linear Mixed Model output

View source: R/lmms.filter.lines.R

lmms.filter.linesR Documentation

Filter Linear Profiles from Linear Mixed Model output

Description

This function filters linear models with highly heterogeneous variability within residues. From an "lmms" output, 2 parameters are tested:

Usage

lmms.filter.lines(
  data,
  lmms.obj,
  time,
  homoskedasticity = TRUE,
  MSE.filter = TRUE,
  homoskedasticity.cutoff = 0.05
)

Arguments

data

a data.frame used in the lmms::lmmSpline command

lmms.obj

a lmmspline object

time

a numeric vector containing the sample time point information.

homoskedasticity

a logical whether or not to test for homoscedasticity with the Breusch-Pagan test.

MSE.filter

whether or not to test for low dispersion with a cutoff on the MSE.

homoskedasticity.cutoff

a numeric scalar between 0 and 1, p-value threshold for B-P test.

Details

* homo-sedasticity of the residues with a Breusch-Pagan test * low dispersion with a cutoff on the MSE (mean squared error)

Value

a list containing the following items

filtering.summary

a data.frame with the different tests per features (passed = TRUE, failed = FALSE)

to.keep

features which passed all the tests

filtered

the filtered data.frame

See Also

bptest

Examples

# data and lmms output
data(timeOmics.simdata)
data <- timeOmics.simdata$sim
lmms.output <- timeOmics.simdata$lmms.output
time <- timeOmics.simdata$time

# filter
filter.res <- lmms.filter.lines(data = data, lmms.obj = lmms.output, time = time)



abodein/timeOmics documentation built on April 12, 2024, 12:30 p.m.