test_counts: Test counts

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

The test for comparing counts from two or more digital PCR experiments.

Usage

1
test_counts(input, model = "ratio", conf.level = 0.95)

Arguments

input

object of class adpcr or dpcr with "nm" type.

model

may have one of following values: binomial, poisson, prop, ratio. See Details.

conf.level

confidence level of the intervals and groups.

Details

test_counts incorporates two different approaches to models: GLM (General Linear Model) and multiple pair-wise tests. The GLM fits counts data from different digital PCR experiments using quasibinomial or quasipoisson family. Comparisons between single experiments utilize Tukey's contrast and multiple t-tests (as provided by function glht).

In case of pair-wise tests, (rateratio.test or prop.test) are used to compare all pairs of experiments. The p-values are adjusted using the Benjamini & Hochberg method (p.adjust). Furthermore, confidence intervals are simultaneous.

Value

an object of class count_test.

Note

Mean number of template molecules per partition and its confidence intervals will vary depending on input.

Author(s)

Michal Burdukiewicz, Stefan Roediger, Piotr Sobczyk.

References

Bretz F, Hothorn T, Westfall P, Multiple comparisons using R. Boca Raton, Florida, USA: Chapman & Hall/CRC Press (2010).

See Also

Functions used by test_counts:

GUI presenting capabilities of the test: test_counts_gui.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#be warned, the examples of test_counts are time-consuming
## Not run: 
adpcr1 <- sim_adpcr(m = 10, n = 765, times = 1000, pos_sums = FALSE, n_panels = 3)
adpcr2 <- sim_adpcr(m = 60, n = 550, times = 1000, pos_sums = FALSE, n_panels = 3)
adpcr2 <- rename_dpcr(adpcr2, exper = "Experiment2")
adpcr3 <- sim_adpcr(m = 10, n = 600, times = 1000, pos_sums = FALSE, n_panels = 3)
adpcr3 <- rename_dpcr(adpcr3, exper = "Experiment3")

#compare experiments using binomial regression
two_groups_bin <- test_counts(bind_dpcr(adpcr1, adpcr2), model = "binomial")
summary(two_groups_bin)
plot(two_groups_bin)
#plot aggregated results
plot(two_groups_bin, aggregate = TRUE)
#get coefficients
coef(two_groups_bin)

#this time use Poisson regression
two_groups_pois <- test_counts(bind_dpcr(adpcr1, adpcr2), model = "poisson")
summary(two_groups_pois)
plot(two_groups_pois)

#see how test behaves when results aren't significantly different
one_group <- test_counts(bind_dpcr(adpcr1, adpcr3))
summary(one_group)
plot(one_group)

## End(Not run)

dpcR documentation built on May 2, 2019, 7:04 a.m.