flan.test {flan}R Documentation

Fluctuation Analysis parametric testing

Description

Performs one-sample and two-sample Fluctuation Analysis tests on mutant counts. Returns confidence intervals and p-values, based on asymptotic normality, from the values returned by mutestim.

Usage


  flan.test(mc, fn = NULL, mfn = NULL, cvfn = NULL,
               fitness = NULL, death = 0., plateff = 1.,
               model = c("LD", "H", "I"), muinf = +Inf,
               mutations0 = 1., mutprob0 = NULL, fitness0 = 1.,
               conf.level = 0.95,
               alternative = c("two.sided", "less", "greater"),
               method = c("ML", "GF", "P0"), winsor = 2000
               )

Arguments

mc

a numeric vector of mutant counts or a list of two numeric vectors of mutant counts.

fn

an optional numeric vector of final numbers or a list of two numeric vectors of final numbers.

mfn

mean final number of cells. Ignored if fn is non-missing.

cvfn

coefficient of variation of final number of cells. Ignored if fn is non-missing.

fitness

fitness parameter: ratio of growth rates of normal and mutant cells. If fitness is NULL (default) then the fitness will be estimated. Otherwise, the given value will be used to estimate the mean mutation number mutations

death

death probability. Must be smaller than 0.5. By default 0.

plateff

plating efficiency parameter. Must be non-larger than 1. By default 1. Available for GF method, and for ML method under LD model.

model

statistical lifetime model. Must be one of "LD" (default) for Luria-Delbrück model (exponential lifetimes), "H" for Haldane model (constant lifetimes), or "I" for Inhomogeneous model

muinf

parameter used only if model is I. See details.

mutations0

null hypothesis value for parameter mutations. See details.

mutprob0

null hypothesis value for parameter mutprob. See details.

fitness0

null hypothesis value for parameter fitness. See details.

conf.level

confidence level of the interval.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".

method

estimation method as a character string: one of ML (default), P0, or GF. See mutestim.

winsor

winsorization parameter: positive integer. Only used when method is ML or when method is P0 and fitness is NULL. See mutestim.

Details

flan.test tests the values of parameters mutations, mutprob, or fitness, with mutations0 mutprob0, fitness0 as null hypotheses.

If fn or mfn are given, mutprob is tested, otherwise, mutations is tested. If fitness is given, it is not tested.

muinf corresponds to the cumulative division rate on the interval [0 ; +Inf). If model is I, muinf has to be finite, else model is set to "LD".

alternative may be a two dimensional vector specifying the alternatives for the two parameters to be tested.

If mc is a list, a two-sample test is performed. In that case, the values in mutations0, mutprob0 and fitness0 apply to the difference between the two samples (with 0 as default value) For the two-sample tests, the parameters mfn, cvfn, fitness, death and plateff may be two dimensional vectors, where the first (resp. second) components are related to the first (resp. second) sample.

Value

Returns a list with class "flantest". The structure of a "flantest" object, is similar to that of a "htest" object (see also t.test). The class "flantest" contains the following components :

Tstat

the value of the computed statistic(s).

parameter

the values of fitness (if not tested), death and plateff.

p.value

the p-value(s) of the test.

conf.int

confidence interval(s) for the parameter(s) relative to the specified alternative.

estimates

the estimate(s).

null.value

the specified hypothesized value(s).

alternative

a (vector of) character string(s) describing the alternative hypothesis.

model

the statistical lifetime model.

method

method used to compute the estimate(s).

data.name

a character string giving the name of the complete data.

See Also

mutestim.

Examples

# one sample test, without final numbers
b <- unlist(boeal)
# is the mean mutation number greater than 0.7, and the fitness greater than 0.8?
flan.test(b, alternative = "greater", mutations0 = 0.7, fitness0 = 0.8)
# is the mean mutation number less than 0.8, given the fitness?
flan.test(b, alternative = "less", mutations0 = 0.8, fitness = 0.84)

# one sample test, with final numbers
d <- david[[11]]
flan.test(d$mc, d$fn, alternative = "less", mutprob0 = 2e-10, fitness0 = 2)

# two-sample test: test equality of parameters
b1 <- unlist(boeal[1:10])
b2 <- unlist(boeal[11:20])
flan.test(list(b1, b2))

# realistic random sample of size 100: mutation probability 1e-9,
# mean final number 1e9, coefficient of variation on final numbers 0.3,
# fitness 0.9, lognormal lifetimes, 5% mutant deaths

x <- rflan(100, mutprob = 1e-9, mfn = 1e9, cvfn = 0.3, fitness = 0.9, death = 0.05)

# test on mutations and fitness, without final numbers
flan.test(x$mc, mutations0 = 1, fitness0 = 0.9)

# test on mutprob and fitness, with final numbers
flan.test(x$mc, x$fn, mutprob0 = 1e-9, fitness0 = 0.9)

# given fitness

flan.test(x$mc, x$fn, fitness = 0.9, mutprob0 = 1e-9)

# take deaths into account
flan.test(x$mc, x$fn, mutprob0 = 1e-9, fitness0 = 0.9, death = 0.05)

# change method
flan.test(x$mc, x$fn, mutprob0 = 1e-9, fitness0 = 0.9, death = 0.05, method = "GF")

flan.test(x$mc, x$fn, mutprob0 = 1e-9, fitness0 = 0.9, death = 0.05, method = "P0")
# change model
flan.test(x$mc, x$fn, mutprob0 = 1e-9, fitness0 = 0.9, model = "H")

# Two-sample test
y <- rflan(100, mutprob = 1e-9, mfn = 1e9, cvfn = 0.3, fitness = 1.2, death = 0.05)
MC <- list(x$mc, y$mc)
FN <- list(x$fn, y$fn)
#
flan.test(mc = MC, fn = FN, fitness = c(0.9, 1.1), death = 0.05)



[Package flan version 0.9 Index]