Performs a test of Complete Spatial Randomness for each
plate. This function is a wrapper around quadrat.test
function working directly on the objects of adpcr
.
test_panel(X, nx = 5, ny = 5, alternative = c("two.sided", "regular", "clustered"), method = c("Chisq", "MonteCarlo"), conditional = TRUE, nsim = 1999)
adpcr
class containing data from
one or more panels.character
string (partially matched) specifying the
alternative hypothesis.character
string (partially matched) specifying the test to
use: either "Chisq"
for the chi-squared test (the default), or
"MonteCarlo"
for a Monte Carlo test.logical
. Should the Monte Carlo test be conducted
conditionally upon the observed number of points of the pattern? Ignored if
method="Chisq".A list
of objects of class "htest"
with the length equal to the
number of plates (minimum 1).
Under optimal conditions, the point pattern of dPCR events (e.g., positive droplet & negative droplets) should be randomly distrubuted over a planar chip. This function verifies this assumption using chi-square or Monte Carlo test. Arrays with non-random patterns should be checked for integrity.
A similar result can be achived by using adpcr2ppp
and
quadrat.test
. See Examples.
http://www.spatstat.org/
#>#>test_panel(many_panels)#> $Experiment1.1 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 28.831, df = 24, p-value = 0.4531 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #> #> $Experiment1.2 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 13.333, df = 24, p-value = 0.07939 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #> #> $Experiment1.3 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 21.179, df = 24, p-value = 0.7437 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #> #> $Experiment1.4 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 19.365, df = 24, p-value = 0.5355 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #> #> $Experiment1.5 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 10.484, df = 24, p-value = 0.01551 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #>#> $Experiment1.3 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 21.179, df = 24, p-value = 0.7437 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #>#do test_panel manually require(spatstat)#>#>#>#> #>#>#> #>#>#> #>ppp_data <- adpcr2ppp(many_panels) lapply(ppp_data, function(single_panel) quadrat.test(single_panel))#> $Experiment1.1 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 28.831, df = 24, p-value = 0.4531 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #> #> $Experiment1.2 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 13.333, df = 24, p-value = 0.07939 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #> #> $Experiment1.3 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 21.179, df = 24, p-value = 0.7437 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #> #> $Experiment1.4 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 19.365, df = 24, p-value = 0.5355 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #> #> $Experiment1.5 #> #> Chi-squared test of CSR using quadrat counts #> Pearson X2 statistic #> #> data: single_panel #> X2 = 10.484, df = 24, p-value = 0.01551 #> alternative hypothesis: two.sided #> #> Quadrats: 5 by 5 grid of tiles #>