Learn R Programming

dpcR (version 0.1.3.3)

test_counts: Test counts

Description

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

Usage

test_counts(input, binomial = TRUE, ...)

Arguments

input
adpcr or dpcr object with with "nm" type.
binomial
logical, if TRUE binomial regression is performed. If FALSE, Poisson regression is used instead.
...
additional arguments for glm function.

Value

  • an object of class count_test.

Details

test_counts fits counts data from different digital PCR experiments to Generalized Linear Model (using quasibinomial or quasipoisson family). Comparisions between single experiments utilize Tukey's contrast and multiple t-tests (as provided by function glht).

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

Run this code
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)
adpcr3 <- sim_adpcr(m = 10, n = 600, times = 1000, pos_sums = FALSE, n_panels = 3)

#compare experiments using binomial regression
two_groups_bin <- test_counts(bind_dpcr(adpcr1, adpcr2), binomial = TRUE)
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), binomial = FALSE)
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)

Run the code above in your browser using DataLab